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

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

Issue 149243006: Decide on IsFinishedParsingChilden for flag name (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Bring back friend Document Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 ChildNeedsDistributionRecalc = 1 << 5, 683 ChildNeedsDistributionRecalc = 1 << 5,
684 ChildNeedsStyleRecalcFlag = 1 << 6, 684 ChildNeedsStyleRecalcFlag = 1 << 6,
685 InDocumentFlag = 1 << 7, 685 InDocumentFlag = 1 << 7,
686 IsLinkFlag = 1 << 8, 686 IsLinkFlag = 1 << 8,
687 IsUserActionElement = 1 << 9, 687 IsUserActionElement = 1 << 9,
688 HasRareDataFlag = 1 << 10, 688 HasRareDataFlag = 1 << 10,
689 IsDocumentFragmentFlag = 1 << 11, 689 IsDocumentFragmentFlag = 1 << 11,
690 690
691 // These bits are used by derived classes, pulled up here so they can 691 // These bits are used by derived classes, pulled up here so they can
692 // be stored in the same memory word as the Node bits above. 692 // be stored in the same memory word as the Node bits above.
693 IsParsingChildrenFinishedFlag = 1 << 12, // Element 693 IsFinishedParsingChildrenFlag = 1 << 12, // Element
694 694
695 AlreadySpellCheckedFlag = 1 << 13, 695 AlreadySpellCheckedFlag = 1 << 13,
696 696
697 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), 697 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1),
698 698
699 SelfOrAncestorHasDirAutoFlag = 1 << 16, 699 SelfOrAncestorHasDirAutoFlag = 1 << 16,
700 700
701 HasNameOrIsEditingTextFlag = 1 << 17, 701 HasNameOrIsEditingTextFlag = 1 << 17,
702 702
703 InNamedFlowFlag = 1 << 18, 703 InNamedFlowFlag = 1 << 18,
704 HasSyntheticAttrChildNodesFlag = 1 << 19, 704 HasSyntheticAttrChildNodesFlag = 1 << 19,
705 HasCustomStyleCallbacksFlag = 1 << 20, 705 HasCustomStyleCallbacksFlag = 1 << 20,
706 HasScopedHTMLStyleChildFlag = 1 << 21, 706 HasScopedHTMLStyleChildFlag = 1 << 21,
707 HasEventTargetDataFlag = 1 << 22, 707 HasEventTargetDataFlag = 1 << 22,
708 V8CollectableDuringMinorGCFlag = 1 << 23, 708 V8CollectableDuringMinorGCFlag = 1 << 23,
709 IsInsertionPointFlag = 1 << 24, 709 IsInsertionPointFlag = 1 << 24,
710 IsInShadowTreeFlag = 1 << 25, 710 IsInShadowTreeFlag = 1 << 25,
711 711
712 NotifyRendererWithIdenticalStyles = 1 << 26, 712 NotifyRendererWithIdenticalStyles = 1 << 26,
713 713
714 CustomElement = 1 << 27, 714 CustomElement = 1 << 27,
715 CustomElementUpgraded = 1 << 28, 715 CustomElementUpgraded = 1 << 28,
716 716
717 DefaultNodeFlags = IsParsingChildrenFinishedFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange 717 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange
718 }; 718 };
719 719
720 // 4 bits remaining. 720 // 4 bits remaining.
721 721
722 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 722 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
723 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); } 723 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); }
724 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; } 724 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; }
725 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; } 725 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; }
726 726
727 protected: 727 protected:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 775
776 void setTreeScope(TreeScope* scope) { m_treeScope = scope; } 776 void setTreeScope(TreeScope* scope) { m_treeScope = scope; }
777 777
778 // isTreeScopeInitialized() can be false 778 // isTreeScopeInitialized() can be false
779 // - in the destruction of Document or ShadowRoot where m_treeScope is set t o null or 779 // - in the destruction of Document or ShadowRoot where m_treeScope is set t o null or
780 // - in the Node constructor called by these two classes where m_treeScope i s set by TreeScope ctor. 780 // - in the Node constructor called by these two classes where m_treeScope i s set by TreeScope ctor.
781 bool isTreeScopeInitialized() const { return m_treeScope; } 781 bool isTreeScopeInitialized() const { return m_treeScope; }
782 782
783 void markAncestorsWithChildNeedsStyleRecalc(); 783 void markAncestorsWithChildNeedsStyleRecalc();
784 784
785 bool isParsingChildrenFinished() const { return getFlag(IsParsingChildrenFin ishedFlag); } 785 bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChi ldrenFlag); }
786 void setIsParsingChildrenFinished(bool value) { setFlag(value, IsParsingChil drenFinishedFlag); } 786 void setIsFinishedParsingChildren(bool value) { setFlag(value, IsFinishedPar singChildrenFlag); }
787 787
788 private: 788 private:
789 friend class TreeShared<Node>; 789 friend class TreeShared<Node>;
790 790
791 virtual PseudoId customPseudoId() const 791 virtual PseudoId customPseudoId() const
792 { 792 {
793 ASSERT(hasCustomStyleCallbacks()); 793 ASSERT(hasCustomStyleCallbacks());
794 return NOPSEUDO; 794 return NOPSEUDO;
795 } 795 }
796 796
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 902
903 } // namespace WebCore 903 } // namespace WebCore
904 904
905 #ifndef NDEBUG 905 #ifndef NDEBUG
906 // Outside the WebCore namespace for ease of invocation from gdb. 906 // Outside the WebCore namespace for ease of invocation from gdb.
907 void showTree(const WebCore::Node*); 907 void showTree(const WebCore::Node*);
908 void showNodePath(const WebCore::Node*); 908 void showNodePath(const WebCore::Node*);
909 #endif 909 #endif
910 910
911 #endif 911 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698