| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 HTMLMapElement* map = imageElement->treeScope().getImageMap( | 211 HTMLMapElement* map = imageElement->treeScope().getImageMap( |
| 212 imageElement->fastGetAttribute(usemapAttr)); | 212 imageElement->fastGetAttribute(usemapAttr)); |
| 213 if (!map) | 213 if (!map) |
| 214 return nullptr; | 214 return nullptr; |
| 215 | 215 |
| 216 return map->areaForPoint(localPoint(), imageElement->layoutObject()); | 216 return map->areaForPoint(localPoint(), imageElement->layoutObject()); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void HitTestResult::setInnerNode(Node* n) { | 219 void HitTestResult::setInnerNode(Node* n) { |
| 220 m_innerPossiblyPseudoNode = n; | 220 m_innerPossiblyPseudoNode = n; |
| 221 if (n && n->isPseudoElement()) | 221 if (!n) { |
| 222 m_innerNode = n; |
| 223 return; |
| 224 } |
| 225 if (n->isPseudoElement()) |
| 222 n = toPseudoElement(n)->findAssociatedNode(); | 226 n = toPseudoElement(n)->findAssociatedNode(); |
| 223 m_innerNode = n; | 227 m_innerNode = n; |
| 224 if (HTMLAreaElement* area = imageAreaForImage()) { | 228 if (HTMLAreaElement* area = imageAreaForImage()) { |
| 225 m_innerNode = area; | 229 m_innerNode = area; |
| 226 m_innerPossiblyPseudoNode = area; | 230 m_innerPossiblyPseudoNode = area; |
| 227 } | 231 } |
| 228 } | 232 } |
| 229 | 233 |
| 230 void HitTestResult::setURLElement(Element* n) { | 234 void HitTestResult::setURLElement(Element* n) { |
| 231 m_innerURLElement = n; | 235 m_innerURLElement = n; |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 else if (isHTMLMapElement(m_innerNode)) | 520 else if (isHTMLMapElement(m_innerNode)) |
| 517 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); | 521 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); |
| 518 | 522 |
| 519 if (!imageMapImageElement) | 523 if (!imageMapImageElement) |
| 520 return m_innerNode.get(); | 524 return m_innerNode.get(); |
| 521 | 525 |
| 522 return imageMapImageElement; | 526 return imageMapImageElement; |
| 523 } | 527 } |
| 524 | 528 |
| 525 } // namespace blink | 529 } // namespace blink |
| OLD | NEW |