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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Added 2 changes in mac files 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/platform/fonts/shaping/ShapeResult.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
index 26a3c2592bd60cbeba80e982c74cdb9f78e46f58..0df6f21f1991b6e2194c43e68261021db270f386 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
@@ -155,7 +155,7 @@ ShapeResult::ShapeResult(const Font* font,
m_primaryFont(const_cast<SimpleFontData*>(font->primaryFont())),
m_numCharacters(numCharacters),
m_numGlyphs(0),
- m_direction(direction),
+ m_direction(static_cast<unsigned>(direction)),
m_hasVerticalOffsets(0) {}
ShapeResult::ShapeResult(const ShapeResult& other)
@@ -186,7 +186,7 @@ int ShapeResult::offsetForPosition(float targetX,
int charactersSoFar = 0;
float currentX = 0;
- if (m_direction == RTL) {
+ if (rtl()) {
charactersSoFar = m_numCharacters;
for (unsigned i = 0; i < m_runs.size(); ++i) {
if (!m_runs[i])

Powered by Google App Engine
This is Rietveld 408576698