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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc

Issue 2893493003: Respect the clearance while positioning pending floats. (Closed)
Patch Set: git rebase-update Created 3 years, 7 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/ng/ng_block_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
index 4de844a6100a63a182e4b7a303e4a8cf4f8700de..502f0a72b96d6d281d486c1fcdf4488cec91df0b 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -24,16 +24,6 @@
namespace blink {
namespace {
-// Adjusts {@code offset} to the clearance line.
-void AdjustToClearance(const WTF::Optional<LayoutUnit>& clearance_offset,
- NGLogicalOffset* offset) {
- DCHECK(offset);
- if (clearance_offset) {
- offset->block_offset =
- std::max(clearance_offset.value(), offset->block_offset);
- }
-}
-
// Returns if a child may be affected by its clear property. I.e. it will
// actually clear a float.
bool ClearanceMayAffectLayout(
@@ -654,8 +644,8 @@ RefPtr<NGConstraintSpace> NGBlockLayoutAlgorithm::CreateConstraintSpaceForChild(
}
space_builder
- .SetClearanceOffset(
- GetClearanceOffset(constraint_space_->Exclusions(), child_style))
+ .SetClearanceOffset(GetClearanceOffset(constraint_space_->Exclusions(),
+ child_style.Clear()))
.SetIsShrinkToFit(ShouldShrinkToFit(Style(), child_style))
.SetTextDirection(child_style.Direction());
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698