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

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

Issue 2872593003: [LayoutNG] Introduce NGPositionedFloat. (Closed)
Patch Set: address comments. 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_fragment_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
index d2c037778a6d9b2f84f8cf120b118069c6032dbb..e75e3ca158fcbd8fb7668cea5aef5c1ba2d7dc99 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
@@ -196,14 +196,10 @@ RefPtr<NGLayoutResult> NGFragmentBuilder::ToBoxFragment() {
break_token = NGBlockBreakToken::Create(node_.Get());
}
- for (auto& floating_object : positioned_floats_) {
- DCHECK(floating_object->logical_offset)
- << "logical_offset should be set for a positioned float.";
- NGPhysicalFragment* floating_fragment = floating_object->fragment.Get();
- floating_fragment->SetOffset(
- floating_object->logical_offset.value().ConvertToPhysical(
- writing_mode_, direction_, physical_size,
- floating_fragment->Size()));
+ for (auto& positioned_float : positioned_floats_) {
+ NGPhysicalFragment* floating_fragment = positioned_float.fragment.Get();
+ floating_fragment->SetOffset(positioned_float.offset.ConvertToPhysical(
+ writing_mode_, direction_, physical_size, floating_fragment->Size()));
}
RefPtr<NGPhysicalBoxFragment> fragment = AdoptRef(new NGPhysicalBoxFragment(

Powered by Google App Engine
This is Rietveld 408576698