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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineBox.h

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/line/InlineBox.h
diff --git a/third_party/WebKit/Source/core/layout/line/InlineBox.h b/third_party/WebKit/Source/core/layout/line/InlineBox.h
index 6254dc914172d07817d803121df6a90bce388f83..a55b0615e520139115059dfd407a6d23a4b9f7ce 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineBox.h
+++ b/third_party/WebKit/Source/core/layout/line/InlineBox.h
@@ -300,8 +300,12 @@ class CORE_EXPORT InlineBox : public DisplayItemClient {
void setBidiLevel(unsigned char level) {
m_bitfields.setBidiEmbeddingLevel(level);
}
- TextDirection direction() const { return bidiLevel() % 2 ? RTL : LTR; }
- bool isLeftToRightDirection() const { return direction() == LTR; }
+ TextDirection direction() const {
+ return bidiLevel() % 2 ? TextDirection::Rtl : TextDirection::Ltr;
+ }
+ bool isLeftToRightDirection() const {
+ return direction() == TextDirection::Ltr;
+ }
int caretLeftmostOffset() const {
return isLeftToRightDirection() ? caretMinOffset() : caretMaxOffset();
}

Powered by Google App Engine
This is Rietveld 408576698