| Index: third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.cc b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| index 35bf7b1678929c92c79f391e87a9d41b0764d76e..ddf10fb11c721164b50279acdf5d82c6d85dbc21 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| @@ -59,14 +59,14 @@ NGPhysicalOffset NGLogicalOffset::ConvertToPhysical(
|
| NGPhysicalSize inner_size) const {
|
| switch (mode) {
|
| case kHorizontalTopBottom:
|
| - if (direction == LTR)
|
| + if (direction == TextDirection::Ltr)
|
| return NGPhysicalOffset(inline_offset, block_offset);
|
| else
|
| return NGPhysicalOffset(
|
| outer_size.width - inline_offset - inner_size.width, block_offset);
|
| case kVerticalRightLeft:
|
| case kSidewaysRightLeft:
|
| - if (direction == LTR)
|
| + if (direction == TextDirection::Ltr)
|
| return NGPhysicalOffset(
|
| outer_size.width - block_offset - inner_size.width, inline_offset);
|
| else
|
| @@ -74,14 +74,14 @@ NGPhysicalOffset NGLogicalOffset::ConvertToPhysical(
|
| outer_size.width - block_offset - inner_size.width,
|
| outer_size.height - inline_offset - inner_size.height);
|
| case kVerticalLeftRight:
|
| - if (direction == LTR)
|
| + if (direction == TextDirection::Ltr)
|
| return NGPhysicalOffset(block_offset, inline_offset);
|
| else
|
| return NGPhysicalOffset(
|
| block_offset,
|
| outer_size.height - inline_offset - inner_size.height);
|
| case kSidewaysLeftRight:
|
| - if (direction == LTR)
|
| + if (direction == TextDirection::Ltr)
|
| return NGPhysicalOffset(
|
| block_offset,
|
| outer_size.height - inline_offset - inner_size.height);
|
| @@ -174,7 +174,7 @@ NGBoxStrut NGPhysicalBoxStrut::ConvertToLogical(NGWritingMode writing_mode,
|
| strut = {bottom, top, left, right};
|
| break;
|
| }
|
| - if (direction == RTL)
|
| + if (direction == TextDirection::Rtl)
|
| std::swap(strut.inline_start, strut.inline_end);
|
| return strut;
|
| }
|
| @@ -269,17 +269,20 @@ NGStaticPosition NGStaticPosition::Create(NGWritingMode writing_mode,
|
| position.offset = offset;
|
| switch (writing_mode) {
|
| case kHorizontalTopBottom:
|
| - position.type = (direction == LTR) ? kTopLeft : kTopRight;
|
| + position.type = (direction == TextDirection::Ltr) ? kTopLeft : kTopRight;
|
| break;
|
| case kVerticalRightLeft:
|
| case kSidewaysRightLeft:
|
| - position.type = (direction == LTR) ? kTopRight : kBottomRight;
|
| + position.type =
|
| + (direction == TextDirection::Ltr) ? kTopRight : kBottomRight;
|
| break;
|
| case kVerticalLeftRight:
|
| - position.type = (direction == LTR) ? kTopLeft : kBottomLeft;
|
| + position.type =
|
| + (direction == TextDirection::Ltr) ? kTopLeft : kBottomLeft;
|
| break;
|
| case kSidewaysLeftRight:
|
| - position.type = (direction == LTR) ? kBottomLeft : kTopLeft;
|
| + position.type =
|
| + (direction == TextDirection::Ltr) ? kBottomLeft : kTopLeft;
|
| break;
|
| }
|
| return position;
|
|
|