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

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

Issue 48633006: Teach V8GCController how to traverse TemplateContentDocumentFragment::host (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add proper traversal for minor GC Created 7 years, 1 month 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
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 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 1139
1140 if (parent->isShadowRoot()) 1140 if (parent->isShadowRoot())
1141 return toShadowRoot(parent)->host(); 1141 return toShadowRoot(parent)->host();
1142 1142
1143 if (!parent->isElementNode()) 1143 if (!parent->isElementNode())
1144 return 0; 1144 return 0;
1145 1145
1146 return toElement(parent); 1146 return toElement(parent);
1147 } 1147 }
1148 1148
1149 ContainerNode* Node::parentOrShadowHostOrTemplateHostNode() const
1150 {
1151 if (isDocumentFragment() && toDocumentFragment(this)->isTemplateContent())
1152 return static_cast<const TemplateContentDocumentFragment*>(this)->host() ;
1153 return parentOrShadowHostNode();
1154 }
1155
1149 bool Node::isBlockFlowElement() const 1156 bool Node::isBlockFlowElement() const
1150 { 1157 {
1151 return isElementNode() && renderer() && renderer()->isRenderBlockFlow(); 1158 return isElementNode() && renderer() && renderer()->isRenderBlockFlow();
1152 } 1159 }
1153 1160
1154 Element *Node::enclosingBlockFlowElement() const 1161 Element *Node::enclosingBlockFlowElement() const
1155 { 1162 {
1156 Node *n = const_cast<Node *>(this); 1163 Node *n = const_cast<Node *>(this);
1157 if (isBlockFlowElement()) 1164 if (isBlockFlowElement())
1158 return toElement(n); 1165 return toElement(n);
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 node->showTreeForThis(); 2637 node->showTreeForThis();
2631 } 2638 }
2632 2639
2633 void showNodePath(const WebCore::Node* node) 2640 void showNodePath(const WebCore::Node* node)
2634 { 2641 {
2635 if (node) 2642 if (node)
2636 node->showNodePathForThis(); 2643 node->showNodePathForThis();
2637 } 2644 }
2638 2645
2639 #endif 2646 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698