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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.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/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 5e2aa45b1220394594c2aa91ab356a823d27322b..7e6e0ea4d9d8bc03a1e7226a5da400d98d7016cf 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -455,11 +455,6 @@ void LayoutBlockFlow::layoutBlock(bool relayoutChildren) {
while (!done)
done = layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope);
- LayoutView* layoutView = view();
- if (layoutView->layoutState()->pageLogicalHeight())
- setPageLogicalOffset(
- layoutView->layoutState()->pageLogicalOffset(*this, logicalTop()));
-
updateLayerTransformAfterLayout();
updateAfterLayout();
@@ -780,10 +775,12 @@ bool LayoutBlockFlow::positionAndLayoutOnceIfNeeded(
}
}
- if (!child.needsLayout())
- return false;
- child.layout();
- return true;
+ bool neededLayout = child.needsLayout();
+ if (neededLayout)
+ child.layout();
+ if (view()->layoutState()->isPaginated())
+ updateFragmentationInfoForChild(child);
+ return neededLayout;
}
void LayoutBlockFlow::insertForcedBreakBeforeChildIfNeeded(
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698