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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp

Issue 2462643002: Be more restrictive about forcing relayout of children for pagination. (Closed)
Patch Set: No need to call updateFragmentationInfoForChild() when not paginated. Created 4 years, 2 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/LayoutDeprecatedFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
index 2a6ac0ce733c96b8970fa8b93f16b9fc3d1f9053..00be42e62b562a3327660e22f3a59bd251774874 100644
--- a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
@@ -404,10 +404,6 @@ void LayoutDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) {
updateLayerTransformAfterLayout();
updateAfterLayout();
- if (view()->layoutState()->pageLogicalHeight())
- setPageLogicalOffset(
- view()->layoutState()->pageLogicalOffset(*this, logicalTop()));
-
clearNeedsLayout();
}
@@ -445,6 +441,7 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) {
LayoutUnit yPos = borderTop() + paddingTop();
LayoutUnit xPos = borderLeft() + paddingLeft();
bool heightSpecified = false;
+ bool paginated = view()->layoutState()->isPaginated();
LayoutUnit oldHeight;
LayoutUnit remainingSpace;
@@ -514,6 +511,9 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren) {
setHeight(std::max(size().height(), yPos + child->size().height() +
child->marginHeight()));
}
+
+ if (paginated)
+ updateFragmentationInfoForChild(*child);
}
if (!iterator.first() && hasLineIfEmpty())
@@ -784,6 +784,7 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren) {
LayoutUnit toAdd =
borderBottom() + paddingBottom() + horizontalScrollbarHeight();
bool heightSpecified = false;
+ bool paginated = view()->layoutState()->isPaginated();
LayoutUnit oldHeight;
LayoutUnit remainingSpace;
@@ -882,6 +883,9 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren) {
placeChild(child, LayoutPoint(childX, size().height()));
setHeight(size().height() + child->size().height() +
child->marginBottom());
+
+ if (paginated)
+ updateFragmentationInfoForChild(*child);
}
yPos = size().height();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698