Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: Source/core/dom/Node.h

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use const char[] Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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(StyleChangeReasonString, StyleChangeType);
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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 } // namespace blink 888 } // namespace blink
888 889
889 #ifndef NDEBUG 890 #ifndef NDEBUG
890 // Outside the WebCore namespace for ease of invocation from gdb. 891 // Outside the WebCore namespace for ease of invocation from gdb.
891 void showNode(const blink::Node*); 892 void showNode(const blink::Node*);
892 void showTree(const blink::Node*); 893 void showTree(const blink::Node*);
893 void showNodePath(const blink::Node*); 894 void showNodePath(const blink::Node*);
894 #endif 895 #endif
895 896
896 #endif // Node_h 897 #endif // Node_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698