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

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

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Rebase after reopen 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_block_layout_algorithm_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
index 1edba9c7e7d1f302886a2921d4357862469f829d..37499446187cc4792c43141e13e1d0dc6b406d24 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -57,7 +57,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, FixedSize) {
style_->setHeight(Length(40, Fixed));
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
NGPhysicalFragmentBase* frag = RunBlockLayoutAlgorithm(space, nullptr);
@@ -87,7 +87,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, LayoutBlockChildren) {
first_child->SetNextSibling(second_child);
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, first_child);
@@ -133,7 +133,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, LayoutBlockChildrenWithWritingMode) {
div1->SetFirstChild(div2);
auto* space =
- ConstructConstraintSpace(kHorizontalTopBottom, LTR,
+ ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(500), LayoutUnit(500)));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
@@ -181,7 +181,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase1) {
.SetAvailableSize(NGLogicalSize(LayoutUnit(100), NGSizeIndefinite))
.SetPercentageResolutionSize(
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite))
- .SetTextDirection(LTR)
+ .SetTextDirection(TextDirection::Ltr)
.SetIsNewFormattingContext(true)
.ToConstraintSpace();
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
@@ -256,7 +256,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase2) {
div6->SetNextSibling(div7);
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
@@ -305,7 +305,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase3) {
div1->SetFirstChild(div2);
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
@@ -354,7 +354,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase4) {
div1->SetFirstChild(div2);
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
@@ -409,8 +409,9 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase5) {
vertical_div->SetNextSibling(horizontal_div);
- auto* space = ConstructConstraintSpace(
- kVerticalLeftRight, LTR, NGLogicalSize(LayoutUnit(500), LayoutUnit(500)));
+ auto* space =
+ ConstructConstraintSpace(kVerticalLeftRight, TextDirection::Ltr,
+ NGLogicalSize(LayoutUnit(500), LayoutUnit(500)));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, vertical_div);
ASSERT_EQ(frag->Children().size(), 2UL);
@@ -467,7 +468,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase6) {
div1->SetNextSibling(div3);
auto* space =
- ConstructConstraintSpace(kHorizontalTopBottom, LTR,
+ ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(500), LayoutUnit(500)));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
@@ -530,7 +531,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, BorderAndPadding) {
div1->SetFirstChild(div2);
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
@@ -564,7 +565,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, PercentageResolutionSize) {
NGBlockNode* first_child = new NGBlockNode(first_style.get());
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, first_child);
@@ -592,7 +593,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, AutoMargin) {
NGBlockNode* first_child = new NGBlockNode(first_style.get());
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, first_child);
@@ -673,7 +674,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, PositionFloatFragments) {
div3->SetNextSibling(div4);
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize)));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
ASSERT_EQ(frag->Children().size(), 4UL);
@@ -750,7 +751,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, PositionFragmentsWithClear) {
// clear: left;
div3_style->setClear(EClear::ClearLeft);
auto* space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize)));
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
const NGPhysicalFragmentBase* child3 = frag->Children()[2];
@@ -759,7 +760,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, PositionFragmentsWithClear) {
// clear: right;
div3_style->setClear(EClear::ClearRight);
space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize)));
frag = RunBlockLayoutAlgorithm(space, div1);
child3 = frag->Children()[2];
@@ -768,11 +769,11 @@ TEST_F(NGBlockLayoutAlgorithmTest, PositionFragmentsWithClear) {
// clear: both;
div3_style->setClear(EClear::ClearBoth);
space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize)));
frag = RunBlockLayoutAlgorithm(space, div1);
space = ConstructConstraintSpace(
- kHorizontalTopBottom, LTR,
+ kHorizontalTopBottom, TextDirection::Ltr,
NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize)));
child3 = frag->Children()[2];
EXPECT_EQ(kDiv1Size + kDiv2Size, child3->TopOffset());

Powered by Google App Engine
This is Rietveld 408576698