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

Unified Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: Commit the renames Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Node.h
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index bd9263fd3a8d5a93d7b43d20eb8f2443d8824bba..f5e5d8b03127113d9c7d79d1c1ee4956c1593e13 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -84,8 +84,7 @@ const int nodeCustomElementShift = 20;
enum StyleChangeType {
NoStyleChange = 0,
LocalStyleChange = 1 << nodeStyleChangeShift,
- SubtreeStyleChange = 2 << nodeStyleChangeShift,
- NeedsReattachStyleChange = 3 << nodeStyleChangeShift,
+ SubtreeStyleChange = 2 << nodeStyleChangeShift
nainar 2016/11/29 06:13:39 Redundant information this is encapsulated in Need
};
enum class CustomElementState {
@@ -396,9 +395,6 @@ class CORE_EXPORT Node : public EventTarget {
return isUserActionElement() && isUserActionElementFocused();
}
- bool needsAttach() const {
nainar 2016/11/29 06:13:39 Redundant information this is encapsulated in need
- return getStyleChangeType() == NeedsReattachStyleChange;
- }
bool needsStyleRecalc() const {
return getStyleChangeType() != NoStyleChange;
}
@@ -430,6 +426,7 @@ class CORE_EXPORT Node : public EventTarget {
}
void setNeedsReattachLayoutTree();
+ void setLocalNeedsReattachLayoutTree() { setFlag(NeedsReattachLayoutTree); }
void setChildNeedsReattachLayoutTree() {
setFlag(ChildNeedsReattachLayoutTree);
}
@@ -832,7 +829,7 @@ class CORE_EXPORT Node : public EventTarget {
NeedsReattachLayoutTree = 1 << 26,
ChildNeedsReattachLayoutTree = 1 << 27,
- DefaultNodeFlags = IsFinishedParsingChildrenFlag | NeedsReattachStyleChange
+ DefaultNodeFlags = IsFinishedParsingChildrenFlag
};
// 4 bits remaining.
@@ -968,7 +965,7 @@ inline ContainerNode* Node::parentNode() const {
}
inline void Node::lazyReattachIfAttached() {
- if (getStyleChangeType() == NeedsReattachStyleChange)
+ if (needsReattachLayoutTree())
return;
if (!inActiveDocument())
return;
@@ -977,7 +974,7 @@ inline void Node::lazyReattachIfAttached() {
context.performingReattach = true;
detachLayoutTree(context);
- markAncestorsWithChildNeedsStyleRecalc();
+ markAncestorsWithChildNeedsReattachLayoutTree();
nainar 2016/11/29 06:13:39 Changed to the equivalent reattachLayoutTree funct
}
inline bool Node::shouldCallRecalcStyle(StyleRecalcChange change) {

Powered by Google App Engine
This is Rietveld 408576698