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

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: Rebased 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
« no previous file with comments | « Source/core/layout/style/LayoutStyle.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontDescription.h
diff --git a/Source/platform/fonts/FontDescription.h b/Source/platform/fonts/FontDescription.h
index 9abb94e1c70b8af63885652803bb7fe3ebc16ba8..5642f60c8db2608f0943581f027ec8a7676528c2 100644
--- a/Source/platform/fonts/FontDescription.h
+++ b/Source/platform/fonts/FontDescription.h
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIother.m_ If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USm_
+ * Boston, MA 02110-1301, USA.
*
*/
@@ -45,6 +45,8 @@
namespace blink {
+const float FontSizeAdjustNone = -1;
+
class PLATFORM_EXPORT FontDescription {
public:
enum GenericFamilyType { NoFamily, StandardFamily, SerifFamily, SansSerifFamily,
@@ -58,7 +60,7 @@ public:
: m_specifiedSize(0)
, m_computedSize(0)
, m_adjustedSize(0)
- , m_sizeAdjust(0)
+ , m_sizeAdjust(FontSizeAdjustNone)
, m_letterSpacing(0)
, m_wordSpacing(0)
, m_orientation(Horizontal)
@@ -135,6 +137,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 != FontSizeAdjustNone; }
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); }
« no previous file with comments | « Source/core/layout/style/LayoutStyle.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698