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

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

Issue 2788523002: Finish all string attributes for Accessibility Object Model Phase 1. (Closed)
Patch Set: notifyAttributeChanged Created 3 years, 8 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 11 matching lines...) Expand all
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "modules/accessibility/AXImageMapLink.h" 29 #include "modules/accessibility/AXImageMapLink.h"
30 30
31 #include "SkMatrix44.h" 31 #include "SkMatrix44.h"
32 #include "core/dom/AccessibleNode.h"
32 #include "core/dom/ElementTraversal.h" 33 #include "core/dom/ElementTraversal.h"
33 #include "modules/accessibility/AXLayoutObject.h" 34 #include "modules/accessibility/AXLayoutObject.h"
34 #include "modules/accessibility/AXObjectCacheImpl.h" 35 #include "modules/accessibility/AXObjectCacheImpl.h"
35 #include "platform/graphics/Path.h" 36 #include "platform/graphics/Path.h"
36 37
37 namespace blink { 38 namespace blink {
38 39
39 using namespace HTMLNames; 40 using namespace HTMLNames;
40 41
41 AXImageMapLink::AXImageMapLink(HTMLAreaElement* area, 42 AXImageMapLink::AXImageMapLink(HTMLAreaElement* area,
(...skipping 19 matching lines...) Expand all
61 if (m_parent) 62 if (m_parent)
62 return m_parent; 63 return m_parent;
63 64
64 if (!mapElement()) 65 if (!mapElement())
65 return nullptr; 66 return nullptr;
66 67
67 return axObjectCache().getOrCreate(mapElement()->layoutObject()); 68 return axObjectCache().getOrCreate(mapElement()->layoutObject());
68 } 69 }
69 70
70 AccessibilityRole AXImageMapLink::roleValue() const { 71 AccessibilityRole AXImageMapLink::roleValue() const {
71 const AtomicString& ariaRole = getAttribute(roleAttr); 72 const AtomicString& ariaRole =
73 getAOMPropertyOrARIAAttribute(AOMStringProperty::kRole);
72 if (!ariaRole.isEmpty()) 74 if (!ariaRole.isEmpty())
73 return AXObject::ariaRoleToWebCoreRole(ariaRole); 75 return AXObject::ariaRoleToWebCoreRole(ariaRole);
74 76
75 return LinkRole; 77 return LinkRole;
76 } 78 }
77 79
78 bool AXImageMapLink::computeAccessibilityIsIgnored( 80 bool AXImageMapLink::computeAccessibilityIsIgnored(
79 IgnoredReasons* ignoredReasons) const { 81 IgnoredReasons* ignoredReasons) const {
80 return accessibilityIsIgnoredByDefault(ignoredReasons); 82 return accessibilityIsIgnoredByDefault(ignoredReasons);
81 } 83 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 121
120 outBoundsInContainer = area->getPath(layoutObject).boundingRect(); 122 outBoundsInContainer = area->getPath(layoutObject).boundingRect();
121 *outContainer = axObjectCache().getOrCreate(layoutObject); 123 *outContainer = axObjectCache().getOrCreate(layoutObject);
122 } 124 }
123 125
124 DEFINE_TRACE(AXImageMapLink) { 126 DEFINE_TRACE(AXImageMapLink) {
125 AXNodeObject::trace(visitor); 127 AXNodeObject::trace(visitor);
126 } 128 }
127 129
128 } // namespace blink 130 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698