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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 374133002: Remove remaining callers of deprecatedShadowAncestorNode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio n() : true; 1134 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio n() : true;
1135 } 1135 }
1136 1136
1137 Element* Node::shadowHost() const 1137 Element* Node::shadowHost() const
1138 { 1138 {
1139 if (ShadowRoot* root = containingShadowRoot()) 1139 if (ShadowRoot* root = containingShadowRoot())
1140 return root->host(); 1140 return root->host();
1141 return 0; 1141 return 0;
1142 } 1142 }
1143 1143
1144 Node* Node::deprecatedShadowAncestorNode() const
1145 {
1146 if (ShadowRoot* root = containingShadowRoot())
1147 return root->host();
1148
1149 return const_cast<Node*>(this);
1150 }
1151
1152 ShadowRoot* Node::containingShadowRoot() const 1144 ShadowRoot* Node::containingShadowRoot() const
1153 { 1145 {
1154 Node& root = treeScope().rootNode(); 1146 Node& root = treeScope().rootNode();
1155 return root.isShadowRoot() ? toShadowRoot(&root) : 0; 1147 return root.isShadowRoot() ? toShadowRoot(&root) : 0;
1156 } 1148 }
1157 1149
1158 Node* Node::nonBoundaryShadowTreeRootNode() 1150 Node* Node::nonBoundaryShadowTreeRootNode()
1159 { 1151 {
1160 ASSERT(!isShadowRoot()); 1152 ASSERT(!isShadowRoot());
1161 Node* root = this; 1153 Node* root = this;
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 node->showTreeForThis(); 2561 node->showTreeForThis();
2570 } 2562 }
2571 2563
2572 void showNodePath(const WebCore::Node* node) 2564 void showNodePath(const WebCore::Node* node)
2573 { 2565 {
2574 if (node) 2566 if (node)
2575 node->showNodePathForThis(); 2567 node->showNodePathForThis();
2576 } 2568 }
2577 2569
2578 #endif 2570 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698