| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 HTMLMapElement* AXImageMapLink::mapElement() const | 54 HTMLMapElement* AXImageMapLink::mapElement() const |
| 55 { | 55 { |
| 56 HTMLAreaElement* area = areaElement(); | 56 HTMLAreaElement* area = areaElement(); |
| 57 if (!area) | 57 if (!area) |
| 58 return nullptr; | 58 return nullptr; |
| 59 return Traversal<HTMLMapElement>::firstAncestor(*area); | 59 return Traversal<HTMLMapElement>::firstAncestor(*area); |
| 60 } | 60 } |
| 61 | 61 |
| 62 AXObject* AXImageMapLink::computeParent() const | 62 AXObject* AXImageMapLink::computeParent() const |
| 63 { | 63 { |
| 64 ASSERT(!isDetached()); |
| 64 if (m_parent) | 65 if (m_parent) |
| 65 return m_parent; | 66 return m_parent; |
| 66 | 67 |
| 67 if (!mapElement()) | 68 if (!mapElement()) |
| 68 return nullptr; | 69 return nullptr; |
| 69 | 70 |
| 70 return axObjectCache().getOrCreate(mapElement()->layoutObject()); | 71 return axObjectCache().getOrCreate(mapElement()->layoutObject()); |
| 71 } | 72 } |
| 72 | 73 |
| 73 AccessibilityRole AXImageMapLink::roleValue() const | 74 AccessibilityRole AXImageMapLink::roleValue() const |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 145 |
| 145 return area->computeRect(layoutObject); | 146 return area->computeRect(layoutObject); |
| 146 } | 147 } |
| 147 | 148 |
| 148 DEFINE_TRACE(AXImageMapLink) | 149 DEFINE_TRACE(AXImageMapLink) |
| 149 { | 150 { |
| 150 AXNodeObject::trace(visitor); | 151 AXNodeObject::trace(visitor); |
| 151 } | 152 } |
| 152 | 153 |
| 153 } // namespace blink | 154 } // namespace blink |
| OLD | NEW |