mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 681905 - Crash [@ nsDocAccessible::ProcessContentInserted], r=davidb
This commit is contained in:
parent
454171e4fa
commit
a148241548
@ -681,10 +681,15 @@ NotificationController::TextEnumerator(nsCOMPtrHashKey<nsIContent>* aEntry,
|
||||
tag.get(), id.get(), index);
|
||||
#endif
|
||||
|
||||
// Make sure the text node is in accessible document still.
|
||||
nsAccessible* container = document->GetAccessibleOrContainer(containerNode);
|
||||
nsTArray<nsCOMPtr<nsIContent> > insertedContents;
|
||||
insertedContents.AppendElement(textNode);
|
||||
document->ProcessContentInserted(container, &insertedContents);
|
||||
NS_ASSERTION(container,
|
||||
"Text node having rendered text hasn't accessible document!");
|
||||
if (container) {
|
||||
nsTArray<nsCOMPtr<nsIContent> > insertedContents;
|
||||
insertedContents.AppendElement(textNode);
|
||||
document->ProcessContentInserted(container, &insertedContents);
|
||||
}
|
||||
}
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
|
@ -1417,11 +1417,9 @@ nsDocAccessible::RecreateAccessible(nsIContent* aContent)
|
||||
// coalescence with normal hide and show events. Note, in this case they
|
||||
// should be coalesced with normal show/hide events.
|
||||
|
||||
// Check if the node is in DOM still.
|
||||
nsIContent* parentContent = aContent->GetParent();
|
||||
if (parentContent && parentContent->IsInDoc()) {
|
||||
nsAccessible* container = GetAccessibleOrContainer(parentContent);
|
||||
|
||||
// Check if the node is in accessible document.
|
||||
nsAccessible* container = GetContainerAccessible(aContent);
|
||||
if (container) {
|
||||
// Remove and reinsert.
|
||||
UpdateTree(container, aContent, false);
|
||||
container->UpdateChildren();
|
||||
@ -1440,8 +1438,6 @@ nsDocAccessible::ProcessInvalidationList()
|
||||
nsAccessible* accessible = GetAccessible(content);
|
||||
if (!accessible) {
|
||||
nsAccessible* container = GetContainerAccessible(content);
|
||||
NS_ASSERTION(container,
|
||||
"Got a referenced element that is not in document!");
|
||||
if (container) {
|
||||
container->UpdateChildren();
|
||||
accessible = GetAccessible(content);
|
||||
|
Loading…
Reference in New Issue
Block a user