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

Unified Diff: content/renderer/accessibility/render_accessibility_impl.cc

Issue 2294623002: RenderAccessibilityImpl::SnapshotAccessibilityTree should ensure layout clean. (Closed)
Patch Set: Created 4 years, 4 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: content/renderer/accessibility/render_accessibility_impl.cc
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc
index 64e9f6e6b72aa03d7fcf0d9c48d0f4aad818472b..8b253ccb537b777302128382ceaf5e8161a6ebf7 100644
--- a/content/renderer/accessibility/render_accessibility_impl.cc
+++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -58,8 +58,11 @@ void RenderAccessibilityImpl::SnapshotAccessibilityTree(
WebDocument document = render_frame->GetWebFrame()->document();
WebScopedAXContext context(document);
+ WebAXObject root = context.root();
+ if (!root.updateLayoutAndCheckValidity())
+ return;
BlinkAXTreeSource tree_source(render_frame);
- tree_source.SetRoot(context.root());
+ tree_source.SetRoot(root);
BlinkAXTreeSerializer serializer(&tree_source);
serializer.set_max_node_count(kMaxSnapshotNodeCount);
serializer.SerializeChanges(context.root(), response);
« 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