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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1896803002: Fix TextAutosizer not to scheduleRelayout() by MarkContainerChainInLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 4eff15d1b6d74f8b5977249b082e66f85ceadbb9..18d63841a0296568e327253a7147815dcb4859c4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -88,6 +88,7 @@ enum HitTestFilter {
enum MarkingBehavior {
MarkOnlyThis,
MarkContainerChain,
+ MarkContainerChainInLayout,
};
enum MapCoordinatesMode {
@@ -810,8 +811,7 @@ public:
Element* offsetParent() const;
- void markContainerChainForLayout(bool scheduleRelayout = true);
- void markContainerChainForLayout(SubtreeLayoutScope*);
cbiesinger 2016/04/18 15:53:46 Thanks, the three versions of this function have b
kojii 2016/04/19 06:39:08 Great to hear that, thought it's good before, but
+ void markContainerChainForLayout(bool scheduleRelayout = true, SubtreeLayoutScope* = nullptr);
void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr);
void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTracing, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = nullptr);
void clearNeedsLayout();
@@ -1606,8 +1606,6 @@ private:
void setNeedsOverflowRecalcAfterStyleChange();
- void markContainerChainForLayout(bool scheduleRelayout, SubtreeLayoutScope*);
-
// FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox
// recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700.
inline void markContainingBlocksForOverflowRecalc();
@@ -2016,8 +2014,8 @@ inline void LayoutObject::setNeedsLayout(LayoutInvalidationReasonForTracing reas
TRACE_EVENT_SCOPE_THREAD,
"data",
InspectorLayoutInvalidationTrackingEvent::data(this, reason));
- if (markParents == MarkContainerChain && (!layouter || layouter->root() != this))
- markContainerChainForLayout(layouter);
+ if (markParents != MarkOnlyThis && (!layouter || layouter->root() != this))
+ markContainerChainForLayout(!layouter && markParents == MarkContainerChain, layouter);
}
}
@@ -2053,8 +2051,8 @@ inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, Subtr
bool alreadyNeededLayout = normalChildNeedsLayout();
setNormalChildNeedsLayout(true);
// FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and remove the MarkingBehavior argument entirely.
- if (!alreadyNeededLayout && markParents == MarkContainerChain && (!layouter || layouter->root() != this))
- markContainerChainForLayout(layouter);
+ if (!alreadyNeededLayout && markParents != MarkOnlyThis && (!layouter || layouter->root() != this))
+ markContainerChainForLayout(!layouter && markParents == MarkContainerChain, layouter);
}
inline void LayoutObject::setNeedsPositionedMovementLayout()

Powered by Google App Engine
This is Rietveld 408576698