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

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

Issue 2695963005: WIP: redirect some LayoutBox methods to ng fragments
Patch Set: Created 3 years, 10 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 dfbad215933f77e5736b1095a01879700ee78459..92f053ef72f3fd11b5d7078e364e44d01faf003c 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
@@ -170,11 +170,20 @@ RefPtr<NGPhysicalBoxFragment> NGFragmentBuilder::ToBoxFragment() {
positioned_floats.push_back(floating_object);
}
- return adoptRef(new NGPhysicalBoxFragment(
- layout_object_, physical_size, overflow_.ConvertToPhysical(writing_mode_),
- children_, out_of_flow_descendants_, out_of_flow_positions_,
- unpositioned_floats_, positioned_floats_, bfc_offset_, end_margin_strut_,
- break_token));
+ RefPtr<NGPhysicalBoxFragment> final_box_fragment = adoptRef(
+ new NGPhysicalBoxFragment(layout_object_, physical_size,
+ overflow_.ConvertToPhysical(writing_mode_),
+ children_, out_of_flow_descendants_,
+ out_of_flow_positions_, unpositioned_floats_,
+ positioned_floats_, bfc_offset_,
+ end_margin_strut_, break_token));
+
+ if (layout_object_) {
+ // layout_object_ can be null in unit tests.
+ toLayoutBox(layout_object_)->setNGPhysicalFragment(final_box_fragment);
+ }
+
+ return final_box_fragment;
}
RefPtr<NGPhysicalTextFragment> NGFragmentBuilder::ToTextFragment(

Powered by Google App Engine
This is Rietveld 408576698