OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 HTMLMapElement* AXImageMapLink::mapElement() const { | 53 HTMLMapElement* AXImageMapLink::mapElement() const { |
54 HTMLAreaElement* area = areaElement(); | 54 HTMLAreaElement* area = areaElement(); |
55 if (!area) | 55 if (!area) |
56 return nullptr; | 56 return nullptr; |
57 return Traversal<HTMLMapElement>::firstAncestor(*area); | 57 return Traversal<HTMLMapElement>::firstAncestor(*area); |
58 } | 58 } |
59 | 59 |
60 AXObject* AXImageMapLink::computeParent() const { | 60 AXObject* AXImageMapLink::computeParent() const { |
61 ASSERT(!isDetached()); | 61 DCHECK(!isDetached()); |
62 if (m_parent) | 62 if (m_parent) |
63 return m_parent; | 63 return m_parent; |
64 | 64 |
65 if (!mapElement()) | 65 if (!mapElement()) |
66 return nullptr; | 66 return nullptr; |
67 | 67 |
68 return axObjectCache().getOrCreate(mapElement()->layoutObject()); | 68 return axObjectCache().getOrCreate(mapElement()->layoutObject()); |
69 } | 69 } |
70 | 70 |
71 AccessibilityRole AXImageMapLink::roleValue() const { | 71 AccessibilityRole AXImageMapLink::roleValue() const { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 outBoundsInContainer = area->getPath(layoutObject).boundingRect(); | 122 outBoundsInContainer = area->getPath(layoutObject).boundingRect(); |
123 *outContainer = axObjectCache().getOrCreate(layoutObject); | 123 *outContainer = axObjectCache().getOrCreate(layoutObject); |
124 } | 124 } |
125 | 125 |
126 DEFINE_TRACE(AXImageMapLink) { | 126 DEFINE_TRACE(AXImageMapLink) { |
127 AXNodeObject::trace(visitor); | 127 AXNodeObject::trace(visitor); |
128 } | 128 } |
129 | 129 |
130 } // namespace blink | 130 } // namespace blink |
OLD | NEW |