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

Unified Diff: third_party/WebKit/Source/core/layout/TextRunConstructor.cpp

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/TextRunConstructor.cpp
diff --git a/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp b/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp
index d31e6455e47e59ed135b4696686a295f65ea0022..39854171939cb5004f6b09bf135c6440a0e1960d 100644
--- a/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp
+++ b/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp
@@ -129,7 +129,7 @@ TextRun constructTextRun(const Font& font,
TextRunFlags flags) {
return constructTextRun(font, string, style,
string.isEmpty() || string.is8Bit()
- ? LTR
+ ? TextDirection::Ltr
: determineDirectionality(string),
flags);
}
@@ -140,15 +140,17 @@ TextRun constructTextRun(const Font& font,
unsigned length,
const ComputedStyle& style) {
ASSERT(offset + length <= text.textLength());
- if (text.hasEmptyText())
+ if (text.hasEmptyText()) {
return constructTextRunInternal(font, static_cast<const LChar*>(nullptr), 0,
- style, LTR);
- if (text.is8Bit())
+ style, TextDirection::Ltr);
+ }
+ if (text.is8Bit()) {
return constructTextRunInternal(font, text.characters8() + offset, length,
- style, LTR);
+ style, TextDirection::Ltr);
+ }
TextRun run = constructTextRunInternal(font, text.characters16() + offset,
- length, style, LTR);
+ length, style, TextDirection::Ltr);
run.setDirection(directionForRun(run));
return run;
}

Powered by Google App Engine
This is Rietveld 408576698