| 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 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl
e Inc. All rights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl
e Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 | 821 |
| 822 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
rtionPoint) | 822 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
rtionPoint) |
| 823 { | 823 { |
| 824 ASSERT(insertionPoint->inDocument() || isContainerNode()); | 824 ASSERT(insertionPoint->inDocument() || isContainerNode()); |
| 825 if (insertionPoint->inDocument()) | 825 if (insertionPoint->inDocument()) |
| 826 setFlag(InDocumentFlag); | 826 setFlag(InDocumentFlag); |
| 827 if (parentOrShadowHostNode()->isInShadowTree()) | 827 if (parentOrShadowHostNode()->isInShadowTree()) |
| 828 setFlag(IsInShadowTreeFlag); | 828 setFlag(IsInShadowTreeFlag); |
| 829 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio
nRecalc()) | 829 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio
nRecalc()) |
| 830 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); | 830 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); |
| 831 if (!insertionPoint->childNeedsStyleRecalc()) |
| 832 insertionPoint->markAncestorsWithChildNeedsStyleRecalc(); |
| 831 return InsertionDone; | 833 return InsertionDone; |
| 832 } | 834 } |
| 833 | 835 |
| 834 inline void Node::removedFrom(ContainerNode* insertionPoint) | 836 inline void Node::removedFrom(ContainerNode* insertionPoint) |
| 835 { | 837 { |
| 836 ASSERT(insertionPoint->inDocument() || isContainerNode()); | 838 ASSERT(insertionPoint->inDocument() || isContainerNode()); |
| 837 if (insertionPoint->inDocument()) | 839 if (insertionPoint->inDocument()) |
| 838 clearFlag(InDocumentFlag); | 840 clearFlag(InDocumentFlag); |
| 839 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) | 841 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) |
| 840 clearFlag(IsInShadowTreeFlag); | 842 clearFlag(IsInShadowTreeFlag); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return element.predicate; } \ | 883 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return element.predicate; } \ |
| 882 DEFINE_NODE_TYPE_CASTS(thisType, predicate) | 884 DEFINE_NODE_TYPE_CASTS(thisType, predicate) |
| 883 | 885 |
| 884 #define DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \ | 886 #define DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \ |
| 885 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return is##thisType(element); } \ | 887 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return is##thisType(element); } \ |
| 886 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) | 888 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) |
| 887 | 889 |
| 888 } // namespace | 890 } // namespace |
| 889 | 891 |
| 890 #endif | 892 #endif |
| OLD | NEW |