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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 2876973003: Rename *Focus*-methods of FrameSelection to clarify its public API (Closed)
Patch Set: Created 3 years, 7 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
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 if (!focused_element) 442 if (!focused_element)
443 return false; 443 return false;
444 AXObject* focused_object = AxObjectCache().GetOrCreate(focused_element); 444 AXObject* focused_object = AxObjectCache().GetOrCreate(focused_element);
445 if (!focused_object || !focused_object->IsAXLayoutObject()) 445 if (!focused_object || !focused_object->IsAXLayoutObject())
446 return false; 446 return false;
447 447
448 // A web area is represented by the Document node in the DOM tree, which isn't 448 // A web area is represented by the Document node in the DOM tree, which isn't
449 // focusable. Check instead if the frame's selection controller is focused 449 // focusable. Check instead if the frame's selection controller is focused
450 if (focused_object == this || 450 if (focused_object == this ||
451 (RoleValue() == kWebAreaRole && 451 (RoleValue() == kWebAreaRole &&
452 GetDocument()->GetFrame()->Selection().IsFocusedAndActive())) 452 GetDocument()->GetFrame()->Selection().FrameIsFocusedAndActive()))
453 return true; 453 return true;
454 454
455 return false; 455 return false;
456 } 456 }
457 457
458 bool AXLayoutObject::IsSelected() const { 458 bool AXLayoutObject::IsSelected() const {
459 if (!GetLayoutObject() || !GetNode()) 459 if (!GetLayoutObject() || !GetNode())
460 return false; 460 return false;
461 461
462 const AtomicString& aria_selected = GetAttribute(aria_selectedAttr); 462 const AtomicString& aria_selected = GetAttribute(aria_selectedAttr);
(...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 2519
2520 bool AXLayoutObject::ElementAttributeValue( 2520 bool AXLayoutObject::ElementAttributeValue(
2521 const QualifiedName& attribute_name) const { 2521 const QualifiedName& attribute_name) const {
2522 if (!layout_object_) 2522 if (!layout_object_)
2523 return false; 2523 return false;
2524 2524
2525 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); 2525 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true");
2526 } 2526 }
2527 2527
2528 } // namespace blink 2528 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ImagePainter.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698