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

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

Issue 1149893021: Don't mark Text with ChildNeedsStyleRecalc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Node.cpp » ('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-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 732
733 CustomElementFlag = 1 << 21, 733 CustomElementFlag = 1 << 21,
734 CustomElementUpgradedFlag = 1 << 22, 734 CustomElementUpgradedFlag = 1 << 22,
735 735
736 HasNameOrIsEditingTextFlag = 1 << 23, 736 HasNameOrIsEditingTextFlag = 1 << 23,
737 HasWeakReferencesFlag = 1 << 24, 737 HasWeakReferencesFlag = 1 << 24,
738 V8CollectableDuringMinorGCFlag = 1 << 25, 738 V8CollectableDuringMinorGCFlag = 1 << 25,
739 HasEventTargetDataFlag = 1 << 26, 739 HasEventTargetDataFlag = 1 << 26,
740 AlreadySpellCheckedFlag = 1 << 27, 740 AlreadySpellCheckedFlag = 1 << 27,
741 741
742 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange 742 DefaultNodeFlags = IsFinishedParsingChildrenFlag | NeedsReattachStyleCha nge
743 }; 743 };
744 744
745 // 3 bits remaining. 745 // 3 bits remaining.
746 746
747 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 747 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
748 void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); } 748 void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); }
749 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } 749 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; }
750 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } 750 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; }
751 751
752 protected: 752 protected:
753 enum ConstructionType { 753 enum ConstructionType {
754 CreateOther = DefaultNodeFlags, 754 CreateOther = DefaultNodeFlags,
755 CreateText = DefaultNodeFlags | IsTextFlag, 755 CreateText = DefaultNodeFlags | IsTextFlag,
756 CreateContainer = DefaultNodeFlags | IsContainerFlag, 756 CreateContainer = DefaultNodeFlags | ChildNeedsStyleRecalcFlag | IsConta inerFlag,
757 CreateElement = CreateContainer | IsElementFlag, 757 CreateElement = CreateContainer | IsElementFlag,
758 CreateShadowRoot = CreateContainer | IsDocumentFragmentFlag | IsInShadow TreeFlag, 758 CreateShadowRoot = CreateContainer | IsDocumentFragmentFlag | IsInShadow TreeFlag,
759 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, 759 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag,
760 CreateHTMLElement = CreateElement | IsHTMLFlag, 760 CreateHTMLElement = CreateElement | IsHTMLFlag,
761 CreateSVGElement = CreateElement | IsSVGFlag, 761 CreateSVGElement = CreateElement | IsSVGFlag,
762 CreateDocument = CreateContainer | InDocumentFlag, 762 CreateDocument = CreateContainer | InDocumentFlag,
763 CreateInsertionPoint = CreateHTMLElement | IsInsertionPointFlag, 763 CreateInsertionPoint = CreateHTMLElement | IsInsertionPointFlag,
764 CreateEditingText = CreateText | HasNameOrIsEditingTextFlag, 764 CreateEditingText = CreateText | HasNameOrIsEditingTextFlag,
765 }; 765 };
766 766
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 } // namespace blink 917 } // namespace blink
918 918
919 #ifndef NDEBUG 919 #ifndef NDEBUG
920 // Outside the WebCore namespace for ease of invocation from gdb. 920 // Outside the WebCore namespace for ease of invocation from gdb.
921 void showNode(const blink::Node*); 921 void showNode(const blink::Node*);
922 void showTree(const blink::Node*); 922 void showTree(const blink::Node*);
923 void showNodePath(const blink::Node*); 923 void showNodePath(const blink::Node*);
924 #endif 924 #endif
925 925
926 #endif // Node_h 926 #endif // Node_h
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698