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

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

Issue 2371483002: Update PDF accessibility when zoom level changes (Closed)
Patch Set: Cleaned up, ready for review 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
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 de8c4e877fc57a99631c6ed4d22e149a63aaa690..410342bb7edc23000dd3733d26ed2a14e82fdfec 100644
--- a/content/renderer/accessibility/render_accessibility_impl.cc
+++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -259,6 +259,14 @@ void RenderAccessibilityImpl::SetPdfTreeSource(
pdf_tree_source_ = pdf_tree_source;
pdf_serializer_.reset(new PdfAXTreeSerializer(pdf_tree_source_));
+ OnPdfRootNodeUpdated();
+}
+
+void RenderAccessibilityImpl::OnPdfRootNodeUpdated() {
+ // Search the accessibility tree for an EMBED element and post a
+ // children changed notification on it to force it to update the
+ // PDF accessibility tree.
+
ScopedFreezeBlinkAXTreeSource freeze(&tree_source_);
WebAXObject root = tree_source_.GetRoot();
if (!root.updateLayoutAndCheckValidity())

Powered by Google App Engine
This is Rietveld 408576698