| OLD | NEW |
| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 bool isContainerNode() const { return getFlag(IsContainerFlag); } | 224 bool isContainerNode() const { return getFlag(IsContainerFlag); } |
| 225 bool isTextNode() const { return getFlag(IsTextFlag); } | 225 bool isTextNode() const { return getFlag(IsTextFlag); } |
| 226 bool isHTMLElement() const { return getFlag(IsHTMLFlag); } | 226 bool isHTMLElement() const { return getFlag(IsHTMLFlag); } |
| 227 bool isSVGElement() const { return getFlag(IsSVGFlag); } | 227 bool isSVGElement() const { return getFlag(IsSVGFlag); } |
| 228 | 228 |
| 229 bool isPseudoElement() const { return pseudoId() != NOPSEUDO; } | 229 bool isPseudoElement() const { return pseudoId() != NOPSEUDO; } |
| 230 bool isBeforePseudoElement() const { return pseudoId() == BEFORE; } | 230 bool isBeforePseudoElement() const { return pseudoId() == BEFORE; } |
| 231 bool isAfterPseudoElement() const { return pseudoId() == AFTER; } | 231 bool isAfterPseudoElement() const { return pseudoId() == AFTER; } |
| 232 PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbac
ks()) ? customPseudoId() : NOPSEUDO; } | 232 PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleCallbac
ks()) ? customPseudoId() : NOPSEUDO; } |
| 233 | 233 |
| 234 bool isCustomElement() const { return getFlag(CustomElement); } |
| 234 enum CustomElementState { | 235 enum CustomElementState { |
| 235 NotCustomElement, | 236 NotCustomElement = 0, |
| 236 WaitingForParser, | 237 WaitingForUpgrade = 1 << 0, |
| 237 WaitingForUpgrade, | 238 Upgraded = 1 << 1 |
| 238 Upgraded | |
| 239 }; | 239 }; |
| 240 bool isCustomElement() const { return customElementState() != NotCustomEleme
nt; } | 240 CustomElementState customElementState() const |
| 241 CustomElementState customElementState() const { return CustomElementState((g
etFlag(CustomElementWaitingForParserOrIsUpgraded) ? 1 : 0) | (getFlag(CustomElem
entWaitingForUpgradeOrIsUpgraded) ? 2 : 0)); } | 241 { |
| 242 return isCustomElement() |
| 243 ? (getFlag(CustomElementUpgraded) ? Upgraded : WaitingForUpgrade) |
| 244 : NotCustomElement; |
| 245 } |
| 242 void setCustomElementState(CustomElementState newState); | 246 void setCustomElementState(CustomElementState newState); |
| 243 | 247 |
| 244 virtual bool isMediaControlElement() const { return false; } | 248 virtual bool isMediaControlElement() const { return false; } |
| 245 virtual bool isMediaControls() const { return false; } | 249 virtual bool isMediaControls() const { return false; } |
| 246 virtual bool isWebVTTElement() const { return false; } | 250 virtual bool isWebVTTElement() const { return false; } |
| 247 virtual bool isAttributeNode() const { return false; } | 251 virtual bool isAttributeNode() const { return false; } |
| 248 virtual bool isCharacterDataNode() const { return false; } | 252 virtual bool isCharacterDataNode() const { return false; } |
| 249 virtual bool isFrameOwnerElement() const { return false; } | 253 virtual bool isFrameOwnerElement() const { return false; } |
| 250 virtual bool isPluginElement() const { return false; } | 254 virtual bool isPluginElement() const { return false; } |
| 251 | 255 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 HasSyntheticAttrChildNodesFlag = 1 << 19, | 735 HasSyntheticAttrChildNodesFlag = 1 << 19, |
| 732 HasCustomStyleCallbacksFlag = 1 << 20, | 736 HasCustomStyleCallbacksFlag = 1 << 20, |
| 733 HasScopedHTMLStyleChildFlag = 1 << 21, | 737 HasScopedHTMLStyleChildFlag = 1 << 21, |
| 734 HasEventTargetDataFlag = 1 << 22, | 738 HasEventTargetDataFlag = 1 << 22, |
| 735 V8CollectableDuringMinorGCFlag = 1 << 23, | 739 V8CollectableDuringMinorGCFlag = 1 << 23, |
| 736 IsInsertionPointFlag = 1 << 24, | 740 IsInsertionPointFlag = 1 << 24, |
| 737 IsInShadowTreeFlag = 1 << 25, | 741 IsInShadowTreeFlag = 1 << 25, |
| 738 | 742 |
| 739 NotifyRendererWithIdenticalStyles = 1 << 26, | 743 NotifyRendererWithIdenticalStyles = 1 << 26, |
| 740 | 744 |
| 741 CustomElementWaitingForParserOrIsUpgraded = 1 << 27, | 745 CustomElement = 1 << 27, |
| 742 CustomElementWaitingForUpgradeOrIsUpgraded = 1 << 28, | 746 CustomElementUpgraded = 1 << 28, |
| 743 | 747 |
| 744 AlreadySpellCheckedFlag = 1 << 29, | 748 AlreadySpellCheckedFlag = 1 << 29, |
| 745 | 749 |
| 746 DefaultNodeFlags = IsParsingChildrenFinishedFlag | ChildNeedsStyleRecalc
Flag | NeedsReattachStyleChange | 750 DefaultNodeFlags = IsParsingChildrenFinishedFlag | ChildNeedsStyleRecalc
Flag | NeedsReattachStyleChange |
| 747 }; | 751 }; |
| 748 | 752 |
| 749 // 3 bits remaining. | 753 // 3 bits remaining. |
| 750 | 754 |
| 751 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } | 755 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } |
| 752 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m
ask) | (-(int32_t)f & mask); } | 756 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m
ask) | (-(int32_t)f & mask); } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 | 940 |
| 937 } // namespace WebCore | 941 } // namespace WebCore |
| 938 | 942 |
| 939 #ifndef NDEBUG | 943 #ifndef NDEBUG |
| 940 // Outside the WebCore namespace for ease of invocation from gdb. | 944 // Outside the WebCore namespace for ease of invocation from gdb. |
| 941 void showTree(const WebCore::Node*); | 945 void showTree(const WebCore::Node*); |
| 942 void showNodePath(const WebCore::Node*); | 946 void showNodePath(const WebCore::Node*); |
| 943 #endif | 947 #endif |
| 944 | 948 |
| 945 #endif | 949 #endif |
| OLD | NEW |