| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); } | 281 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); } |
| 282 | 282 |
| 283 void setNeedsStyleRecalc(StyleChangeType); | 283 void setNeedsStyleRecalc(StyleChangeType); |
| 284 void clearNeedsStyleRecalc(); | 284 void clearNeedsStyleRecalc(); |
| 285 | 285 |
| 286 bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistrib
utionRecalcFlag); } | 286 bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistrib
utionRecalcFlag); } |
| 287 void setChildNeedsDistributionRecalc() { setFlag(ChildNeedsDistributionReca
lcFlag); } | 287 void setChildNeedsDistributionRecalc() { setFlag(ChildNeedsDistributionReca
lcFlag); } |
| 288 void clearChildNeedsDistributionRecalc() { clearFlag(ChildNeedsDistribution
RecalcFlag); } | 288 void clearChildNeedsDistributionRecalc() { clearFlag(ChildNeedsDistribution
RecalcFlag); } |
| 289 void markAncestorsWithChildNeedsDistributionRecalc(); | 289 void markAncestorsWithChildNeedsDistributionRecalc(); |
| 290 | 290 |
| 291 bool childNeedsStyleInvalidation() const { return getFlag(ChildNeedsStyleInv
alidationFlag); } | |
| 292 void setChildNeedsStyleInvalidation() { setFlag(ChildNeedsStyleInvalidation
Flag); } | |
| 293 void clearChildNeedsStyleInvalidation() { clearFlag(ChildNeedsStyleInvalida
tionFlag); } | |
| 294 void markAncestorsWithChildNeedsStyleInvalidation(); | |
| 295 bool needsStyleInvalidation() const { return getFlag(NeedsStyleInvalidationF
lag); } | |
| 296 void clearNeedsStyleInvalidation() { clearFlag(NeedsStyleInvalidationFlag);
} | |
| 297 void setNeedsStyleInvalidation(); | |
| 298 | |
| 299 void recalcDistribution(); | 291 void recalcDistribution(); |
| 300 | 292 |
| 301 void setIsLink(bool f); | 293 void setIsLink(bool f); |
| 302 | 294 |
| 303 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } | 295 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } |
| 304 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag
); } | 296 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag
); } |
| 305 | 297 |
| 306 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri
ngMinorGCFlag); } | 298 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri
ngMinorGCFlag); } |
| 307 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin
orGCFlag); } | 299 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin
orGCFlag); } |
| 308 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM
inorGCFlag); } | 300 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM
inorGCFlag); } |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 // Changes based on :hover, :active and :focus state. | 579 // Changes based on :hover, :active and :focus state. |
| 588 IsUserActionElementFlag = 1 << 9, | 580 IsUserActionElementFlag = 1 << 9, |
| 589 | 581 |
| 590 // Tree state flags. These change when the element is added/removed | 582 // Tree state flags. These change when the element is added/removed |
| 591 // from a DOM tree. | 583 // from a DOM tree. |
| 592 InDocumentFlag = 1 << 10, | 584 InDocumentFlag = 1 << 10, |
| 593 IsInShadowTreeFlag = 1 << 11, | 585 IsInShadowTreeFlag = 1 << 11, |
| 594 | 586 |
| 595 // Flags related to recalcStyle. | 587 // Flags related to recalcStyle. |
| 596 | 588 |
| 597 // FIXME(sky): Flags 12-14 are free. | 589 // FIXME(sky): Flags 12-16 are free. |
| 598 | 590 |
| 599 ChildNeedsStyleInvalidationFlag = 1 << 15, | |
| 600 NeedsStyleInvalidationFlag = 1 << 16, | |
| 601 ChildNeedsDistributionRecalcFlag = 1 << 17, | 591 ChildNeedsDistributionRecalcFlag = 1 << 17, |
| 602 ChildNeedsStyleRecalcFlag = 1 << 18, | 592 ChildNeedsStyleRecalcFlag = 1 << 18, |
| 603 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift
+ 1), | 593 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift
+ 1), |
| 604 | 594 |
| 605 CustomElementFlag = 1 << 21, | 595 CustomElementFlag = 1 << 21, |
| 606 CustomElementUpgradedFlag = 1 << 22, | 596 CustomElementUpgradedFlag = 1 << 22, |
| 607 | 597 |
| 608 IsEditingTextFlag = 1 << 23, | 598 IsEditingTextFlag = 1 << 23, |
| 609 HasWeakReferencesFlag = 1 << 24, | 599 HasWeakReferencesFlag = 1 << 24, |
| 610 V8CollectableDuringMinorGCFlag = 1 << 25, | 600 V8CollectableDuringMinorGCFlag = 1 << 25, |
| 611 HasEventTargetDataFlag = 1 << 26, | 601 HasEventTargetDataFlag = 1 << 26, |
| 612 AlreadySpellCheckedFlag = 1 << 27, | 602 AlreadySpellCheckedFlag = 1 << 27, |
| 613 | 603 |
| 614 DefaultNodeFlags = ChildNeedsStyleRecalcFlag | NeedsReattachStyleChange | 604 DefaultNodeFlags = ChildNeedsStyleRecalcFlag | NeedsReattachStyleChange |
| 615 }; | 605 }; |
| 616 | 606 |
| 617 // 7 bits remaining. | 607 // 9 bits remaining. |
| 618 | 608 |
| 619 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } | 609 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } |
| 620 void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) |
(-(int32_t)f & mask); } | 610 void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) |
(-(int32_t)f & mask); } |
| 621 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } | 611 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } |
| 622 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } | 612 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } |
| 623 | 613 |
| 624 protected: | 614 protected: |
| 625 enum ConstructionType { | 615 enum ConstructionType { |
| 626 CreateOther = DefaultNodeFlags, | 616 CreateOther = DefaultNodeFlags, |
| 627 CreateText = DefaultNodeFlags | IsTextFlag, | 617 CreateText = DefaultNodeFlags | IsTextFlag, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 } // namespace blink | 768 } // namespace blink |
| 779 | 769 |
| 780 #ifndef NDEBUG | 770 #ifndef NDEBUG |
| 781 // Outside the WebCore namespace for ease of invocation from gdb. | 771 // Outside the WebCore namespace for ease of invocation from gdb. |
| 782 void showNode(const blink::Node*); | 772 void showNode(const blink::Node*); |
| 783 void showTree(const blink::Node*); | 773 void showTree(const blink::Node*); |
| 784 void showNodePath(const blink::Node*); | 774 void showNodePath(const blink::Node*); |
| 785 #endif | 775 #endif |
| 786 | 776 |
| 787 #endif // Node_h | 777 #endif // Node_h |
| OLD | NEW |