| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 // Relevant DOM Standard: | 2367 // Relevant DOM Standard: |
| 2368 // https://dom.spec.whatwg.org/#concept-node-insert | 2368 // https://dom.spec.whatwg.org/#concept-node-insert |
| 2369 // - 6.1.3: If parent is a slot whose assigned nodes is the empty list, then | 2369 // - 6.1.3: If parent is a slot whose assigned nodes is the empty list, then |
| 2370 // run signal a slot change for parent. | 2370 // run signal a slot change for parent. |
| 2371 // https://dom.spec.whatwg.org/#concept-node-remove | 2371 // https://dom.spec.whatwg.org/#concept-node-remove |
| 2372 // - 11. If parent is a slot whose assigned nodes is the empty list, then | 2372 // - 11. If parent is a slot whose assigned nodes is the empty list, then |
| 2373 // run signal a slot change for parent. | 2373 // run signal a slot change for parent. |
| 2374 Element* parent = parentElement(); | 2374 Element* parent = parentElement(); |
| 2375 if (parent && isHTMLSlotElement(parent)) { | 2375 if (parent && isHTMLSlotElement(parent)) { |
| 2376 HTMLSlotElement& parentSlot = toHTMLSlotElement(*parent); | 2376 HTMLSlotElement& parentSlot = toHTMLSlotElement(*parent); |
| 2377 // TODO(hayato): Support slotchange for slots in non-shadow trees. |
| 2377 if (ShadowRoot* root = containingShadowRoot()) { | 2378 if (ShadowRoot* root = containingShadowRoot()) { |
| 2378 if (root && root->isV1() && !parentSlot.hasAssignedNodesSlow()) | 2379 if (root && root->isV1() && !parentSlot.hasAssignedNodesSlow()) |
| 2379 parentSlot.enqueueSlotChangeEvent(); | 2380 parentSlot.enqueueSlotChangeEvent(); |
| 2380 } | 2381 } |
| 2381 } | 2382 } |
| 2382 } | 2383 } |
| 2383 } | 2384 } |
| 2384 | 2385 |
| 2385 DEFINE_TRACE(Node) { | 2386 DEFINE_TRACE(Node) { |
| 2386 visitor->trace(m_parentOrShadowHostNode); | 2387 visitor->trace(m_parentOrShadowHostNode); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2468 if (node) { | 2469 if (node) { |
| 2469 std::stringstream stream; | 2470 std::stringstream stream; |
| 2470 node->printNodePathTo(stream); | 2471 node->printNodePathTo(stream); |
| 2471 LOG(INFO) << stream.str(); | 2472 LOG(INFO) << stream.str(); |
| 2472 } else { | 2473 } else { |
| 2473 LOG(INFO) << "Cannot showNodePath for <null>"; | 2474 LOG(INFO) << "Cannot showNodePath for <null>"; |
| 2474 } | 2475 } |
| 2475 } | 2476 } |
| 2476 | 2477 |
| 2477 #endif | 2478 #endif |
| OLD | NEW |