mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 580151 - Part 1: Move the increment up in case the call to nsIEditor::GetSelection fails and we bail out early; r=roc
--HG-- extra : rebase_source : 249cf74c6a1700b230d946793819ff6611ebbb99
This commit is contained in:
parent
3541b2238b
commit
25f6280420
@ -221,6 +221,12 @@ nsTextEditRules::BeforeEdit(PRInt32 action, nsIEditor::EDirection aDirection)
|
||||
|
||||
nsAutoLockRulesSniffing lockIt(this);
|
||||
mDidExplicitlySetInterline = PR_FALSE;
|
||||
if (!mActionNesting)
|
||||
{
|
||||
// let rules remember the top level action
|
||||
mTheAction = action;
|
||||
}
|
||||
mActionNesting++;
|
||||
|
||||
// get the selection and cache the position before editing
|
||||
nsCOMPtr<nsISelection> selection;
|
||||
@ -230,12 +236,6 @@ nsTextEditRules::BeforeEdit(PRInt32 action, nsIEditor::EDirection aDirection)
|
||||
selection->GetAnchorNode(getter_AddRefs(mCachedSelectionNode));
|
||||
selection->GetAnchorOffset(&mCachedSelectionOffset);
|
||||
|
||||
if (!mActionNesting)
|
||||
{
|
||||
// let rules remember the top level action
|
||||
mTheAction = action;
|
||||
}
|
||||
mActionNesting++;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user