mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 860123. r=ehsan
This commit is contained in:
parent
90159cbd3a
commit
9057ca8f6f
@ -4388,8 +4388,12 @@ Selection::Collapse(nsINode* aParentNode, int32_t aOffset)
|
|||||||
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
|
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
nsresult result;
|
nsresult result;
|
||||||
|
|
||||||
|
nsRefPtr<nsPresContext> presContext = GetPresContext();
|
||||||
|
if (presContext->Document() != aParentNode->OwnerDoc())
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
// Delete all of the current ranges
|
// Delete all of the current ranges
|
||||||
nsRefPtr<nsPresContext> presContext = GetPresContext();
|
|
||||||
Clear(presContext);
|
Clear(presContext);
|
||||||
|
|
||||||
// Turn off signal for table selection
|
// Turn off signal for table selection
|
||||||
@ -4616,6 +4620,10 @@ Selection::Extend(nsINode* aParentNode, int32_t aOffset)
|
|||||||
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
|
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
nsRefPtr<nsPresContext> presContext = GetPresContext();
|
||||||
|
if (presContext->Document() != aParentNode->OwnerDoc())
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
//mFrameSelection->InvalidateDesiredX();
|
//mFrameSelection->InvalidateDesiredX();
|
||||||
|
|
||||||
nsINode* anchorNode = GetAnchorNode();
|
nsINode* anchorNode = GetAnchorNode();
|
||||||
@ -4650,7 +4658,6 @@ Selection::Extend(nsINode* aParentNode, int32_t aOffset)
|
|||||||
aParentNode, aOffset,
|
aParentNode, aOffset,
|
||||||
&disconnected);
|
&disconnected);
|
||||||
|
|
||||||
nsRefPtr<nsPresContext> presContext = GetPresContext();
|
|
||||||
nsRefPtr<nsRange> difRange = new nsRange(aParentNode);
|
nsRefPtr<nsRange> difRange = new nsRange(aParentNode);
|
||||||
if ((result1 == 0 && result3 < 0) || (result1 <= 0 && result2 < 0)){//a1,2 a,1,2
|
if ((result1 == 0 && result3 < 0) || (result1 <= 0 && result2 < 0)){//a1,2 a,1,2
|
||||||
//select from 1 to 2 unless they are collapsed
|
//select from 1 to 2 unless they are collapsed
|
||||||
|
Loading…
Reference in New Issue
Block a user