| 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-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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 bool supportsAltText(); | 247 bool supportsAltText(); |
| 248 | 248 |
| 249 // Other methods (not part of DOM) | 249 // Other methods (not part of DOM) |
| 250 | 250 |
| 251 bool isElementNode() const { return getFlag(IsElementFlag); } | 251 bool isElementNode() const { return getFlag(IsElementFlag); } |
| 252 bool isContainerNode() const { return getFlag(IsContainerFlag); } | 252 bool isContainerNode() const { return getFlag(IsContainerFlag); } |
| 253 bool isTextNode() const { return getFlag(IsTextFlag); } | 253 bool isTextNode() const { return getFlag(IsTextFlag); } |
| 254 bool isHTMLElement() const { return getFlag(IsHTMLFlag); } | 254 bool isHTMLElement() const { return getFlag(IsHTMLFlag); } |
| 255 bool isSVGElement() const { return getFlag(IsSVGFlag); } | 255 bool isSVGElement() const { return getFlag(IsSVGFlag); } |
| 256 | 256 |
| 257 bool isPseudoElement() const { return getPseudoId() != NOPSEUDO; } | 257 bool isPseudoElement() const { return getPseudoId() != PseudoIdNoPseudo; } |
| 258 bool isBeforePseudoElement() const { return getPseudoId() == BEFORE; } | 258 bool isBeforePseudoElement() const { return getPseudoId() == PseudoIdBefore;
} |
| 259 bool isAfterPseudoElement() const { return getPseudoId() == AFTER; } | 259 bool isAfterPseudoElement() const { return getPseudoId() == PseudoIdAfter; } |
| 260 bool isFirstLetterPseudoElement() const { return getPseudoId() == FIRST_LETT
ER; } | 260 bool isFirstLetterPseudoElement() const { return getPseudoId() == PseudoIdFi
rstLetter; } |
| 261 virtual PseudoId getPseudoId() const { return NOPSEUDO; } | 261 virtual PseudoId getPseudoId() const { return PseudoIdNoPseudo; } |
| 262 | 262 |
| 263 bool isCustomElement() const { return getFlag(CustomElementFlag); } | 263 bool isCustomElement() const { return getFlag(CustomElementFlag); } |
| 264 enum CustomElementState { | 264 enum CustomElementState { |
| 265 NotCustomElement = 0, | 265 NotCustomElement = 0, |
| 266 WaitingForUpgrade = 1 << 0, | 266 WaitingForUpgrade = 1 << 0, |
| 267 Upgraded = 1 << 1 | 267 Upgraded = 1 << 1 |
| 268 }; | 268 }; |
| 269 CustomElementState getCustomElementState() const | 269 CustomElementState getCustomElementState() const |
| 270 { | 270 { |
| 271 return isCustomElement() | 271 return isCustomElement() |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 // Returns true if recalcStyle should be called on the object, if there is s
uch a method (on Document and Element). | 554 // Returns true if recalcStyle should be called on the object, if there is s
uch a method (on Document and Element). |
| 555 bool shouldCallRecalcStyle(StyleRecalcChange); | 555 bool shouldCallRecalcStyle(StyleRecalcChange); |
| 556 | 556 |
| 557 // Wrapper for nodes that don't have a layoutObject, but still cache the sty
le (like HTMLOptionElement). | 557 // Wrapper for nodes that don't have a layoutObject, but still cache the sty
le (like HTMLOptionElement). |
| 558 ComputedStyle* mutableComputedStyle() const; | 558 ComputedStyle* mutableComputedStyle() const; |
| 559 const ComputedStyle* computedStyle() const; | 559 const ComputedStyle* computedStyle() const; |
| 560 const ComputedStyle* parentComputedStyle() const; | 560 const ComputedStyle* parentComputedStyle() const; |
| 561 | 561 |
| 562 const ComputedStyle& computedStyleRef() const; | 562 const ComputedStyle& computedStyleRef() const; |
| 563 | 563 |
| 564 const ComputedStyle* ensureComputedStyle(PseudoId pseudoElementSpecifier = N
OPSEUDO) { return virtualEnsureComputedStyle(pseudoElementSpecifier); } | 564 const ComputedStyle* ensureComputedStyle(PseudoId pseudoElementSpecifier = P
seudoIdNoPseudo) { return virtualEnsureComputedStyle(pseudoElementSpecifier); } |
| 565 | 565 |
| 566 // -------------------------------------------------------------------------
---- | 566 // -------------------------------------------------------------------------
---- |
| 567 // Notification of document structure changes (see ContainerNode.h for more
notification methods) | 567 // Notification of document structure changes (see ContainerNode.h for more
notification methods) |
| 568 // | 568 // |
| 569 // At first, WebKit notifies the node that it has been inserted into the doc
ument. This is called during document parsing, and also | 569 // At first, WebKit notifies the node that it has been inserted into the doc
ument. This is called during document parsing, and also |
| 570 // when a node is added through the DOM methods insertBefore(), appendChild(
) or replaceChild(). The call happens _after_ the node has been added to the tre
e. | 570 // when a node is added through the DOM methods insertBefore(), appendChild(
) or replaceChild(). The call happens _after_ the node has been added to the tre
e. |
| 571 // This is similar to the DOMNodeInsertedIntoDocument DOM event, but does no
t require the overhead of event | 571 // This is similar to the DOMNodeInsertedIntoDocument DOM event, but does no
t require the overhead of event |
| 572 // dispatching. | 572 // dispatching. |
| 573 // | 573 // |
| 574 // WebKit notifies this callback regardless if the subtree of the node is a
document tree or a floating subtree. | 574 // WebKit notifies this callback regardless if the subtree of the node is a
document tree or a floating subtree. |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 bool isUserActionElementInActiveChain() const; | 818 bool isUserActionElementInActiveChain() const; |
| 819 bool isUserActionElementHovered() const; | 819 bool isUserActionElementHovered() const; |
| 820 bool isUserActionElementFocused() const; | 820 bool isUserActionElementFocused() const; |
| 821 | 821 |
| 822 void recalcDistribution(); | 822 void recalcDistribution(); |
| 823 | 823 |
| 824 void setStyleChange(StyleChangeType); | 824 void setStyleChange(StyleChangeType); |
| 825 | 825 |
| 826 virtual ComputedStyle* nonLayoutObjectComputedStyle() const { return nullptr
; } | 826 virtual ComputedStyle* nonLayoutObjectComputedStyle() const { return nullptr
; } |
| 827 | 827 |
| 828 virtual const ComputedStyle* virtualEnsureComputedStyle(PseudoId = NOPSEUDO)
; | 828 virtual const ComputedStyle* virtualEnsureComputedStyle(PseudoId = PseudoIdN
oPseudo); |
| 829 | 829 |
| 830 void trackForDebugging(); | 830 void trackForDebugging(); |
| 831 | 831 |
| 832 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration>>* mutation
ObserverRegistry(); | 832 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration>>* mutation
ObserverRegistry(); |
| 833 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration>>* transie
ntMutationObserverRegistry(); | 833 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration>>* transie
ntMutationObserverRegistry(); |
| 834 | 834 |
| 835 uint32_t m_nodeFlags; | 835 uint32_t m_nodeFlags; |
| 836 RawPtrWillBeMember<ContainerNode> m_parentOrShadowHostNode; | 836 RawPtrWillBeMember<ContainerNode> m_parentOrShadowHostNode; |
| 837 RawPtrWillBeMember<TreeScope> m_treeScope; | 837 RawPtrWillBeMember<TreeScope> m_treeScope; |
| 838 RawPtrWillBeMember<Node> m_previous; | 838 RawPtrWillBeMember<Node> m_previous; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 } // namespace blink | 929 } // namespace blink |
| 930 | 930 |
| 931 #ifndef NDEBUG | 931 #ifndef NDEBUG |
| 932 // Outside the WebCore namespace for ease of invocation from gdb. | 932 // Outside the WebCore namespace for ease of invocation from gdb. |
| 933 void showNode(const blink::Node*); | 933 void showNode(const blink::Node*); |
| 934 void showTree(const blink::Node*); | 934 void showTree(const blink::Node*); |
| 935 void showNodePath(const blink::Node*); | 935 void showNodePath(const blink::Node*); |
| 936 #endif | 936 #endif |
| 937 | 937 |
| 938 #endif // Node_h | 938 #endif // Node_h |
| OLD | NEW |