Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(912)

Unified Diff: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp

Issue 2316273002: Update layout before creating AXObjectCache in AccessibilityInspectorAgent (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index a9759da14b1410109c3599728823b736c99955ce..c1762d60d37ab82fa0aad7b88924a6452b53e707 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -381,6 +381,8 @@ void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId
return;
Document& document = node->document();
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+ DocumentLifecycle::DisallowTransitionScope disallowTransition(document.lifecycle());
std::unique_ptr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document);
AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache->get());
AXObject* axObject = cacheImpl->getOrCreate(node);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698