47870: Don't copy if selection is collapsed. r=law
git-svn-id: svn://10.0.0.236/trunk@77379 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -369,7 +369,6 @@ StackArena::Push()
|
||||
StackMark* oldMarks = mMarks;
|
||||
PRUint32 oldLength = mMarkLength;
|
||||
mMarkLength += MARK_INCREMENT;
|
||||
void* marks = 0;
|
||||
mMarks = new StackMark[mMarkLength];
|
||||
nsCRT::memcpy(mMarks, oldMarks, sizeof(StackMark)*oldLength);
|
||||
|
||||
@@ -1899,7 +1898,7 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
|
||||
if (GetVerifyReflowEnable() && (VERIFY_REFLOW_DURING_RESIZE_REFLOW & gVerifyReflowFlags))
|
||||
{
|
||||
mInVerifyReflow = PR_TRUE;
|
||||
PRBool ok = VerifyIncrementalReflow();
|
||||
/*PRBool ok = */VerifyIncrementalReflow();
|
||||
mInVerifyReflow = PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
@@ -2905,6 +2904,12 @@ PresShell::DoCopy()
|
||||
if (NS_FAILED(rv) || !sel)
|
||||
return rv?rv:NS_ERROR_FAILURE;
|
||||
|
||||
// Now we have the selection. Make sure it's nonzero:
|
||||
PRBool isCollapsed;
|
||||
sel->GetIsCollapsed(&isCollapsed);
|
||||
if (isCollapsed)
|
||||
return NS_OK;
|
||||
|
||||
doc->CreateXIF(buffer,sel);
|
||||
|
||||
// Get the Clipboard
|
||||
|
||||
Reference in New Issue
Block a user