mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-08 07:53:54 +00:00
bug 1322593 - don't coalesce non contiguous text changes under the same accessible r=davidb
This commit is contained in:
parent
44d07a4cfc
commit
c62d07b686
@ -220,6 +220,7 @@ NotificationController::QueueMutationEvent(AccTreeMutationEvent* aEvent)
|
||||
if (prevTextChange && prevHide->Parent() == mutEvent->Parent()) {
|
||||
if (prevHide->mNextSibling == target) {
|
||||
target->AppendTextTo(prevTextChange->mModifiedText);
|
||||
prevHide->mTextChangeEvent.swap(mutEvent->mTextChangeEvent);
|
||||
} else if (prevHide->mPrevSibling == target) {
|
||||
nsString temp;
|
||||
target->AppendTextTo(temp);
|
||||
@ -228,9 +229,8 @@ NotificationController::QueueMutationEvent(AccTreeMutationEvent* aEvent)
|
||||
temp += prevTextChange->mModifiedText;;
|
||||
prevTextChange->mModifiedText = temp;
|
||||
prevTextChange->mStart -= extraLen;
|
||||
prevHide->mTextChangeEvent.swap(mutEvent->mTextChangeEvent);
|
||||
}
|
||||
|
||||
prevHide->mTextChangeEvent.swap(mutEvent->mTextChangeEvent);
|
||||
}
|
||||
} else if (prevEvent && mutEvent->IsShow() &&
|
||||
prevEvent->GetEventType() == nsIAccessibleEvent::EVENT_SHOW) {
|
||||
@ -241,15 +241,15 @@ NotificationController::QueueMutationEvent(AccTreeMutationEvent* aEvent)
|
||||
int32_t prevIndex = prevShow->GetAccessible()->IndexInParent();
|
||||
if (prevIndex + 1 == index) {
|
||||
target->AppendTextTo(prevTextChange->mModifiedText);
|
||||
prevShow->mTextChangeEvent.swap(mutEvent->mTextChangeEvent);
|
||||
} else if (index + 1 == prevIndex) {
|
||||
nsString temp;
|
||||
target->AppendTextTo(temp);
|
||||
prevTextChange->mStart -= temp.Length();
|
||||
temp += prevTextChange->mModifiedText;
|
||||
prevTextChange->mModifiedText = temp;
|
||||
prevShow->mTextChangeEvent.swap(mutEvent->mTextChangeEvent);
|
||||
}
|
||||
|
||||
prevShow->mTextChangeEvent.swap(mutEvent->mTextChangeEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user