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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineIterator.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/InlineIterator.h
diff --git a/third_party/WebKit/Source/core/layout/line/InlineIterator.h b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
index b7b45207aa4d5e4df21ee892b46b1a2403777830..eb5fab1be15041124cd3430906ee3e7bc6d504ca 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineIterator.h
+++ b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
@@ -146,9 +146,11 @@ static inline WTF::Unicode::CharDirection embedCharFromDirection(
TextDirection dir,
EUnicodeBidi unicodeBidi) {
using namespace WTF::Unicode;
- if (unicodeBidi == Embed)
- return dir == RTL ? RightToLeftEmbedding : LeftToRightEmbedding;
- return dir == RTL ? RightToLeftOverride : LeftToRightOverride;
+ if (unicodeBidi == Embed) {
+ return dir == TextDirection::Rtl ? RightToLeftEmbedding
+ : LeftToRightEmbedding;
+ }
+ return dir == TextDirection::Rtl ? RightToLeftOverride : LeftToRightOverride;
}
static inline bool treatAsIsolated(const ComputedStyle& style) {
@@ -593,7 +595,7 @@ inline BidiRun* InlineBidiResolver::addTrailingRun(
BidiRun* newTrailingRun = new BidiRun(
context->override(), context->level(), start, stop, run->m_lineLayoutItem,
WTF::Unicode::OtherNeutral, context->dir());
- if (direction == LTR)
+ if (direction == TextDirection::Ltr)
runs.addRun(newTrailingRun);
else
runs.prependRun(newTrailingRun);
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineBox.h ('k') | third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698