summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 19:49:20 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 19:49:20 +0000
commitfcb79b5c168c96495641cb431c351a4b10d16555 (patch)
tree000de56d6bd8f9060c390ce90158b479c5d157bb /content
parentae67374948bc8c9009025972683cb1ba15b3ef9d (diff)
downloadchromium_src-fcb79b5c168c96495641cb431c351a4b10d16555.zip
chromium_src-fcb79b5c168c96495641cb431c351a4b10d16555.tar.gz
chromium_src-fcb79b5c168c96495641cb431c351a4b10d16555.tar.bz2
Do not ignore notifications that come before a LoadComplete.
In the browser, we currently assume that a page has not loaded until a load complete comes from the renderer. However, this does not appear to be the way WebKit behaves. One can move the focus on a webpage that has not completely loaded for example. In such cases, this patch sends a "fake" load complete to keep with our assumptions before allowing the original notification to go through our previous logic. BUG=90787,93232 TEST=manual (OS X only). Review URL: http://codereview.chromium.org/7712018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/renderer/render_view.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index c25e2f3..c752985 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -4065,14 +4065,17 @@ void RenderView::postAccessibilityNotification(
const WebAccessibilityObject& obj,
WebAccessibilityNotification notification) {
if (!accessibility_.get() && webview()) {
- // Load complete should be our first notification sent.
- // TODO(ctguil): Investigate if a different notification is a WebCore bug.
- if (notification != WebKit::WebAccessibilityNotificationLoadComplete)
- return;
-
// Create and initialize our accessibility cache
accessibility_.reset(WebAccessibilityCache::create());
accessibility_->initialize(webview());
+
+ // Load complete should be our first notification sent. Send it manually
+ // in cases where we don't get it first to avoid focus problems.
+ // TODO(ctguil): Investigate if a different notification is a WebCore bug.
+ if (notification != WebKit::WebAccessibilityNotificationLoadComplete) {
+ postAccessibilityNotification(accessibility_->getObjectById(1000),
+ WebKit::WebAccessibilityNotificationLoadComplete);
+ }
}
if (!accessibility_->isCached(obj)) {