Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/core/dom/Node.h

Issue 208933003: Remove SiblingRuleHelper (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tighten types to ContainerNode Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ElementRareData.h ('k') | Source/core/dom/NodeRareData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // DOM methods & attributes for Node 166 // DOM methods & attributes for Node
167 167
168 bool hasTagName(const QualifiedName&) const; 168 bool hasTagName(const QualifiedName&) const;
169 virtual String nodeName() const = 0; 169 virtual String nodeName() const = 0;
170 virtual String nodeValue() const; 170 virtual String nodeValue() const;
171 virtual void setNodeValue(const String&); 171 virtual void setNodeValue(const String&);
172 virtual NodeType nodeType() const = 0; 172 virtual NodeType nodeType() const = 0;
173 ContainerNode* parentNode() const; 173 ContainerNode* parentNode() const;
174 Element* parentElement() const; 174 Element* parentElement() const;
175 Node* parentElementOrShadowRoot() const; 175 ContainerNode* parentElementOrShadowRoot() const;
176 Node* previousSibling() const { return m_previous; } 176 Node* previousSibling() const { return m_previous; }
177 Node* nextSibling() const { return m_next; } 177 Node* nextSibling() const { return m_next; }
178 PassRefPtr<NodeList> childNodes(); 178 PassRefPtr<NodeList> childNodes();
179 Node* firstChild() const; 179 Node* firstChild() const;
180 Node* lastChild() const; 180 Node* lastChild() const;
181 181
182 void remove(ExceptionState&); 182 void remove(ExceptionState&);
183 183
184 Node* pseudoAwareNextSibling() const; 184 Node* pseudoAwareNextSibling() const;
185 Node* pseudoAwarePreviousSibling() const; 185 Node* pseudoAwarePreviousSibling() const;
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 void incrementConnectedSubframeCount(unsigned amount = 1); 665 void incrementConnectedSubframeCount(unsigned amount = 1);
666 void decrementConnectedSubframeCount(unsigned amount = 1); 666 void decrementConnectedSubframeCount(unsigned amount = 1);
667 void updateAncestorConnectedSubframeCountForRemoval() const; 667 void updateAncestorConnectedSubframeCountForRemoval() const;
668 void updateAncestorConnectedSubframeCountForInsertion() const; 668 void updateAncestorConnectedSubframeCountForInsertion() const;
669 669
670 PassRefPtr<NodeList> getDestinationInsertionPoints(); 670 PassRefPtr<NodeList> getDestinationInsertionPoints();
671 671
672 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl ag); } 672 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl ag); }
673 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } 673 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); }
674 674
675 bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChi ldrenFlag); }
676
675 private: 677 private:
676 enum NodeFlags { 678 enum NodeFlags {
677 IsTextFlag = 1, 679 IsTextFlag = 1,
678 IsContainerFlag = 1 << 1, 680 IsContainerFlag = 1 << 1,
679 IsElementFlag = 1 << 2, 681 IsElementFlag = 1 << 2,
680 IsHTMLFlag = 1 << 3, 682 IsHTMLFlag = 1 << 3,
681 IsSVGFlag = 1 << 4, 683 IsSVGFlag = 1 << 4,
682 684
683 ChildNeedsDistributionRecalc = 1 << 5, 685 ChildNeedsDistributionRecalc = 1 << 5,
684 ChildNeedsStyleRecalcFlag = 1 << 6, 686 ChildNeedsStyleRecalcFlag = 1 << 6,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 781
780 void setTreeScope(TreeScope* scope) { m_treeScope = scope; } 782 void setTreeScope(TreeScope* scope) { m_treeScope = scope; }
781 783
782 // isTreeScopeInitialized() can be false 784 // isTreeScopeInitialized() can be false
783 // - in the destruction of Document or ShadowRoot where m_treeScope is set t o null or 785 // - in the destruction of Document or ShadowRoot where m_treeScope is set t o null or
784 // - in the Node constructor called by these two classes where m_treeScope i s set by TreeScope ctor. 786 // - in the Node constructor called by these two classes where m_treeScope i s set by TreeScope ctor.
785 bool isTreeScopeInitialized() const { return m_treeScope; } 787 bool isTreeScopeInitialized() const { return m_treeScope; }
786 788
787 void markAncestorsWithChildNeedsStyleRecalc(); 789 void markAncestorsWithChildNeedsStyleRecalc();
788 790
789 bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChi ldrenFlag); }
790 void setIsFinishedParsingChildren(bool value) { setFlag(value, IsFinishedPar singChildrenFlag); } 791 void setIsFinishedParsingChildren(bool value) { setFlag(value, IsFinishedPar singChildrenFlag); }
791 792
792 private: 793 private:
793 friend class TreeShared<Node>; 794 friend class TreeShared<Node>;
794 795
795 virtual PseudoId customPseudoId() const 796 virtual PseudoId customPseudoId() const
796 { 797 {
797 ASSERT(hasCustomStyleCallbacks()); 798 ASSERT(hasCustomStyleCallbacks());
798 return NOPSEUDO; 799 return NOPSEUDO;
799 } 800 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } // namespace WebCore 908 } // namespace WebCore
908 909
909 #ifndef NDEBUG 910 #ifndef NDEBUG
910 // Outside the WebCore namespace for ease of invocation from gdb. 911 // Outside the WebCore namespace for ease of invocation from gdb.
911 void showNode(const WebCore::Node*); 912 void showNode(const WebCore::Node*);
912 void showTree(const WebCore::Node*); 913 void showTree(const WebCore::Node*);
913 void showNodePath(const WebCore::Node*); 914 void showNodePath(const WebCore::Node*);
914 #endif 915 #endif
915 916
916 #endif 917 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/ElementRareData.h ('k') | Source/core/dom/NodeRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698