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

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

Issue 22331005: Clean up accessibility enums for use in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add forgotten file back Created 7 years, 3 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 if (!m_mapElement.get() || !m_mapElement->renderer()) 66 if (!m_mapElement.get() || !m_mapElement->renderer())
67 return 0; 67 return 0;
68 68
69 return m_mapElement->document()->axObjectCache()->getOrCreate(m_mapElement-> renderer()); 69 return m_mapElement->document()->axObjectCache()->getOrCreate(m_mapElement-> renderer());
70 } 70 }
71 71
72 AccessibilityRole AccessibilityImageMapLink::roleValue() const 72 AccessibilityRole AccessibilityImageMapLink::roleValue() const
73 { 73 {
74 if (!m_areaElement) 74 if (!m_areaElement)
75 return WebCoreLinkRole; 75 return LinkRole;
76 76
77 const AtomicString& ariaRole = getAttribute(roleAttr); 77 const AtomicString& ariaRole = getAttribute(roleAttr);
78 if (!ariaRole.isEmpty()) 78 if (!ariaRole.isEmpty())
79 return AccessibilityObject::ariaRoleToWebCoreRole(ariaRole); 79 return AccessibilityObject::ariaRoleToWebCoreRole(ariaRole);
80 80
81 return WebCoreLinkRole; 81 return LinkRole;
82 } 82 }
83 83
84 Element* AccessibilityImageMapLink::actionElement() const 84 Element* AccessibilityImageMapLink::actionElement() const
85 { 85 {
86 return anchorElement(); 86 return anchorElement();
87 } 87 }
88 88
89 Element* AccessibilityImageMapLink::anchorElement() const 89 Element* AccessibilityImageMapLink::anchorElement() const
90 { 90 {
91 return m_areaElement.get(); 91 return m_areaElement.get();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 else 149 else
150 renderer = m_mapElement->renderer(); 150 renderer = m_mapElement->renderer();
151 151
152 if (!renderer) 152 if (!renderer)
153 return LayoutRect(); 153 return LayoutRect();
154 154
155 return m_areaElement->computeRect(renderer); 155 return m_areaElement->computeRect(renderer);
156 } 156 }
157 157
158 } // namespace WebCore 158 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXObjectCache.cpp ('k') | Source/core/accessibility/AccessibilityNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698