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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 | 157 |
158 PositionWithAffinity HitTestResult::position() const | 158 PositionWithAffinity HitTestResult::position() const |
159 { | 159 { |
160 if (!m_innerPossiblyPseudoNode) | 160 if (!m_innerPossiblyPseudoNode) |
161 return PositionWithAffinity(); | 161 return PositionWithAffinity(); |
162 LayoutObject* layoutObject = this->layoutObject(); | 162 LayoutObject* layoutObject = this->layoutObject(); |
163 if (!layoutObject) | 163 if (!layoutObject) |
164 return PositionWithAffinity(); | 164 return PositionWithAffinity(); |
165 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod
e->pseudoId() == BEFORE) | 165 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod
e->pseudoId() == BEFORE) |
166 return mostBackwardCaretPosition(Position(m_innerNode, PositionAnchorTyp
e::BeforeChildren)); | 166 return Position(m_innerNode, PositionAnchorType::BeforeChildren).downstr
eam(); |
167 return layoutObject->positionForPoint(localPoint()); | 167 return layoutObject->positionForPoint(localPoint()); |
168 } | 168 } |
169 | 169 |
170 LayoutObject* HitTestResult::layoutObject() const | 170 LayoutObject* HitTestResult::layoutObject() const |
171 { | 171 { |
172 return m_innerNode ? m_innerNode->layoutObject() : 0; | 172 return m_innerNode ? m_innerNode->layoutObject() : 0; |
173 } | 173 } |
174 | 174 |
175 void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() | 175 void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() |
176 { | 176 { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 else if (isHTMLMapElement(m_innerNode)) | 523 else if (isHTMLMapElement(m_innerNode)) |
524 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); | 524 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); |
525 | 525 |
526 if (!imageMapImageElement) | 526 if (!imageMapImageElement) |
527 return m_innerNode.get(); | 527 return m_innerNode.get(); |
528 | 528 |
529 return imageMapImageElement; | 529 return imageMapImageElement; |
530 } | 530 } |
531 | 531 |
532 } // namespace blink | 532 } // namespace blink |
OLD | NEW |