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

Unified Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.h

Issue 2192483002: Move bounds and width function sanity checks to computation function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/SimpleFontData.h
diff --git a/third_party/WebKit/Source/platform/fonts/SimpleFontData.h b/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
index 75ca7335ffe4d19c8961bac297a4dd47d06ae58d..c03e6f33b65d6c0b9f23d699f620ec4776d26f51 100644
--- a/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
+++ b/third_party/WebKit/Source/platform/fonts/SimpleFontData.h
@@ -186,11 +186,6 @@ private:
ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
{
- if (!m_platformData.size())
- return FloatRect();
-
- static_assert(sizeof(glyph) == 2, "Glyph id should not be truncated.");
-
FloatRect boundsResult;
if (m_glyphToBoundsMap) {
boundsResult = m_glyphToBoundsMap->metricsForGlyph(glyph);
@@ -208,10 +203,6 @@ ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
ALWAYS_INLINE float SimpleFontData::widthForGlyph(Glyph glyph) const
{
- if (!m_platformData.size())
- return 0;
- static_assert(sizeof(glyph) == 2, "Glyph id should not be truncated.");
-
float width = m_glyphToWidthMap.metricsForGlyph(glyph);
if (width != cGlyphSizeUnknown)
return width;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698