| 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 f431434b207237f78a041a23472e9a776d166cb9..fae5e5de4ed87e887982ff4101569371f420cb98 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
|
| @@ -57,14 +57,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
|
| @@ -72,14 +72,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);
|
| @@ -172,7 +172,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;
|
| }
|
| @@ -267,17 +267,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;
|
|
|