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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 #include "core/frame/LocalFrame.h" | 79 #include "core/frame/LocalFrame.h" |
80 #include "core/html/HTMLDialogElement.h" | 80 #include "core/html/HTMLDialogElement.h" |
81 #include "core/html/HTMLFrameOwnerElement.h" | 81 #include "core/html/HTMLFrameOwnerElement.h" |
82 #include "core/html/HTMLSlotElement.h" | 82 #include "core/html/HTMLSlotElement.h" |
83 #include "core/input/EventHandler.h" | 83 #include "core/input/EventHandler.h" |
84 #include "core/layout/LayoutBox.h" | 84 #include "core/layout/LayoutBox.h" |
85 #include "core/page/ContextMenuController.h" | 85 #include "core/page/ContextMenuController.h" |
86 #include "core/page/Page.h" | 86 #include "core/page/Page.h" |
87 #include "core/svg/graphics/SVGImage.h" | 87 #include "core/svg/graphics/SVGImage.h" |
88 #include "platform/EventDispatchForbiddenScope.h" | 88 #include "platform/EventDispatchForbiddenScope.h" |
| 89 #include "platform/RuntimeEnabledFeatures.h" |
89 #include "platform/TraceEvent.h" | 90 #include "platform/TraceEvent.h" |
90 #include "platform/TracedValue.h" | 91 #include "platform/TracedValue.h" |
91 #include "wtf/HashSet.h" | 92 #include "wtf/HashSet.h" |
92 #include "wtf/Partitions.h" | 93 #include "wtf/Partitions.h" |
93 #include "wtf/PassOwnPtr.h" | 94 #include "wtf/PassOwnPtr.h" |
94 #include "wtf/Vector.h" | 95 #include "wtf/Vector.h" |
95 #include "wtf/text/CString.h" | 96 #include "wtf/text/CString.h" |
96 #include "wtf/text/StringBuilder.h" | 97 #include "wtf/text/StringBuilder.h" |
97 | 98 |
98 namespace blink { | 99 namespace blink { |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 { | 685 { |
685 ScriptForbiddenScope forbidScriptDuringRawIteration; | 686 ScriptForbiddenScope forbidScriptDuringRawIteration; |
686 for (Node* node = parentOrShadowHostNode(); node && !node->childNeedsStyleIn
validation(); node = node->parentOrShadowHostNode()) | 687 for (Node* node = parentOrShadowHostNode(); node && !node->childNeedsStyleIn
validation(); node = node->parentOrShadowHostNode()) |
687 node->setChildNeedsStyleInvalidation(); | 688 node->setChildNeedsStyleInvalidation(); |
688 document().scheduleLayoutTreeUpdateIfNeeded(); | 689 document().scheduleLayoutTreeUpdateIfNeeded(); |
689 } | 690 } |
690 | 691 |
691 void Node::markAncestorsWithChildNeedsDistributionRecalc() | 692 void Node::markAncestorsWithChildNeedsDistributionRecalc() |
692 { | 693 { |
693 ScriptForbiddenScope forbidScriptDuringRawIteration; | 694 ScriptForbiddenScope forbidScriptDuringRawIteration; |
694 if (inDocument() && !document().childNeedsDistributionRecalc()) { | 695 if (RuntimeEnabledFeatures::shadowDOMV1Enabled() && inDocument() && !documen
t().childNeedsDistributionRecalc()) { |
695 // TODO(hayato): Support a non-document composed tree. | 696 // TODO(hayato): Support a non-document composed tree. |
696 // TODO(hayato): Enqueue a task only if a 'slotchange' event listner is
registered in the document composed tree. | 697 // TODO(hayato): Enqueue a task only if a 'slotchange' event listner is
registered in the document composed tree. |
697 Microtask::enqueueMicrotask(WTF::bind(&Document::updateDistribution, Pas
sRefPtrWillBeRawPtr<Document>(&document()))); | 698 Microtask::enqueueMicrotask(WTF::bind(&Document::updateDistribution, Pas
sRefPtrWillBeRawPtr<Document>(&document()))); |
698 } | 699 } |
699 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node
= node->parentOrShadowHostNode()) | 700 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node
= node->parentOrShadowHostNode()) |
700 node->setChildNeedsDistributionRecalc(); | 701 node->setChildNeedsDistributionRecalc(); |
701 document().scheduleLayoutTreeUpdateIfNeeded(); | 702 document().scheduleLayoutTreeUpdateIfNeeded(); |
702 } | 703 } |
703 | 704 |
704 inline void Node::setStyleChange(StyleChangeType changeType) | 705 inline void Node::setStyleChange(StyleChangeType changeType) |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 | 2432 |
2432 void showNodePath(const blink::Node* node) | 2433 void showNodePath(const blink::Node* node) |
2433 { | 2434 { |
2434 if (node) | 2435 if (node) |
2435 node->showNodePathForThis(); | 2436 node->showNodePathForThis(); |
2436 else | 2437 else |
2437 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2438 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2438 } | 2439 } |
2439 | 2440 |
2440 #endif | 2441 #endif |
OLD | NEW |