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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 return renderer->positionForPoint(localPoint()); | 136 return renderer->positionForPoint(localPoint()); |
137 } | 137 } |
138 | 138 |
139 RenderObject* HitTestResult::renderer() const | 139 RenderObject* HitTestResult::renderer() const |
140 { | 140 { |
141 if (!m_innerNode) | 141 if (!m_innerNode) |
142 return 0; | 142 return 0; |
143 RenderObject* renderer = m_innerNode->renderer(); | 143 RenderObject* renderer = m_innerNode->renderer(); |
144 if (!m_isFirstLetter || !renderer || !renderer->isText() || !toRenderText(re nderer)->isTextFragment()) | 144 if (!m_isFirstLetter || !renderer || !renderer->isText() || !toRenderText(re nderer)->isTextFragment()) |
145 return renderer; | 145 return renderer; |
146 return toRenderTextFragment(renderer)->firstRenderTextInFirstLetter(); | 146 |
147 // FIXME(dsinclair): First letter renderer | |
148 ASSERT_NOT_REACHED(); | |
dsinclair
2014/09/27 03:21:21
This doesn't trip on any layout tests. I'm going t
esprehn
2014/09/30 09:00:31
I don't think this can happen now, any hit that wo
dsinclair
2014/09/30 21:46:34
Done. I removed the m_isFirstLetter variable since
| |
147 } | 149 } |
148 | 150 |
149 void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() | 151 void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() |
150 { | 152 { |
151 if (Node* node = innerNode()) { | 153 if (Node* node = innerNode()) { |
152 if (ShadowRoot* containingShadowRoot = node->containingShadowRoot()) { | 154 if (ShadowRoot* containingShadowRoot = node->containingShadowRoot()) { |
153 if (containingShadowRoot->type() == ShadowRoot::UserAgentShadowRoot) | 155 if (containingShadowRoot->type() == ShadowRoot::UserAgentShadowRoot) |
154 setInnerNode(node->shadowHost()); | 156 setInnerNode(node->shadowHost()); |
155 } | 157 } |
156 } | 158 } |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 { | 475 { |
474 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node)) { | 476 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node)) { |
475 if (node->isElementNode()) | 477 if (node->isElementNode()) |
476 return toElement(node); | 478 return toElement(node); |
477 } | 479 } |
478 | 480 |
479 return 0; | 481 return 0; |
480 } | 482 } |
481 | 483 |
482 } // namespace blink | 484 } // namespace blink |
OLD | NEW |