author | Alexander Surkov <surkov.alexander@gmail.com> |
Wed, 08 Jun 2016 13:45:22 -0400 | |
changeset 301176 | b1f370d930d5d4347c38bb99a5def3bee6d91bd5 |
parent 301175 | f0006e4f551ead7f84b1ba79ec7f39e5c39a6e61 |
child 301177 | 0d08f7065337aa6f6ae5ddc9b0fe91a1f3dcbebb |
push id | 30328 |
push user | cbook@mozilla.com |
push date | Thu, 09 Jun 2016 09:58:24 +0000 |
treeherder | mozilla-central@cb493102af8a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | yzen |
bugs | 1278294 |
milestone | 50.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/accessible/base/nsAccessibilityService.cpp +++ b/accessible/base/nsAccessibilityService.cpp @@ -553,48 +553,49 @@ nsAccessibilityService::DeckPanelSwitche } void nsAccessibilityService::ContentRangeInserted(nsIPresShell* aPresShell, nsIContent* aContainer, nsIContent* aStartChild, nsIContent* aEndChild) { + DocAccessible* document = GetDocAccessible(aPresShell); #ifdef A11Y_LOG if (logging::IsEnabled(logging::eTree)) { - logging::MsgBegin("TREE", "content inserted"); + logging::MsgBegin("TREE", "content inserted; doc: %p", document); logging::Node("container", aContainer); for (nsIContent* child = aStartChild; child != aEndChild; child = child->GetNextSibling()) { logging::Node("content", child); } logging::MsgEnd(); logging::Stack(); } #endif - DocAccessible* docAccessible = GetDocAccessible(aPresShell); - if (docAccessible) - docAccessible->ContentInserted(aContainer, aStartChild, aEndChild); + if (document) { + document->ContentInserted(aContainer, aStartChild, aEndChild); + } } void nsAccessibilityService::ContentRemoved(nsIPresShell* aPresShell, nsIContent* aChildNode) { + DocAccessible* document = GetDocAccessible(aPresShell); #ifdef A11Y_LOG if (logging::IsEnabled(logging::eTree)) { - logging::MsgBegin("TREE", "content removed"); + logging::MsgBegin("TREE", "content removed; doc: %p", document); logging::Node("container node", aChildNode->GetFlattenedTreeParent()); logging::Node("content node", aChildNode); logging::MsgEnd(); } #endif - DocAccessible* document = GetDocAccessible(aPresShell); if (document) { // Flatten hierarchy may be broken at this point so we cannot get a true // container by traversing up the DOM tree. Find a parent of first accessible // from the subtree of the given DOM node, that'll be a container. If no // accessibles in subtree then we don't care about the change. Accessible* child = document->GetAccessible(aChildNode); if (!child) { Accessible* container = document->GetContainerAccessible(aChildNode);