| 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. | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 7 * (http://www.torchmobile.com/) | 7 * (http://www.torchmobile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // Note: As a shadow host whose root with delegatesFocus=false may become | 387 // Note: As a shadow host whose root with delegatesFocus=false may become |
| 388 // focused state when an inner element gets focused, in that case more than | 388 // focused state when an inner element gets focused, in that case more than |
| 389 // one elements in a document can return true for |isFocused()|. Use | 389 // one elements in a document can return true for |isFocused()|. Use |
| 390 // Element::isFocusedElementInDocument() or Document::focusedElement() to | 390 // Element::isFocusedElementInDocument() or Document::focusedElement() to |
| 391 // check which element is exactly focused. | 391 // check which element is exactly focused. |
| 392 bool isFocused() const { | 392 bool isFocused() const { |
| 393 return isUserActionElement() && isUserActionElementFocused(); | 393 return isUserActionElement() && isUserActionElementFocused(); |
| 394 } | 394 } |
| 395 | 395 |
| 396 bool needsAttach() const { | 396 bool needsAttach() const { |
| 397 return getStyleChangeType() == NeedsReattachStyleChange; | 397 return getStyleChangeType() == NeedsReattachStyleChange || |
| 398 getFlag(NeedsReattachLayoutTree); |
| 398 } | 399 } |
| 399 bool needsStyleRecalc() const { | 400 bool needsStyleRecalc() const { |
| 400 return getStyleChangeType() != NoStyleChange; | 401 return getStyleChangeType() != NoStyleChange; |
| 401 } | 402 } |
| 402 StyleChangeType getStyleChangeType() const { | 403 StyleChangeType getStyleChangeType() const { |
| 403 return static_cast<StyleChangeType>(m_nodeFlags & StyleChangeMask); | 404 return static_cast<StyleChangeType>(m_nodeFlags & StyleChangeMask); |
| 404 } | 405 } |
| 405 bool childNeedsStyleRecalc() const { | 406 bool childNeedsStyleRecalc() const { |
| 406 return getFlag(ChildNeedsStyleRecalcFlag); | 407 return getFlag(ChildNeedsStyleRecalcFlag); |
| 407 } | 408 } |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 824 |
| 824 HasNameOrIsEditingTextFlag = 1 << 22, | 825 HasNameOrIsEditingTextFlag = 1 << 22, |
| 825 HasEventTargetDataFlag = 1 << 23, | 826 HasEventTargetDataFlag = 1 << 23, |
| 826 | 827 |
| 827 V0CustomElementFlag = 1 << 24, | 828 V0CustomElementFlag = 1 << 24, |
| 828 V0CustomElementUpgradedFlag = 1 << 25, | 829 V0CustomElementUpgradedFlag = 1 << 25, |
| 829 | 830 |
| 830 NeedsReattachLayoutTree = 1 << 26, | 831 NeedsReattachLayoutTree = 1 << 26, |
| 831 ChildNeedsReattachLayoutTree = 1 << 27, | 832 ChildNeedsReattachLayoutTree = 1 << 27, |
| 832 | 833 |
| 833 DefaultNodeFlags = IsFinishedParsingChildrenFlag | NeedsReattachStyleChange | 834 DefaultNodeFlags = IsFinishedParsingChildrenFlag | |
| 835 NeedsReattachStyleChange | |
| 836 NeedsReattachLayoutTree |
| 834 }; | 837 }; |
| 835 | 838 |
| 836 // 4 bits remaining. | 839 // 4 bits remaining. |
| 837 | 840 |
| 838 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } | 841 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } |
| 839 void setFlag(bool f, NodeFlags mask) { | 842 void setFlag(bool f, NodeFlags mask) { |
| 840 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); | 843 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); |
| 841 } | 844 } |
| 842 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } | 845 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } |
| 843 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } | 846 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 } // namespace blink | 1023 } // namespace blink |
| 1021 | 1024 |
| 1022 #ifndef NDEBUG | 1025 #ifndef NDEBUG |
| 1023 // Outside the WebCore namespace for ease of invocation from gdb. | 1026 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1024 void showNode(const blink::Node*); | 1027 void showNode(const blink::Node*); |
| 1025 void showTree(const blink::Node*); | 1028 void showTree(const blink::Node*); |
| 1026 void showNodePath(const blink::Node*); | 1029 void showNodePath(const blink::Node*); |
| 1027 #endif | 1030 #endif |
| 1028 | 1031 |
| 1029 #endif // Node_h | 1032 #endif // Node_h |
| OLD | NEW |