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

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

Issue 8863001: Revert 113267 - Attempt fixes at chrome frame tests redness. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const WebDocument& document = GetMainDocument(); 162 const WebDocument& document = GetMainDocument();
163 if (document.isNull()) 163 if (document.isNull())
164 return; 164 return;
165 165
166 if (notification != WebKit::WebAccessibilityNotificationLoadComplete && 166 if (notification != WebKit::WebAccessibilityNotificationLoadComplete &&
167 !sent_load_complete_) { 167 !sent_load_complete_) {
168 // Load complete should be our first notification sent. Send it manually 168 // Load complete should be our first notification sent. Send it manually
169 // in cases where we don't get it first to avoid focus problems. 169 // in cases where we don't get it first to avoid focus problems.
170 PostAccessibilityNotification( 170 PostAccessibilityNotification(
171 document.accessibilityObject(), 171 document.accessibilityObject(),
172 WebKit::WebAccessibilityNotificationLayoutComplete); 172 WebKit::WebAccessibilityNotificationLoadComplete);
173 } 173 }
174 174
175 gfx::Size scroll_offset = document.frame()->scrollOffset(); 175 gfx::Size scroll_offset = document.frame()->scrollOffset();
176 if (scroll_offset != last_scroll_offset_) { 176 if (scroll_offset != last_scroll_offset_) {
177 // Make sure the browser is always aware of the scroll position of 177 // Make sure the browser is always aware of the scroll position of
178 // the root document element by posting a generic notification that 178 // the root document element by posting a generic notification that
179 // will update it. 179 // will update it.
180 // TODO(dmazzoni): remove this as soon as 180 // TODO(dmazzoni): remove this as soon as
181 // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed. 181 // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed.
182 last_scroll_offset_ = scroll_offset; 182 last_scroll_offset_ = scroll_offset;
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 WebDocument RendererAccessibility::GetMainDocument() { 524 WebDocument RendererAccessibility::GetMainDocument() {
525 WebView* view = render_view()->GetWebView(); 525 WebView* view = render_view()->GetWebView();
526 WebFrame* main_frame = view ? view->mainFrame() : NULL; 526 WebFrame* main_frame = view ? view->mainFrame() : NULL;
527 527
528 if (main_frame) 528 if (main_frame)
529 return main_frame->document(); 529 return main_frame->document();
530 else 530 else
531 return WebDocument(); 531 return WebDocument();
532 } 532 }
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