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

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

Issue 2764753007: [LayoutNG] Add NGLineBoxFragment (Closed)
Patch Set: Created 3 years, 9 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_inline_node_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc
index dccce555d7fa6aac15b6e5a4835dc4126d51dc4f..ffd934b6fbadf32ffc056887d704bfa189b0703f 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc
@@ -10,6 +10,7 @@
#include "core/layout/ng/ng_fragment_builder.h"
#include "core/layout/ng/ng_line_builder.h"
#include "core/layout/ng/ng_physical_box_fragment.h"
+#include "core/layout/ng/ng_physical_linebox_fragment.h"
#include "core/layout/ng/ng_physical_text_fragment.h"
#include "core/layout/ng/ng_text_fragment.h"
#include "core/layout/ng/ng_text_layout_algorithm.h"
@@ -98,9 +99,12 @@ class NGInlineNodeTest : public RenderingTest {
algorithm.LayoutInline(&line_builder);
RefPtr<NGLayoutResult> result = line_builder.CreateFragments();
- for (const auto& child :
- toNGPhysicalBoxFragment(result->PhysicalFragment().get())
- ->Children()) {
+ const NGPhysicalBoxFragment* container =
+ toNGPhysicalBoxFragment(result->PhysicalFragment().get());
+ EXPECT_EQ(container->Children().size(), 1u);
+ const NGPhysicalLineboxFragment* line =
+ toNGPhysicalLineboxFragment(container->Children()[0].get());
+ for (const auto& child : line->Children()) {
fragments_out->push_back(toNGPhysicalTextFragment(child.get()));
}
}

Powered by Google App Engine
This is Rietveld 408576698