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

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

Issue 2563403002: [LayoutNG] Add Bidi reordering and fill in NGPhysicalTextFragment (Closed)
Patch Set: ikilpatrick review Created 4 years 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 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_);

Powered by Google App Engine
This is Rietveld 408576698