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

Unified Diff: Source/platform/fonts/FontDescription.h

Issue 1024473004: Do not treat '0' as 'none' for font-size-adjust (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
Index: Source/platform/fonts/FontDescription.h
diff --git a/Source/platform/fonts/FontDescription.h b/Source/platform/fonts/FontDescription.h
index 9abb94e1c70b8af63885652803bb7fe3ebc16ba8..feddc4e6a37b1d59beacdb003462e90808d85547 100644
--- a/Source/platform/fonts/FontDescription.h
+++ b/Source/platform/fonts/FontDescription.h
@@ -47,6 +47,7 @@ namespace blink {
class PLATFORM_EXPORT FontDescription {
public:
+ enum SizeAdjust { SizeAdjustNone = -1 };
dstockwell 2015/03/20 03:24:29 This should be a const, not an enum.
changseok 2015/03/20 08:29:39 Done.
enum GenericFamilyType { NoFamily, StandardFamily, SerifFamily, SansSerifFamily,
MonospaceFamily, CursiveFamily, FantasyFamily, PictographFamily };
@@ -58,7 +59,7 @@ public:
: m_specifiedSize(0)
, m_computedSize(0)
, m_adjustedSize(0)
- , m_sizeAdjust(0)
+ , m_sizeAdjust(SizeAdjustNone)
, m_letterSpacing(0)
, m_wordSpacing(0)
, m_orientation(Horizontal)
@@ -135,6 +136,7 @@ public:
float computedSize() const { return m_computedSize; }
float adjustedSize() const { return m_adjustedSize; }
float sizeAdjust() const { return m_sizeAdjust; }
+ bool hasSizeAdjust() const { return m_sizeAdjust >= 0; }
dstockwell 2015/03/20 03:24:29 Should be != SizeAdjustNone.
changseok 2015/03/20 08:29:39 Done.
FontStyle style() const { return static_cast<FontStyle>(m_style); }
int computedPixelSize() const { return int(m_computedSize + 0.5f); }
FontVariant variant() const { return static_cast<FontVariant>(m_variant); }

Powered by Google App Engine
This is Rietveld 408576698