Chromium Code Reviews| 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 10 matching lines...) Expand all Loading... | |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef Node_h | 25 #ifndef Node_h |
| 26 #define Node_h | 26 #define Node_h |
| 27 | 27 |
| 28 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 28 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 29 #include "core/dom/MutationObserver.h" | 29 #include "core/dom/MutationObserver.h" |
| 30 #include "core/dom/SimulatedClickOptions.h" | 30 #include "core/dom/SimulatedClickOptions.h" |
| 31 #include "core/dom/StyleChangeReason.h" | |
| 31 #include "core/dom/TreeScope.h" | 32 #include "core/dom/TreeScope.h" |
| 32 #include "core/dom/TreeShared.h" | 33 #include "core/dom/TreeShared.h" |
| 33 #include "core/editing/EditingBoundary.h" | 34 #include "core/editing/EditingBoundary.h" |
| 34 #include "core/events/EventTarget.h" | 35 #include "core/events/EventTarget.h" |
| 35 #include "core/inspector/InspectorCounters.h" | 36 #include "core/inspector/InspectorCounters.h" |
| 36 #include "core/rendering/style/RenderStyleConstants.h" | 37 #include "core/rendering/style/RenderStyleConstants.h" |
| 37 #include "platform/geometry/LayoutRect.h" | 38 #include "platform/geometry/LayoutRect.h" |
| 38 #include "platform/heap/Handle.h" | 39 #include "platform/heap/Handle.h" |
| 39 #include "platform/weborigin/KURLHash.h" | 40 #include "platform/weborigin/KURLHash.h" |
| 40 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 bool needsStyleRecalc() const { return styleChangeType() != NoStyleChange; } | 348 bool needsStyleRecalc() const { return styleChangeType() != NoStyleChange; } |
| 348 StyleChangeType styleChangeType() const { return static_cast<StyleChangeType >(m_nodeFlags & StyleChangeMask); } | 349 StyleChangeType styleChangeType() const { return static_cast<StyleChangeType >(m_nodeFlags & StyleChangeMask); } |
| 349 bool childNeedsStyleRecalc() const { return getFlag(ChildNeedsStyleRecalcFla g); } | 350 bool childNeedsStyleRecalc() const { return getFlag(ChildNeedsStyleRecalcFla g); } |
| 350 bool isLink() const { return getFlag(IsLinkFlag); } | 351 bool isLink() const { return getFlag(IsLinkFlag); } |
| 351 bool isEditingText() const { return isTextNode() && getFlag(HasNameOrIsEditi ngTextFlag); } | 352 bool isEditingText() const { return isTextNode() && getFlag(HasNameOrIsEditi ngTextFlag); } |
| 352 | 353 |
| 353 void setHasName(bool f) { ASSERT(!isTextNode()); setFlag(f, HasNameOrIsEditi ngTextFlag); } | 354 void setHasName(bool f) { ASSERT(!isTextNode()); setFlag(f, HasNameOrIsEditi ngTextFlag); } |
| 354 void setChildNeedsStyleRecalc() { setFlag(ChildNeedsStyleRecalcFlag); } | 355 void setChildNeedsStyleRecalc() { setFlag(ChildNeedsStyleRecalcFlag); } |
| 355 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); } | 356 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); } |
| 356 | 357 |
| 357 void setNeedsStyleRecalc(StyleChangeType); | 358 void setNeedsStyleRecalc(StyleChangeReason, StyleChangeType); |
|
pdr.
2014/09/06 22:36:27
Do we actually need both StyleChangeReason and Sty
kouhei (in TOK)
2014/09/06 23:10:34
Hmm... this is a hard question.
I think we should
| |
| 358 void clearNeedsStyleRecalc(); | 359 void clearNeedsStyleRecalc(); |
| 359 | 360 |
| 360 bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistrib utionRecalcFlag); } | 361 bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistrib utionRecalcFlag); } |
| 361 void setChildNeedsDistributionRecalc() { setFlag(ChildNeedsDistributionReca lcFlag); } | 362 void setChildNeedsDistributionRecalc() { setFlag(ChildNeedsDistributionReca lcFlag); } |
| 362 void clearChildNeedsDistributionRecalc() { clearFlag(ChildNeedsDistribution RecalcFlag); } | 363 void clearChildNeedsDistributionRecalc() { clearFlag(ChildNeedsDistribution RecalcFlag); } |
| 363 void markAncestorsWithChildNeedsDistributionRecalc(); | 364 void markAncestorsWithChildNeedsDistributionRecalc(); |
| 364 | 365 |
| 365 bool childNeedsStyleInvalidation() const { return getFlag(ChildNeedsStyleInv alidationFlag); } | 366 bool childNeedsStyleInvalidation() const { return getFlag(ChildNeedsStyleInv alidationFlag); } |
| 366 void setChildNeedsStyleInvalidation() { setFlag(ChildNeedsStyleInvalidation Flag); } | 367 void setChildNeedsStyleInvalidation() { setFlag(ChildNeedsStyleInvalidation Flag); } |
| 367 void clearChildNeedsStyleInvalidation() { clearFlag(ChildNeedsStyleInvalida tionFlag); } | 368 void clearChildNeedsStyleInvalidation() { clearFlag(ChildNeedsStyleInvalida tionFlag); } |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 886 } // namespace blink | 887 } // namespace blink |
| 887 | 888 |
| 888 #ifndef NDEBUG | 889 #ifndef NDEBUG |
| 889 // Outside the WebCore namespace for ease of invocation from gdb. | 890 // Outside the WebCore namespace for ease of invocation from gdb. |
| 890 void showNode(const blink::Node*); | 891 void showNode(const blink::Node*); |
| 891 void showTree(const blink::Node*); | 892 void showTree(const blink::Node*); |
| 892 void showNodePath(const blink::Node*); | 893 void showNodePath(const blink::Node*); |
| 893 #endif | 894 #endif |
| 894 | 895 |
| 895 #endif // Node_h | 896 #endif // Node_h |
| OLD | NEW |