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 925eecd41c53f70e0a92c8d8535a9c8fb555e7cd..a246a45940795d31992ff7e5b215b1582d9de5d3 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 |
@@ -7,6 +7,7 @@ |
#include "core/layout/ng/ng_block_node.h" |
#include "core/layout/ng/ng_fragment_base.h" |
#include "core/layout/ng/ng_physical_fragment.h" |
+#include "core/layout/ng/ng_physical_text_fragment.h" |
namespace blink { |
@@ -148,6 +149,18 @@ NGPhysicalFragment* NGFragmentBuilder::ToFragment() { |
out_of_flow_descendants_, out_of_flow_positions_, margin_strut_); |
} |
+NGPhysicalTextFragment* NGFragmentBuilder::ToTextFragment(NGInlineNode* node, |
+ unsigned start_index, |
+ unsigned end_index) { |
+ DCHECK_EQ(type_, NGPhysicalFragmentBase::kFragmentText); |
+ DCHECK(children_.isEmpty()); |
+ DCHECK(offsets_.isEmpty()); |
+ return new NGPhysicalTextFragment( |
+ node, start_index, end_index, size_.ConvertToPhysical(writing_mode_), |
+ overflow_.ConvertToPhysical(writing_mode_), out_of_flow_descendants_, |
+ out_of_flow_positions_); |
+} |
+ |
DEFINE_TRACE(NGFragmentBuilder) { |
visitor->trace(children_); |
visitor->trace(out_of_flow_descendant_candidates_); |