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

Unified Diff: content/renderer/renderer_accessibility.cc

Issue 8748019: Make sure the document's scroll position is always up-to-date before... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « content/renderer/renderer_accessibility.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_accessibility.cc
===================================================================
--- content/renderer/renderer_accessibility.cc (revision 111700)
+++ content/renderer/renderer_accessibility.cc (working copy)
@@ -81,6 +81,7 @@
: content::RenderViewObserver(render_view),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
browser_root_(NULL),
+ last_scroll_offset_(gfx::Size()),
ack_pending_(false),
logging_(false),
sent_load_complete_(false) {
@@ -164,6 +165,19 @@
WebKit::WebAccessibilityNotificationLoadComplete);
}
+ gfx::Size scroll_offset = document.frame()->scrollOffset();
+ if (scroll_offset != last_scroll_offset_) {
+ // Make sure the browser is always aware of the scroll position of
+ // the root document element by posting a generic notification that
+ // will update it.
+ // TODO(dmazzoni): remove this as soon as
+ // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed.
+ last_scroll_offset_ = scroll_offset;
+ PostAccessibilityNotification(
+ document.accessibilityObject(),
+ WebKit::WebAccessibilityNotificationLayoutComplete);
+ }
+
if (notification == WebKit::WebAccessibilityNotificationLoadComplete)
sent_load_complete_ = true;
« no previous file with comments | « content/renderer/renderer_accessibility.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698