| OLD | NEW |
| 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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 // PseudoElements and VTTElements. It's possible we can just eliminate all the c
hecks | 963 // PseudoElements and VTTElements. It's possible we can just eliminate all the c
hecks |
| 964 // since those elements will never have class names, inline style, or other thin
gs that | 964 // since those elements will never have class names, inline style, or other thin
gs that |
| 965 // this apparently guards against. | 965 // this apparently guards against. |
| 966 bool Node::isStyledElement() const | 966 bool Node::isStyledElement() const |
| 967 { | 967 { |
| 968 return isHTMLElement() || isSVGElement() || (isElementNode() && toElement(th
is)->namespaceURI() == MathMLNames::mathmlNamespaceURI); | 968 return isHTMLElement() || isSVGElement() || (isElementNode() && toElement(th
is)->namespaceURI() == MathMLNames::mathmlNamespaceURI); |
| 969 } | 969 } |
| 970 | 970 |
| 971 bool Node::canParticipateInFlatTree() const | 971 bool Node::canParticipateInFlatTree() const |
| 972 { | 972 { |
| 973 // TODO(hayato): Return false for pseudo elements. |
| 973 return !isShadowRoot() && !isSlotOrActiveInsertionPoint(); | 974 return !isShadowRoot() && !isSlotOrActiveInsertionPoint(); |
| 974 } | 975 } |
| 975 | 976 |
| 976 bool Node::isSlotOrActiveInsertionPoint() const | 977 bool Node::isSlotOrActiveInsertionPoint() const |
| 977 { | 978 { |
| 978 return isHTMLSlotElement(*this) || isActiveInsertionPoint(*this); | 979 return isHTMLSlotElement(*this) || isActiveInsertionPoint(*this); |
| 979 } | 980 } |
| 980 | 981 |
| 981 AtomicString Node::slotName() const | 982 AtomicString Node::slotName() const |
| 982 { | 983 { |
| (...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2177 DCHECK(insertionPoint->containingShadowRoot()); | 2178 DCHECK(insertionPoint->containingShadowRoot()); |
| 2178 if (!insertionPoint->containingShadowRoot()->isOpenOrV0()) | 2179 if (!insertionPoint->containingShadowRoot()->isOpenOrV0()) |
| 2179 break; | 2180 break; |
| 2180 filteredInsertionPoints.append(insertionPoint); | 2181 filteredInsertionPoints.append(insertionPoint); |
| 2181 } | 2182 } |
| 2182 return StaticNodeList::adopt(filteredInsertionPoints); | 2183 return StaticNodeList::adopt(filteredInsertionPoints); |
| 2183 } | 2184 } |
| 2184 | 2185 |
| 2185 HTMLSlotElement* Node::assignedSlot() const | 2186 HTMLSlotElement* Node::assignedSlot() const |
| 2186 { | 2187 { |
| 2188 DCHECK(!isPseudoElement()); |
| 2187 if (ShadowRoot* root = v1ShadowRootOfParent()) | 2189 if (ShadowRoot* root = v1ShadowRootOfParent()) |
| 2188 return root->ensureSlotAssignment().findSlot(*this); | 2190 return root->ensureSlotAssignment().findSlot(*this); |
| 2189 return nullptr; | 2191 return nullptr; |
| 2190 } | 2192 } |
| 2191 | 2193 |
| 2192 HTMLSlotElement* Node::assignedSlotForBinding() | 2194 HTMLSlotElement* Node::assignedSlotForBinding() |
| 2193 { | 2195 { |
| 2194 updateDistribution(); | 2196 updateDistribution(); |
| 2195 if (ShadowRoot* root = v1ShadowRootOfParent()) { | 2197 if (ShadowRoot* root = v1ShadowRootOfParent()) { |
| 2196 if (root->type() == ShadowRootType::Open) | 2198 if (root->type() == ShadowRootType::Open) |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2429 | 2431 |
| 2430 void showNodePath(const blink::Node* node) | 2432 void showNodePath(const blink::Node* node) |
| 2431 { | 2433 { |
| 2432 if (node) | 2434 if (node) |
| 2433 node->showNodePathForThis(); | 2435 node->showNodePathForThis(); |
| 2434 else | 2436 else |
| 2435 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2437 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2436 } | 2438 } |
| 2437 | 2439 |
| 2438 #endif | 2440 #endif |
| OLD | NEW |