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

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

Issue 2467353003: Remove pageLogicalHeightChanged() from LayoutState. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c633ed2fc07dfc64fb31b29b623f75520fd98366..605c990b65b93b50879aac549a6e53232b9cc04a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -484,8 +484,7 @@ inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren,
if (pageLogicalHeightChanged)
relayoutChildren = true;
- LayoutState state(*this, pageLogicalHeight, pageLogicalHeightChanged,
- logicalWidthChanged);
+ LayoutState state(*this, pageLogicalHeight, logicalWidthChanged);
if (m_paginationStateChanged) {
// We now need a deep layout to clean up struts after pagination, if we
@@ -3533,13 +3532,8 @@ FloatingObject* LayoutBlockFlow::insertFloatingObject(LayoutBox& floatBox) {
std::unique_ptr<FloatingObject> newObj = FloatingObject::create(&floatBox);
- // Our location is irrelevant if we're unsplittable or no pagination is in
- // effect. Just go ahead and lay out the float.
- bool isChildLayoutBlock = floatBox.isLayoutBlock();
- if (isChildLayoutBlock && !floatBox.needsLayout() &&
- view()->layoutState()->pageLogicalHeightChanged())
- floatBox.setChildNeedsLayout(MarkOnlyThis);
-
+ // TODO(mstensho): Avoid laying out before positioning the object, as that's
+ // bad for pagination.
floatBox.layoutIfNeeded();
setLogicalWidthForFloat(*newObj, logicalWidthForChild(floatBox) +
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698