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

Side by Side Diff: content/renderer/renderer_accessibility.cc

Issue 8824009: Attempt fixes at chrome frame tests redness. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "content/common/view_messages.h" 6 #include "content/common/view_messages.h"
7 #include "content/public/common/content_switches.h" 7 #include "content/public/common/content_switches.h"
8 #include "content/renderer/render_view_impl.h" 8 #include "content/renderer/render_view_impl.h"
9 #include "content/renderer/renderer_accessibility.h" 9 #include "content/renderer/renderer_accessibility.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 WebAccessibilityNotification notification) { 151 WebAccessibilityNotification notification) {
152 if (!WebAccessibilityObject::accessibilityEnabled()) 152 if (!WebAccessibilityObject::accessibilityEnabled())
153 return; 153 return;
154 154
155 const WebDocument& document = GetMainDocument(); 155 const WebDocument& document = GetMainDocument();
156 if (document.isNull()) 156 if (document.isNull())
157 return; 157 return;
158 158
159 if (notification != WebKit::WebAccessibilityNotificationLoadComplete && 159 if (notification != WebKit::WebAccessibilityNotificationLoadComplete &&
160 !sent_load_complete_) { 160 !sent_load_complete_) {
161 // Load complete should be our first notification sent. Send it manually 161 // Load complete should be our first notification sent. Send it manually
Raghu Simha 2011/12/06 22:25:04 nit: Should this comment be changed to indicate th
162 // in cases where we don't get it first to avoid focus problems. 162 // in cases where we don't get it first to avoid focus problems.
163 PostAccessibilityNotification( 163 PostAccessibilityNotification(
164 document.accessibilityObject(), 164 document.accessibilityObject(),
165 WebKit::WebAccessibilityNotificationLoadComplete); 165 WebKit::WebAccessibilityNotificationLayoutComplete);
166 } 166 }
167 167
168 gfx::Size scroll_offset = document.frame()->scrollOffset(); 168 gfx::Size scroll_offset = document.frame()->scrollOffset();
169 if (scroll_offset != last_scroll_offset_) { 169 if (scroll_offset != last_scroll_offset_) {
170 // Make sure the browser is always aware of the scroll position of 170 // Make sure the browser is always aware of the scroll position of
171 // the root document element by posting a generic notification that 171 // the root document element by posting a generic notification that
172 // will update it. 172 // will update it.
173 // TODO(dmazzoni): remove this as soon as 173 // TODO(dmazzoni): remove this as soon as
174 // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed. 174 // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed.
175 last_scroll_offset_ = scroll_offset; 175 last_scroll_offset_ = scroll_offset;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 WebDocument RendererAccessibility::GetMainDocument() { 440 WebDocument RendererAccessibility::GetMainDocument() {
441 WebView* view = render_view()->GetWebView(); 441 WebView* view = render_view()->GetWebView();
442 WebFrame* main_frame = view ? view->mainFrame() : NULL; 442 WebFrame* main_frame = view ? view->mainFrame() : NULL;
443 443
444 if (main_frame) 444 if (main_frame)
445 return main_frame->document(); 445 return main_frame->document();
446 else 446 else
447 return WebDocument(); 447 return WebDocument();
448 } 448 }
OLDNEW
« 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