| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 #endif | 157 #endif |
| 158 } | 158 } |
| 159 | 159 |
| 160 PositionWithAffinity HitTestResult::position() const | 160 PositionWithAffinity HitTestResult::position() const |
| 161 { | 161 { |
| 162 if (!m_innerPossiblyPseudoNode) | 162 if (!m_innerPossiblyPseudoNode) |
| 163 return PositionWithAffinity(); | 163 return PositionWithAffinity(); |
| 164 LayoutObject* layoutObject = this->layoutObject(); | 164 LayoutObject* layoutObject = this->layoutObject(); |
| 165 if (!layoutObject) | 165 if (!layoutObject) |
| 166 return PositionWithAffinity(); | 166 return PositionWithAffinity(); |
| 167 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod
e->getPseudoId() == BEFORE) | 167 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod
e->getPseudoId() == PseudoIdBefore) |
| 168 return mostForwardCaretPosition(Position(m_innerNode, PositionAnchorType
::BeforeChildren)); | 168 return mostForwardCaretPosition(Position(m_innerNode, PositionAnchorType
::BeforeChildren)); |
| 169 return layoutObject->positionForPoint(localPoint()); | 169 return layoutObject->positionForPoint(localPoint()); |
| 170 } | 170 } |
| 171 | 171 |
| 172 LayoutObject* HitTestResult::layoutObject() const | 172 LayoutObject* HitTestResult::layoutObject() const |
| 173 { | 173 { |
| 174 return m_innerNode ? m_innerNode->layoutObject() : 0; | 174 return m_innerNode ? m_innerNode->layoutObject() : 0; |
| 175 } | 175 } |
| 176 | 176 |
| 177 void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() | 177 void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 else if (isHTMLMapElement(m_innerNode)) | 542 else if (isHTMLMapElement(m_innerNode)) |
| 543 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); | 543 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); |
| 544 | 544 |
| 545 if (!imageMapImageElement) | 545 if (!imageMapImageElement) |
| 546 return m_innerNode.get(); | 546 return m_innerNode.get(); |
| 547 | 547 |
| 548 return imageMapImageElement; | 548 return imageMapImageElement; |
| 549 } | 549 } |
| 550 | 550 |
| 551 } // namespace blink | 551 } // namespace blink |
| OLD | NEW |