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

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

Issue 935283002: Rename {Author,UserAgent}ShadowRoot to {Open,Closed}ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix inspector tests Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/HitTestResult.h ('k') | Source/core/layout/LayerScrollableArea.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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod e->pseudoId() == BEFORE) 131 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod e->pseudoId() == BEFORE)
132 return Position(m_innerNode, Position::PositionIsBeforeChildren).downstr eam(); 132 return Position(m_innerNode, Position::PositionIsBeforeChildren).downstr eam();
133 return renderer->positionForPoint(localPoint()); 133 return renderer->positionForPoint(localPoint());
134 } 134 }
135 135
136 LayoutObject* HitTestResult::renderer() const 136 LayoutObject* HitTestResult::renderer() const
137 { 137 {
138 return m_innerNode ? m_innerNode->renderer() : 0; 138 return m_innerNode ? m_innerNode->renderer() : 0;
139 } 139 }
140 140
141 void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() 141 void HitTestResult::setToShadowHostIfInClosedShadowRoot()
142 { 142 {
143 if (Node* node = innerNode()) { 143 if (Node* node = innerNode()) {
144 if (ShadowRoot* containingShadowRoot = node->containingShadowRoot()) { 144 if (ShadowRoot* containingShadowRoot = node->containingShadowRoot()) {
145 if (containingShadowRoot->type() == ShadowRoot::UserAgentShadowRoot) 145 if (containingShadowRoot->type() == ShadowRoot::ClosedShadowRoot)
146 setInnerNode(node->shadowHost()); 146 setInnerNode(node->shadowHost());
147 } 147 }
148 } 148 }
149 149
150 if (Node* node = innerNonSharedNode()) { 150 if (Node* node = innerNonSharedNode()) {
151 if (ShadowRoot* containingShadowRoot = node->containingShadowRoot()) { 151 if (ShadowRoot* containingShadowRoot = node->containingShadowRoot()) {
152 if (containingShadowRoot->type() == ShadowRoot::UserAgentShadowRoot) 152 if (containingShadowRoot->type() == ShadowRoot::ClosedShadowRoot)
153 setInnerNonSharedNode(node->shadowHost()); 153 setInnerNonSharedNode(node->shadowHost());
154 } 154 }
155 } 155 }
156 } 156 }
157 157
158 void HitTestResult::setInnerNode(Node* n) 158 void HitTestResult::setInnerNode(Node* n)
159 { 159 {
160 m_innerPossiblyPseudoNode = n; 160 m_innerPossiblyPseudoNode = n;
161 if (n && n->isPseudoElement()) 161 if (n && n->isPseudoElement())
162 n = n->parentOrShadowHostNode(); 162 n = n->parentOrShadowHostNode();
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 { 467 {
468 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(*node)) { 468 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(*node)) {
469 if (node->isElementNode()) 469 if (node->isElementNode())
470 return toElement(node); 470 return toElement(node);
471 } 471 }
472 472
473 return 0; 473 return 0;
474 } 474 }
475 475
476 } // namespace blink 476 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/HitTestResult.h ('k') | Source/core/layout/LayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698