Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: Source/core/layout/HitTestResult.cpp

Issue 1306743002: [Editing][Codehealth] Replace Position::uptream/downstream to mostBackward/ForwardCaretPosition. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 Position(m_innerNode, PositionAnchorType::BeforeChildren).downstr eam(); 166 return mostBackwardCaretPosition(Position(m_innerNode, PositionAnchorTyp e::BeforeChildren));
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698