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

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: 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/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 540d943bde30eec6836a942eb6dcaf4ce270c1b4..9158d80eb783abd6c187b069f66368f5424877a9 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