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

Unified Diff: third_party/WebKit/Source/platform/LengthBox.cpp

Issue 2925293003: Cleanup TextDirection (Closed)
Patch Set: unsigned to uint8_t Created 3 years, 6 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/platform/LengthBox.cpp
diff --git a/third_party/WebKit/Source/platform/LengthBox.cpp b/third_party/WebKit/Source/platform/LengthBox.cpp
index 975087cbf25d7b800b5d58f8d92f431d5e63055e..2dede65da8d5e421b2a816bae85a6538bd50fbce 100644
--- a/third_party/WebKit/Source/platform/LengthBox.cpp
+++ b/third_party/WebKit/Source/platform/LengthBox.cpp
@@ -83,8 +83,8 @@ const Length& LengthBox::Start(WritingMode writing_mode,
const Length& right,
const Length& bottom) {
if (IsHorizontalWritingMode(writing_mode))
- return IsLeftToRightDirection(direction) ? left : right;
- return IsLeftToRightDirection(direction) ? top : bottom;
+ return IsLtr(direction) ? left : right;
+ return IsLtr(direction) ? top : bottom;
}
const Length& LengthBox::End(WritingMode writing_mode,
@@ -94,8 +94,8 @@ const Length& LengthBox::End(WritingMode writing_mode,
const Length& right,
const Length& bottom) {
if (IsHorizontalWritingMode(writing_mode))
- return IsLeftToRightDirection(direction) ? right : left;
- return IsLeftToRightDirection(direction) ? bottom : top;
+ return IsLtr(direction) ? right : left;
+ return IsLtr(direction) ? bottom : top;
}
const Length& LengthBox::Over(WritingMode writing_mode,

Powered by Google App Engine
This is Rietveld 408576698