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

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

Issue 337113002: Remove unnecessary mutable keyword for m_nodeFlags (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 726
727 // HTML dir=auto. 727 // HTML dir=auto.
728 SelfOrAncestorHasDirAutoFlag = 1 << 29, 728 SelfOrAncestorHasDirAutoFlag = 1 << 29,
729 729
730 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange 730 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange
731 }; 731 };
732 732
733 // 2 bits remaining. 733 // 2 bits remaining.
734 734
735 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 735 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
736 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); } 736 void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); }
737 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; } 737 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; }
738 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; } 738 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; }
739 739
740 protected: 740 protected:
741 enum ConstructionType { 741 enum ConstructionType {
742 CreateOther = DefaultNodeFlags, 742 CreateOther = DefaultNodeFlags,
743 CreateText = DefaultNodeFlags | IsTextFlag, 743 CreateText = DefaultNodeFlags | IsTextFlag,
744 CreateContainer = DefaultNodeFlags | IsContainerFlag, 744 CreateContainer = DefaultNodeFlags | IsContainerFlag,
745 CreateElement = CreateContainer | IsElementFlag, 745 CreateElement = CreateContainer | IsElementFlag,
746 CreateShadowRoot = CreateContainer | IsDocumentFragmentFlag | IsInShadow TreeFlag, 746 CreateShadowRoot = CreateContainer | IsDocumentFragmentFlag | IsInShadow TreeFlag,
747 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, 747 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag,
748 CreateHTMLElement = CreateElement | IsHTMLFlag, 748 CreateHTMLElement = CreateElement | IsHTMLFlag,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 817
818 virtual RenderStyle* nonRendererStyle() const { return 0; } 818 virtual RenderStyle* nonRendererStyle() const { return 0; }
819 819
820 virtual RenderStyle* virtualComputedStyle(PseudoId = NOPSEUDO); 820 virtual RenderStyle* virtualComputedStyle(PseudoId = NOPSEUDO);
821 821
822 void trackForDebugging(); 822 void trackForDebugging();
823 823
824 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration> >* mutatio nObserverRegistry(); 824 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration> >* mutatio nObserverRegistry();
825 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration> >* transi entMutationObserverRegistry(); 825 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration> >* transi entMutationObserverRegistry();
826 826
827 mutable uint32_t m_nodeFlags; 827 uint32_t m_nodeFlags;
828 RawPtrWillBeMember<ContainerNode> m_parentOrShadowHostNode; 828 RawPtrWillBeMember<ContainerNode> m_parentOrShadowHostNode;
829 RawPtrWillBeMember<TreeScope> m_treeScope; 829 RawPtrWillBeMember<TreeScope> m_treeScope;
830 RawPtrWillBeMember<Node> m_previous; 830 RawPtrWillBeMember<Node> m_previous;
831 RawPtrWillBeMember<Node> m_next; 831 RawPtrWillBeMember<Node> m_next;
832 // When a node has rare data we move the renderer into the rare data. 832 // When a node has rare data we move the renderer into the rare data.
833 union DataUnion { 833 union DataUnion {
834 DataUnion() : m_renderer(0) { } 834 DataUnion() : m_renderer(0) { }
835 RenderObject* m_renderer; 835 RenderObject* m_renderer;
836 NodeRareDataBase* m_rareData; 836 NodeRareDataBase* m_rareData;
837 } m_data; 837 } m_data;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } // namespace WebCore 907 } // namespace WebCore
908 908
909 #ifndef NDEBUG 909 #ifndef NDEBUG
910 // Outside the WebCore namespace for ease of invocation from gdb. 910 // Outside the WebCore namespace for ease of invocation from gdb.
911 void showNode(const WebCore::Node*); 911 void showNode(const WebCore::Node*);
912 void showTree(const WebCore::Node*); 912 void showTree(const WebCore::Node*);
913 void showNodePath(const WebCore::Node*); 913 void showNodePath(const WebCore::Node*);
914 #endif 914 #endif
915 915
916 #endif 916 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698