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, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 void updateAncestorConnectedSubframeCountForRemoval() const; | 666 void updateAncestorConnectedSubframeCountForRemoval() const; |
667 void updateAncestorConnectedSubframeCountForInsertion() const; | 667 void updateAncestorConnectedSubframeCountForInsertion() const; |
668 | 668 |
669 PassRefPtr<NodeList> getDestinationInsertionPoints(); | 669 PassRefPtr<NodeList> getDestinationInsertionPoints(); |
670 | 670 |
671 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl
ag); } | 671 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl
ag); } |
672 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } | 672 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } |
673 | 673 |
674 bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChi
ldrenFlag); } | 674 bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChi
ldrenFlag); } |
675 | 675 |
676 virtual void trace(Visitor*) { } | 676 virtual void trace(Visitor*); |
677 | 677 |
678 private: | 678 private: |
679 enum NodeFlags { | 679 enum NodeFlags { |
680 IsTextFlag = 1, | 680 IsTextFlag = 1, |
681 IsContainerFlag = 1 << 1, | 681 IsContainerFlag = 1 << 1, |
682 IsElementFlag = 1 << 2, | 682 IsElementFlag = 1 << 2, |
683 IsHTMLFlag = 1 << 3, | 683 IsHTMLFlag = 1 << 3, |
684 IsSVGFlag = 1 << 4, | 684 IsSVGFlag = 1 << 4, |
685 | 685 |
686 ChildNeedsDistributionRecalc = 1 << 5, | 686 ChildNeedsDistributionRecalc = 1 << 5, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 | 748 |
749 Node(TreeScope* treeScope, ConstructionType type) | 749 Node(TreeScope* treeScope, ConstructionType type) |
750 : m_nodeFlags(type) | 750 : m_nodeFlags(type) |
751 , m_parentOrShadowHostNode(0) | 751 , m_parentOrShadowHostNode(0) |
752 , m_treeScope(treeScope) | 752 , m_treeScope(treeScope) |
753 , m_previous(0) | 753 , m_previous(0) |
754 , m_next(0) | 754 , m_next(0) |
755 { | 755 { |
756 ASSERT(m_treeScope || type == CreateDocument || type == CreateShadowRoot
); | 756 ASSERT(m_treeScope || type == CreateDocument || type == CreateShadowRoot
); |
757 ScriptWrappable::init(this); | 757 ScriptWrappable::init(this); |
| 758 #if !ENABLE(OILPAN) |
758 if (m_treeScope) | 759 if (m_treeScope) |
759 m_treeScope->guardRef(); | 760 m_treeScope->guardRef(); |
| 761 #endif |
760 | 762 |
761 #if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS) | 763 #if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS) |
762 trackForDebugging(); | 764 trackForDebugging(); |
763 #endif | 765 #endif |
764 InspectorCounters::incrementCounter(InspectorCounters::NodeCounter); | 766 InspectorCounters::incrementCounter(InspectorCounters::NodeCounter); |
765 } | 767 } |
766 | 768 |
767 virtual void didMoveToNewDocument(Document& oldDocument); | 769 virtual void didMoveToNewDocument(Document& oldDocument); |
768 | 770 |
769 static void reattachWhitespaceSiblings(Text* start); | 771 static void reattachWhitespaceSiblings(Text* start); |
770 | 772 |
| 773 #if !ENABLE(OILPAN) |
771 void willBeDeletedFromDocument(); | 774 void willBeDeletedFromDocument(); |
| 775 #endif |
772 | 776 |
773 bool hasRareData() const { return getFlag(HasRareDataFlag); } | 777 bool hasRareData() const { return getFlag(HasRareDataFlag); } |
774 | 778 |
775 NodeRareData* rareData() const; | 779 NodeRareData* rareData() const; |
776 NodeRareData& ensureRareData(); | 780 NodeRareData& ensureRareData(); |
777 void clearRareData(); | 781 void clearRareData(); |
778 | 782 |
| 783 #if !ENABLE(OILPAN) |
779 void clearEventTargetData(); | 784 void clearEventTargetData(); |
| 785 #endif |
780 | 786 |
781 void setHasCustomStyleCallbacks() { setFlag(true, HasCustomStyleCallbacksFla
g); } | 787 void setHasCustomStyleCallbacks() { setFlag(true, HasCustomStyleCallbacksFla
g); } |
782 | 788 |
783 void setTreeScope(TreeScope* scope) { m_treeScope = scope; } | 789 void setTreeScope(TreeScope* scope) { m_treeScope = scope; } |
784 | 790 |
785 // isTreeScopeInitialized() can be false | 791 // isTreeScopeInitialized() can be false |
786 // - in the destruction of Document or ShadowRoot where m_treeScope is set t
o null or | 792 // - in the destruction of Document or ShadowRoot where m_treeScope is set t
o null or |
787 // - in the Node constructor called by these two classes where m_treeScope i
s set by TreeScope ctor. | 793 // - in the Node constructor called by these two classes where m_treeScope i
s set by TreeScope ctor. |
788 bool isTreeScopeInitialized() const { return m_treeScope; } | 794 bool isTreeScopeInitialized() const { return m_treeScope; } |
789 | 795 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 | 827 |
822 virtual RenderStyle* virtualComputedStyle(PseudoId = NOPSEUDO); | 828 virtual RenderStyle* virtualComputedStyle(PseudoId = NOPSEUDO); |
823 | 829 |
824 void trackForDebugging(); | 830 void trackForDebugging(); |
825 | 831 |
826 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration> >* mutatio
nObserverRegistry(); | 832 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration> >* mutatio
nObserverRegistry(); |
827 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration> >* transi
entMutationObserverRegistry(); | 833 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration> >* transi
entMutationObserverRegistry(); |
828 | 834 |
829 mutable uint32_t m_nodeFlags; | 835 mutable uint32_t m_nodeFlags; |
830 ContainerNode* m_parentOrShadowHostNode; | 836 ContainerNode* m_parentOrShadowHostNode; |
831 TreeScope* m_treeScope; | 837 RawPtrWillBeMember<TreeScope> m_treeScope; |
832 Node* m_previous; | 838 Node* m_previous; |
833 Node* m_next; | 839 Node* m_next; |
834 // When a node has rare data we move the renderer into the rare data. | 840 // When a node has rare data we move the renderer into the rare data. |
835 union DataUnion { | 841 union DataUnion { |
836 DataUnion() : m_renderer(0) { } | 842 DataUnion() : m_renderer(0) { } |
837 RenderObject* m_renderer; | 843 RenderObject* m_renderer; |
838 NodeRareDataBase* m_rareData; | 844 NodeRareDataBase* m_rareData; |
839 } m_data; | 845 } m_data; |
840 }; | 846 }; |
841 | 847 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 } // namespace WebCore | 916 } // namespace WebCore |
911 | 917 |
912 #ifndef NDEBUG | 918 #ifndef NDEBUG |
913 // Outside the WebCore namespace for ease of invocation from gdb. | 919 // Outside the WebCore namespace for ease of invocation from gdb. |
914 void showNode(const WebCore::Node*); | 920 void showNode(const WebCore::Node*); |
915 void showTree(const WebCore::Node*); | 921 void showTree(const WebCore::Node*); |
916 void showNodePath(const WebCore::Node*); | 922 void showNodePath(const WebCore::Node*); |
917 #endif | 923 #endif |
918 | 924 |
919 #endif | 925 #endif |
OLD | NEW |