Chromium Code Reviews| 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, 2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 #include "core/html/HTMLCollection.h" | 44 #include "core/html/HTMLCollection.h" |
| 45 #include "core/html/HTMLFrameOwnerElement.h" | 45 #include "core/html/HTMLFrameOwnerElement.h" |
| 46 #include "core/html/HTMLTagCollection.h" | 46 #include "core/html/HTMLTagCollection.h" |
| 47 #include "core/html/RadioNodeList.h" | 47 #include "core/html/RadioNodeList.h" |
| 48 #include "core/inspector/InspectorInstrumentation.h" | 48 #include "core/inspector/InspectorInstrumentation.h" |
| 49 #include "core/layout/LayoutInline.h" | 49 #include "core/layout/LayoutInline.h" |
| 50 #include "core/layout/LayoutText.h" | 50 #include "core/layout/LayoutText.h" |
| 51 #include "core/layout/LayoutTheme.h" | 51 #include "core/layout/LayoutTheme.h" |
| 52 #include "core/layout/LayoutView.h" | 52 #include "core/layout/LayoutView.h" |
| 53 #include "core/layout/line/InlineTextBox.h" | 53 #include "core/layout/line/InlineTextBox.h" |
| 54 #include "core/page/scrolling/SnapCoordinator.h" | |
| 54 #include "platform/EventDispatchForbiddenScope.h" | 55 #include "platform/EventDispatchForbiddenScope.h" |
| 55 #include "platform/ScriptForbiddenScope.h" | 56 #include "platform/ScriptForbiddenScope.h" |
| 56 | 57 |
| 57 namespace blink { | 58 namespace blink { |
| 58 | 59 |
| 59 using namespace HTMLNames; | 60 using namespace HTMLNames; |
| 60 | 61 |
| 61 static void dispatchChildInsertionEvents(Node&); | 62 static void dispatchChildInsertionEvents(Node&); |
| 62 static void dispatchChildRemovalEvents(Node&); | 63 static void dispatchChildRemovalEvents(Node&); |
| 63 | 64 |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 865 for (ShadowRoot* shadowRoot = node.youngestShadowRoot(); shadowRoot; sha dowRoot = shadowRoot->olderShadowRoot()) | 866 for (ShadowRoot* shadowRoot = node.youngestShadowRoot(); shadowRoot; sha dowRoot = shadowRoot->olderShadowRoot()) |
| 866 notifyNodeRemoved(*shadowRoot); | 867 notifyNodeRemoved(*shadowRoot); |
| 867 } | 868 } |
| 868 } | 869 } |
| 869 | 870 |
| 870 void ContainerNode::attach(const AttachContext& context) | 871 void ContainerNode::attach(const AttachContext& context) |
| 871 { | 872 { |
| 872 attachChildren(context); | 873 attachChildren(context); |
| 873 clearChildNeedsStyleRecalc(); | 874 clearChildNeedsStyleRecalc(); |
| 874 Node::attach(context); | 875 Node::attach(context); |
| 876 | |
| 877 if (document().frame() && document().frame()->snapCoordinator()) | |
|
esprehn
2015/09/24 17:37:41
ditto checking for frame() doesn't make sense, thi
majidvp
2015/10/15 21:47:02
Done.
| |
| 878 document().frame()->snapCoordinator()->attach(*this); | |
| 875 } | 879 } |
| 876 | 880 |
| 877 void ContainerNode::detach(const AttachContext& context) | 881 void ContainerNode::detach(const AttachContext& context) |
| 878 { | 882 { |
| 879 detachChildren(context); | 883 detachChildren(context); |
| 880 setChildNeedsStyleRecalc(); | 884 setChildNeedsStyleRecalc(); |
| 885 if (document().frame() && document().frame()->snapCoordinator()) | |
| 886 document().frame()->snapCoordinator()->detach(*this); | |
|
esprehn
2015/09/24 17:37:41
frame() checks here don't make sense, we must have
majidvp
2015/10/15 21:47:02
Done.
| |
| 887 | |
| 881 Node::detach(context); | 888 Node::detach(context); |
| 882 } | 889 } |
| 883 | 890 |
| 884 void ContainerNode::childrenChanged(const ChildrenChange& change) | 891 void ContainerNode::childrenChanged(const ChildrenChange& change) |
| 885 { | 892 { |
| 886 document().incDOMTreeVersion(); | 893 document().incDOMTreeVersion(); |
| 887 if (!change.byParser && change.type != TextChanged) | 894 if (!change.byParser && change.type != TextChanged) |
| 888 document().updateRangesAfterChildrenChanged(this); | 895 document().updateRangesAfterChildrenChanged(this); |
| 889 invalidateNodeListCachesInAncestors(); | 896 invalidateNodeListCachesInAncestors(); |
| 890 if (change.isChildInsertion() && !childNeedsStyleRecalc()) { | 897 if (change.isChildInsertion() && !childNeedsStyleRecalc()) { |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1526 return true; | 1533 return true; |
| 1527 | 1534 |
| 1528 if (node->isElementNode() && toElement(node)->shadow()) | 1535 if (node->isElementNode() && toElement(node)->shadow()) |
| 1529 return true; | 1536 return true; |
| 1530 | 1537 |
| 1531 return false; | 1538 return false; |
| 1532 } | 1539 } |
| 1533 #endif | 1540 #endif |
| 1534 | 1541 |
| 1535 } // namespace blink | 1542 } // namespace blink |
| OLD | NEW |