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

Unified Diff: Source/platform/fonts/mac/ComplexTextController.cpp

Issue 343813002: Explicitly compare FontVariant to enumerators. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/ComplexTextController.cpp
diff --git a/Source/platform/fonts/mac/ComplexTextController.cpp b/Source/platform/fonts/mac/ComplexTextController.cpp
index 75353ad5c12d70c4813b20105554011afe3e2c74..e325daebffd8559ea5653682f54aa138d3e9a9f8 100644
--- a/Source/platform/fonts/mac/ComplexTextController.cpp
+++ b/Source/platform/fonts/mac/ComplexTextController.cpp
@@ -244,7 +244,7 @@ void ComplexTextController::collectComplexTextRuns()
} else
cp = m_run.characters16();
- if (m_font.fontDescription().variant())
+ if (m_font.fontDescription().variant() == FontVariantSmallCaps)
m_smallCapsBuffer.resize(m_end);
unsigned indexOfFontTransition = 0;
@@ -265,7 +265,7 @@ void ComplexTextController::collectComplexTextRuns()
UChar uppercaseCharacter = 0;
bool isSmallCaps;
- bool nextIsSmallCaps = m_font.fontDescription().variant() && !(U_GET_GC_MASK(baseCharacter) & U_GC_M_MASK) && (uppercaseCharacter = u_toupper(baseCharacter)) != baseCharacter;
+ bool nextIsSmallCaps = m_font.fontDescription().variant() == FontVariantSmallCaps && !(U_GET_GC_MASK(baseCharacter) & U_GC_M_MASK) && (uppercaseCharacter = u_toupper(baseCharacter)) != baseCharacter;
if (nextIsSmallCaps) {
m_smallCapsBuffer[sequenceStart - cp] = uppercaseCharacter;
« no previous file with comments | « Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698