Commit 90d863bc authored by mstensho's avatar mstensho Committed by Commit bot

[LayoutNG] Remove all mentions of NGBox and NGInlineBox.

It's called NGBlockNode and NGInlineNode now.

Also removed an old TODO about common base class for NGBlockNode and
NGInlineNode. They do have a common base class now.

Review-Url: https://codereview.chromium.org/2530083003
Cr-Commit-Position: refs/heads/master@{#434630}
parent 6a5b9a93
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef NGBox_h #ifndef NGBlockNode_h
#define NGBox_h #define NGBlockNode_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/layout/ng/ng_layout_input_node.h" #include "core/layout/ng/ng_layout_input_node.h"
...@@ -91,4 +91,4 @@ DEFINE_TYPE_CASTS(NGBlockNode, ...@@ -91,4 +91,4 @@ DEFINE_TYPE_CASTS(NGBlockNode,
} // namespace blink } // namespace blink
#endif // NGBox_h #endif // NGBlockNode
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef NGInlineBox_h #ifndef NGInlineNode_h
#define NGInlineBox_h #define NGInlineNode_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/layout/ng/ng_layout_input_node.h" #include "core/layout/ng/ng_layout_input_node.h"
...@@ -29,7 +29,6 @@ class NGPhysicalFragment; ...@@ -29,7 +29,6 @@ class NGPhysicalFragment;
struct MinAndMaxContentSizes; struct MinAndMaxContentSizes;
// Represents an inline node to be laid out. // Represents an inline node to be laid out.
// TODO(layout-dev): Make this and NGBlockNode inherit from a common class.
class CORE_EXPORT NGInlineNode : public NGLayoutInputNode { class CORE_EXPORT NGInlineNode : public NGLayoutInputNode {
public: public:
NGInlineNode(LayoutObject* start_inline, ComputedStyle* block_style); NGInlineNode(LayoutObject* start_inline, ComputedStyle* block_style);
...@@ -129,4 +128,4 @@ DEFINE_TYPE_CASTS(NGInlineNode, ...@@ -129,4 +128,4 @@ DEFINE_TYPE_CASTS(NGInlineNode,
} // namespace blink } // namespace blink
#endif // NGInlineBox_h #endif // NGInlineNode_h
...@@ -39,9 +39,9 @@ class NGInlineNodeForTest : public NGInlineNode { ...@@ -39,9 +39,9 @@ class NGInlineNodeForTest : public NGInlineNode {
void SegmentText() { NGInlineNode::SegmentText(); } void SegmentText() { NGInlineNode::SegmentText(); }
}; };
class NGInlineBoxTest : public ::testing::Test {}; class NGInlineNodeTest : public ::testing::Test {};
TEST_F(NGInlineBoxTest, SegmentASCII) { TEST_F(NGInlineNodeTest, SegmentASCII) {
RefPtr<ComputedStyle> style = ComputedStyle::create(); RefPtr<ComputedStyle> style = ComputedStyle::create();
NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get()); NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get());
box->AppendText("Hello"); box->AppendText("Hello");
...@@ -53,7 +53,7 @@ TEST_F(NGInlineBoxTest, SegmentASCII) { ...@@ -53,7 +53,7 @@ TEST_F(NGInlineBoxTest, SegmentASCII) {
EXPECT_EQ(LTR, item.Direction()); EXPECT_EQ(LTR, item.Direction());
} }
TEST_F(NGInlineBoxTest, SegmentHebrew) { TEST_F(NGInlineNodeTest, SegmentHebrew) {
RefPtr<ComputedStyle> style = ComputedStyle::create(); RefPtr<ComputedStyle> style = ComputedStyle::create();
NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get()); NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get());
box->AppendText(u"\u05E2\u05D1\u05E8\u05D9\u05EA"); box->AppendText(u"\u05E2\u05D1\u05E8\u05D9\u05EA");
...@@ -65,7 +65,7 @@ TEST_F(NGInlineBoxTest, SegmentHebrew) { ...@@ -65,7 +65,7 @@ TEST_F(NGInlineBoxTest, SegmentHebrew) {
EXPECT_EQ(RTL, item.Direction()); EXPECT_EQ(RTL, item.Direction());
} }
TEST_F(NGInlineBoxTest, SegmentSplit1To2) { TEST_F(NGInlineNodeTest, SegmentSplit1To2) {
RefPtr<ComputedStyle> style = ComputedStyle::create(); RefPtr<ComputedStyle> style = ComputedStyle::create();
NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get()); NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get());
box->AppendText(u"Hello \u05E2\u05D1\u05E8\u05D9\u05EA"); box->AppendText(u"Hello \u05E2\u05D1\u05E8\u05D9\u05EA");
...@@ -81,7 +81,7 @@ TEST_F(NGInlineBoxTest, SegmentSplit1To2) { ...@@ -81,7 +81,7 @@ TEST_F(NGInlineBoxTest, SegmentSplit1To2) {
EXPECT_EQ(RTL, item.Direction()); EXPECT_EQ(RTL, item.Direction());
} }
TEST_F(NGInlineBoxTest, SegmentSplit3To4) { TEST_F(NGInlineNodeTest, SegmentSplit3To4) {
RefPtr<ComputedStyle> style = ComputedStyle::create(); RefPtr<ComputedStyle> style = ComputedStyle::create();
NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get()); NGInlineNodeForTest* box = new NGInlineNodeForTest(style.get());
box->AppendText("Hel"); box->AppendText("Hel");
......
...@@ -50,4 +50,4 @@ class CORE_EXPORT NGLayoutInputNode ...@@ -50,4 +50,4 @@ class CORE_EXPORT NGLayoutInputNode
} // namespace blink } // namespace blink
#endif // NGInlineBox_h #endif // NGLayoutInputNode_h
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment