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

Side by Side Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 179163004: Have Document::topDocument() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (!topDoc) 224 if (!topDoc)
225 return 0; 225 return 0;
226 226
227 return topDoc->renderView(); 227 return topDoc->renderView();
228 } 228 }
229 229
230 Document* AXRenderObject::topDocument() const 230 Document* AXRenderObject::topDocument() const
231 { 231 {
232 if (!document()) 232 if (!document())
233 return 0; 233 return 0;
234 return document()->topDocument(); 234 return &document()->topDocument();
235 } 235 }
236 236
237 bool AXRenderObject::shouldNotifyActiveDescendant() const 237 bool AXRenderObject::shouldNotifyActiveDescendant() const
238 { 238 {
239 // We want to notify that the combo box has changed its active descendant, 239 // We want to notify that the combo box has changed its active descendant,
240 // but we do not want to change the focus, because focus should remain with the combo box. 240 // but we do not want to change the focus, because focus should remain with the combo box.
241 if (isComboBox()) 241 if (isComboBox())
242 return true; 242 return true;
243 243
244 return shouldFocusActiveDescendant(); 244 return shouldFocusActiveDescendant();
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 if (label && label->renderer()) { 2323 if (label && label->renderer()) {
2324 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2324 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2325 result.unite(labelRect); 2325 result.unite(labelRect);
2326 } 2326 }
2327 } 2327 }
2328 2328
2329 return result; 2329 return result;
2330 } 2330 }
2331 2331
2332 } // namespace WebCore 2332 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698