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

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

Issue 14688008: Revert 149589 "Set a bit on Custom Elements on creation to simplify wrapping" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/CustomElementRegistry.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, 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 bool isContainerNode() const { return getFlag(IsContainerFlag); } 223 bool isContainerNode() const { return getFlag(IsContainerFlag); }
224 bool isTextNode() const { return getFlag(IsTextFlag); } 224 bool isTextNode() const { return getFlag(IsTextFlag); }
225 bool isHTMLElement() const { return getFlag(IsHTMLFlag); } 225 bool isHTMLElement() const { return getFlag(IsHTMLFlag); }
226 bool isSVGElement() const { return getFlag(IsSVGFlag); } 226 bool isSVGElement() const { return getFlag(IsSVGFlag); }
227 227
228 bool isPseudoElement() const { return pseudoId() != NOPSEUDO; } 228 bool isPseudoElement() const { return pseudoId() != NOPSEUDO; }
229 bool isBeforePseudoElement() const { return pseudoId() == BEFORE; } 229 bool isBeforePseudoElement() const { return pseudoId() == BEFORE; }
230 bool isAfterPseudoElement() const { return pseudoId() == AFTER; } 230 bool isAfterPseudoElement() const { return pseudoId() == AFTER; }
231 PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbac ks()) ? customPseudoId() : NOPSEUDO; } 231 PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbac ks()) ? customPseudoId() : NOPSEUDO; }
232 232
233 bool isCustomElement() const { return getFlag(IsCustomElement); }
234 void setIsCustomElement();
235
236 virtual bool isMediaControlElement() const { return false; } 233 virtual bool isMediaControlElement() const { return false; }
237 virtual bool isMediaControls() const { return false; } 234 virtual bool isMediaControls() const { return false; }
238 virtual bool isWebVTTElement() const { return false; } 235 virtual bool isWebVTTElement() const { return false; }
239 bool isStyledElement() const { return getFlag(IsStyledElementFlag); } 236 bool isStyledElement() const { return getFlag(IsStyledElementFlag); }
240 virtual bool isAttributeNode() const { return false; } 237 virtual bool isAttributeNode() const { return false; }
241 virtual bool isCharacterDataNode() const { return false; } 238 virtual bool isCharacterDataNode() const { return false; }
242 virtual bool isFrameOwnerElement() const { return false; } 239 virtual bool isFrameOwnerElement() const { return false; }
243 virtual bool isPluginElement() const { return false; } 240 virtual bool isPluginElement() const { return false; }
244 virtual bool isInsertionPointNode() const { return false; } 241 virtual bool isInsertionPointNode() const { return false; }
245 242
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 HasNameOrIsEditingTextFlag = 1 << 18, 705 HasNameOrIsEditingTextFlag = 1 << 18,
709 706
710 InNamedFlowFlag = 1 << 19, 707 InNamedFlowFlag = 1 << 19,
711 HasSyntheticAttrChildNodesFlag = 1 << 20, 708 HasSyntheticAttrChildNodesFlag = 1 << 20,
712 HasCustomStyleCallbacksFlag = 1 << 21, 709 HasCustomStyleCallbacksFlag = 1 << 21,
713 HasScopedHTMLStyleChildFlag = 1 << 22, 710 HasScopedHTMLStyleChildFlag = 1 << 22,
714 HasEventTargetDataFlag = 1 << 23, 711 HasEventTargetDataFlag = 1 << 23,
715 V8CollectableDuringMinorGCFlag = 1 << 24, 712 V8CollectableDuringMinorGCFlag = 1 << 24,
716 NeedsShadowTreeWalkerFlag = 1 << 25, 713 NeedsShadowTreeWalkerFlag = 1 << 25,
717 IsInShadowTreeFlag = 1 << 26, 714 IsInShadowTreeFlag = 1 << 26,
718 IsCustomElement = 1 << 27,
719 715
720 DefaultNodeFlags = IsParsingChildrenFinishedFlag 716 DefaultNodeFlags = IsParsingChildrenFinishedFlag
721 }; 717 };
722 718
723 // 4 bits remaining 719 // 5 bits remaining
724 720
725 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 721 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
726 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); } 722 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); }
727 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; } 723 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; }
728 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; } 724 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; }
729 725
730 protected: 726 protected:
731 enum ConstructionType { 727 enum ConstructionType {
732 CreateOther = DefaultNodeFlags, 728 CreateOther = DefaultNodeFlags,
733 CreateText = DefaultNodeFlags | IsTextFlag, 729 CreateText = DefaultNodeFlags | IsTextFlag,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 877
882 } //namespace 878 } //namespace
883 879
884 #ifndef NDEBUG 880 #ifndef NDEBUG
885 // Outside the WebCore namespace for ease of invocation from gdb. 881 // Outside the WebCore namespace for ease of invocation from gdb.
886 void showTree(const WebCore::Node*); 882 void showTree(const WebCore::Node*);
887 void showNodePath(const WebCore::Node*); 883 void showNodePath(const WebCore::Node*);
888 #endif 884 #endif
889 885
890 #endif 886 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/CustomElementRegistry.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698