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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_floats_utils.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_floats_utils.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc
index 1e3e467b5c9c4cd0723c2adc2d303835b268a76c..89147e5b3f91d54214140c33c0c253f400f3398a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc
@@ -10,6 +10,7 @@
#include "core/layout/ng/ng_layout_result.h"
#include "core/layout/ng/ng_length_utils.h"
#include "core/layout/ng/ng_min_max_content_size.h"
+#include "core/layout/ng/ng_space_utils.h"
namespace blink {
namespace {
@@ -39,6 +40,11 @@ NGLayoutOpportunity FindLayoutOpportunityForFloat(
LayoutUnit inline_size) {
NGLogicalOffset adjusted_origin_point =
AdjustToTopEdgeAlignmentRule(space, unpositioned_float.origin_offset);
+ WTF::Optional<LayoutUnit> clearance_offset =
+ GetClearanceOffset(space.Exclusions(), unpositioned_float.ClearType());
+
+ AdjustToClearance(clearance_offset, &adjusted_origin_point);
+
return FindLayoutOpportunityForFragment(
space.Exclusions().get(), unpositioned_float.available_size,
adjusted_origin_point, unpositioned_float.margins,

Powered by Google App Engine
This is Rietveld 408576698