Chromium Code Reviews| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 KURL AXImageMapLink::url() const | 97 KURL AXImageMapLink::url() const |
| 98 { | 98 { |
| 99 if (!areaElement()) | 99 if (!areaElement()) |
| 100 return KURL(); | 100 return KURL(); |
| 101 | 101 |
| 102 return areaElement()->href(); | 102 return areaElement()->href(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 LayoutRect AXImageMapLink::elementRect() const | 105 LayoutRect AXImageMapLink::elementRect() const |
| 106 { | 106 { |
| 107 HTMLAreaElement* area = areaElement(); | 107 if (HTMLAreaElement* area = areaElement()) |
| 108 HTMLMapElement* map = mapElement(); | 108 return area->computeAbsoluteRect(); |
|
pdr.
2016/04/23 03:32:22
We seem to have lost this code which uses the mapE
Xianzhu
2016/04/25 23:18:15
I gave up changing this in this CL. Filed bug 6065
| |
| 109 if (!area || !map) | 109 return LayoutRect(); |
| 110 return LayoutRect(); | |
| 111 | |
| 112 LayoutObject* layoutObject; | |
| 113 if (m_parent && m_parent->isAXLayoutObject()) | |
|
pdr.
2016/04/23 03:32:23
We no longer have this accessibility code which se
| |
| 114 layoutObject = toAXLayoutObject(m_parent)->getLayoutObject(); | |
| 115 else | |
| 116 layoutObject = map->layoutObject(); | |
| 117 | |
| 118 if (!layoutObject) | |
| 119 return LayoutRect(); | |
| 120 | |
| 121 return area->computeRect(layoutObject); | |
| 122 } | 110 } |
| 123 | 111 |
| 124 DEFINE_TRACE(AXImageMapLink) | 112 DEFINE_TRACE(AXImageMapLink) |
| 125 { | 113 { |
| 126 AXNodeObject::trace(visitor); | 114 AXNodeObject::trace(visitor); |
| 127 } | 115 } |
| 128 | 116 |
| 129 } // namespace blink | 117 } // namespace blink |
| OLD | NEW |