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 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 DCHECK(insertionPoint->containingShadowRoot()); | 2158 DCHECK(insertionPoint->containingShadowRoot()); |
2159 if (!insertionPoint->containingShadowRoot()->isOpenOrV0()) | 2159 if (!insertionPoint->containingShadowRoot()->isOpenOrV0()) |
2160 break; | 2160 break; |
2161 filteredInsertionPoints.append(insertionPoint); | 2161 filteredInsertionPoints.append(insertionPoint); |
2162 } | 2162 } |
2163 return StaticNodeList::adopt(filteredInsertionPoints); | 2163 return StaticNodeList::adopt(filteredInsertionPoints); |
2164 } | 2164 } |
2165 | 2165 |
2166 HTMLSlotElement* Node::assignedSlot() const | 2166 HTMLSlotElement* Node::assignedSlot() const |
2167 { | 2167 { |
2168 #if DCHECK_IS_ON() | |
2169 DCHECK(!needsDistributionRecalc()); | |
2170 #endif | |
2171 Element* parent = parentElement(); | 2168 Element* parent = parentElement(); |
2172 ShadowRoot* root = parent ? parent->youngestShadowRoot() : nullptr; | 2169 ShadowRoot* root = parent ? parent->youngestShadowRoot() : nullptr; |
2173 if (root && root->isV1()) | 2170 if (root && root->isV1()) |
2174 return root->assignedSlotFor(*this); | 2171 return root->assignedSlotFor(*this); |
2175 return nullptr; | 2172 return nullptr; |
2176 } | 2173 } |
2177 | 2174 |
2178 HTMLSlotElement* Node::assignedSlotForBinding() | 2175 HTMLSlotElement* Node::assignedSlotForBinding() |
2179 { | 2176 { |
2180 updateDistribution(); | 2177 updateDistribution(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 } | 2240 } |
2244 | 2241 |
2245 DCHECK(isHTMLElement() || isSVGElement()); | 2242 DCHECK(isHTMLElement() || isSVGElement()); |
2246 setFlag(CustomElementFlag); | 2243 setFlag(CustomElementFlag); |
2247 setFlag(newState == Upgraded, CustomElementUpgradedFlag); | 2244 setFlag(newState == Upgraded, CustomElementUpgradedFlag); |
2248 | 2245 |
2249 if (oldState == NotCustomElement || newState == Upgraded) | 2246 if (oldState == NotCustomElement || newState == Upgraded) |
2250 toElement(this)->pseudoStateChanged(CSSSelector::PseudoUnresolved); | 2247 toElement(this)->pseudoStateChanged(CSSSelector::PseudoUnresolved); |
2251 } | 2248 } |
2252 | 2249 |
| 2250 void Node::updateAssignmentForInsertedInto(ContainerNode* insertionPoint) |
| 2251 { |
| 2252 if (isShadowHost(insertionPoint)) { |
| 2253 ShadowRoot* root = insertionPoint->youngestShadowRoot(); |
| 2254 if (root && root->isV1()) |
| 2255 root->assignV1(); |
| 2256 } |
| 2257 } |
| 2258 |
2253 DEFINE_TRACE(Node) | 2259 DEFINE_TRACE(Node) |
2254 { | 2260 { |
2255 visitor->trace(m_parentOrShadowHostNode); | 2261 visitor->trace(m_parentOrShadowHostNode); |
2256 visitor->trace(m_previous); | 2262 visitor->trace(m_previous); |
2257 visitor->trace(m_next); | 2263 visitor->trace(m_next); |
2258 // rareData() and m_data.m_layoutObject share their storage. We have to trac
e | 2264 // rareData() and m_data.m_layoutObject share their storage. We have to trac
e |
2259 // only one of them. | 2265 // only one of them. |
2260 if (hasRareData()) | 2266 if (hasRareData()) |
2261 visitor->trace(rareData()); | 2267 visitor->trace(rareData()); |
2262 | 2268 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2326 | 2332 |
2327 void showNodePath(const blink::Node* node) | 2333 void showNodePath(const blink::Node* node) |
2328 { | 2334 { |
2329 if (node) | 2335 if (node) |
2330 node->showNodePathForThis(); | 2336 node->showNodePathForThis(); |
2331 else | 2337 else |
2332 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2338 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2333 } | 2339 } |
2334 | 2340 |
2335 #endif | 2341 #endif |
OLD | NEW |