| 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-2011, 2013, 2014 Apple Inc. All rights reserved. | 6 * Copyright (C) 2003-2011, 2013, 2014 Apple 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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 if (!elementData() || !elementData()->isUnique()) | 791 if (!elementData() || !elementData()->isUnique()) |
| 792 createUniqueElementData(); | 792 createUniqueElementData(); |
| 793 return toUniqueElementData(*m_elementData); | 793 return toUniqueElementData(*m_elementData); |
| 794 } | 794 } |
| 795 | 795 |
| 796 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
rtionPoint) | 796 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
rtionPoint) |
| 797 { | 797 { |
| 798 ASSERT(!childNeedsStyleInvalidation()); | 798 ASSERT(!childNeedsStyleInvalidation()); |
| 799 ASSERT(!needsStyleInvalidation()); | 799 ASSERT(!needsStyleInvalidation()); |
| 800 ASSERT(insertionPoint->inDocument() || isContainerNode()); | 800 ASSERT(insertionPoint->inDocument() || isContainerNode()); |
| 801 if (insertionPoint->inDocument()) | 801 if (insertionPoint->inDocument()) { |
| 802 setFlag(InDocumentFlag); | 802 setFlag(InDocumentFlag); |
| 803 insertionPoint->document().incrementNodeCount(); |
| 804 } |
| 803 if (parentOrShadowHostNode()->isInShadowTree()) | 805 if (parentOrShadowHostNode()->isInShadowTree()) |
| 804 setFlag(IsInShadowTreeFlag); | 806 setFlag(IsInShadowTreeFlag); |
| 805 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio
nRecalc()) | 807 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio
nRecalc()) |
| 806 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); | 808 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); |
| 807 return InsertionDone; | 809 return InsertionDone; |
| 808 } | 810 } |
| 809 | 811 |
| 810 inline void Node::removedFrom(ContainerNode* insertionPoint) | 812 inline void Node::removedFrom(ContainerNode* insertionPoint) |
| 811 { | 813 { |
| 812 ASSERT(insertionPoint->inDocument() || isContainerNode() || isInShadowTree()
); | 814 ASSERT(insertionPoint->inDocument() || isContainerNode() || isInShadowTree()
); |
| 813 if (insertionPoint->inDocument()) | 815 if (insertionPoint->inDocument()) { |
| 814 clearFlag(InDocumentFlag); | 816 clearFlag(InDocumentFlag); |
| 817 insertionPoint->document().decrementNodeCount(); |
| 818 } |
| 815 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) | 819 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) |
| 816 clearFlag(IsInShadowTreeFlag); | 820 clearFlag(IsInShadowTreeFlag); |
| 817 if (AXObjectCache* cache = document().existingAXObjectCache()) | 821 if (AXObjectCache* cache = document().existingAXObjectCache()) |
| 818 cache->remove(this); | 822 cache->remove(this); |
| 819 } | 823 } |
| 820 | 824 |
| 821 inline void Element::invalidateStyleAttribute() | 825 inline void Element::invalidateStyleAttribute() |
| 822 { | 826 { |
| 823 ASSERT(elementData()); | 827 ASSERT(elementData()); |
| 824 elementData()->m_styleAttributeIsDirty = true; | 828 elementData()->m_styleAttributeIsDirty = true; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 896 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
| 893 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 897 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 894 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 898 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
| 895 { \ | 899 { \ |
| 896 return adoptRefWillBeNoop(new T(tagName, document)); \ | 900 return adoptRefWillBeNoop(new T(tagName, document)); \ |
| 897 } | 901 } |
| 898 | 902 |
| 899 } // namespace | 903 } // namespace |
| 900 | 904 |
| 901 #endif // Element_h | 905 #endif // Element_h |
| OLD | NEW |