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

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

Issue 23009004: Process Custom Elements in post-order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing. Created 7 years, 4 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/Element.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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool isHTMLElement() const { return getFlag(IsHTMLFlag); } 238 bool isHTMLElement() const { return getFlag(IsHTMLFlag); }
239 bool isSVGElement() const { return getFlag(IsSVGFlag); } 239 bool isSVGElement() const { return getFlag(IsSVGFlag); }
240 240
241 bool isPseudoElement() const { return pseudoId() != NOPSEUDO; } 241 bool isPseudoElement() const { return pseudoId() != NOPSEUDO; }
242 bool isBeforePseudoElement() const { return pseudoId() == BEFORE; } 242 bool isBeforePseudoElement() const { return pseudoId() == BEFORE; }
243 bool isAfterPseudoElement() const { return pseudoId() == AFTER; } 243 bool isAfterPseudoElement() const { return pseudoId() == AFTER; }
244 PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbac ks()) ? customPseudoId() : NOPSEUDO; } 244 PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbac ks()) ? customPseudoId() : NOPSEUDO; }
245 245
246 enum CustomElementState { 246 enum CustomElementState {
247 NotCustomElement, 247 NotCustomElement,
248 WaitingForParser,
248 WaitingForUpgrade, 249 WaitingForUpgrade,
249 Upgraded 250 Upgraded
250 }; 251 };
251 bool isCustomElement() const { return customElementState() != NotCustomEleme nt; } 252 bool isCustomElement() const { return customElementState() != NotCustomEleme nt; }
252 CustomElementState customElementState() const { return CustomElementState((g etFlag(CustomElementWaitingForUpgrade) ? 1 : 0) | (getFlag(CustomElementIsUpgrad ed) ? 2 : 0)); } 253 CustomElementState customElementState() const { return CustomElementState((g etFlag(CustomElementWaitingForParserOrIsUpgraded) ? 1 : 0) | (getFlag(CustomElem entWaitingForUpgradeOrIsUpgraded) ? 2 : 0)); }
253 void setCustomElementState(CustomElementState newState); 254 void setCustomElementState(CustomElementState newState);
254 255
255 virtual bool isMediaControlElement() const { return false; } 256 virtual bool isMediaControlElement() const { return false; }
256 virtual bool isMediaControls() const { return false; } 257 virtual bool isMediaControls() const { return false; }
257 virtual bool isWebVTTElement() const { return false; } 258 virtual bool isWebVTTElement() const { return false; }
258 virtual bool isAttributeNode() const { return false; } 259 virtual bool isAttributeNode() const { return false; }
259 virtual bool isCharacterDataNode() const { return false; } 260 virtual bool isCharacterDataNode() const { return false; }
260 virtual bool isFrameOwnerElement() const { return false; } 261 virtual bool isFrameOwnerElement() const { return false; }
261 virtual bool isPluginElement() const { return false; } 262 virtual bool isPluginElement() const { return false; }
262 263
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 HasSyntheticAttrChildNodesFlag = 1 << 19, 743 HasSyntheticAttrChildNodesFlag = 1 << 19,
743 HasCustomStyleCallbacksFlag = 1 << 20, 744 HasCustomStyleCallbacksFlag = 1 << 20,
744 HasScopedHTMLStyleChildFlag = 1 << 21, 745 HasScopedHTMLStyleChildFlag = 1 << 21,
745 HasEventTargetDataFlag = 1 << 22, 746 HasEventTargetDataFlag = 1 << 22,
746 V8CollectableDuringMinorGCFlag = 1 << 23, 747 V8CollectableDuringMinorGCFlag = 1 << 23,
747 IsInsertionPointFlag = 1 << 24, 748 IsInsertionPointFlag = 1 << 24,
748 IsInShadowTreeFlag = 1 << 25, 749 IsInShadowTreeFlag = 1 << 25,
749 750
750 NotifyRendererWithIdenticalStyles = 1 << 26, 751 NotifyRendererWithIdenticalStyles = 1 << 26,
751 752
752 CustomElementWaitingForUpgrade = 1 << 27, 753 CustomElementWaitingForParserOrIsUpgraded = 1 << 27,
753 CustomElementIsUpgraded = 1 << 28, 754 CustomElementWaitingForUpgradeOrIsUpgraded = 1 << 28,
754 755
755 ChildNeedsDistributionRecalc = 1 << 29, 756 ChildNeedsDistributionRecalc = 1 << 29,
756 757
757 DefaultNodeFlags = IsParsingChildrenFinishedFlag 758 DefaultNodeFlags = IsParsingChildrenFinishedFlag
758 }; 759 };
759 760
760 // 2 bits remaining 761 // 2 bits remaining
761 762
762 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 763 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
763 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); } 764 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 937
937 } //namespace 938 } //namespace
938 939
939 #ifndef NDEBUG 940 #ifndef NDEBUG
940 // Outside the WebCore namespace for ease of invocation from gdb. 941 // Outside the WebCore namespace for ease of invocation from gdb.
941 void showTree(const WebCore::Node*); 942 void showTree(const WebCore::Node*);
942 void showNodePath(const WebCore::Node*); 943 void showNodePath(const WebCore::Node*);
943 #endif 944 #endif
944 945
945 #endif 946 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698