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

Unified Diff: Source/core/css/FontFace.cpp

Issue 542713002: Handle font-weigths with 'bolder' or 'lighter' values in @font-face rules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment is added. Created 6 years, 3 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 | « LayoutTests/fast/css/font-face-with-lighter-or-bolder-weight-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFace.cpp
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
index a6250bab725d18e724d209986bf554966694d37b..6d8dec5b283684a440ea779e1a254b3bc1a59571 100644
--- a/Source/core/css/FontFace.cpp
+++ b/Source/core/css/FontFace.cpp
@@ -443,10 +443,14 @@ FontTraits FontFace::traits() const
case CSSValue200:
weight = FontWeight200;
break;
- case CSSValueLighter:
case CSSValue100:
weight = FontWeight100;
break;
+ // Although 'lighter' and 'bolder' are valid keywords for font-weights, they are invalid
+ // inside font-face rules so they are ignored. Reference: http://www.w3.org/TR/css3-fonts/#descdef-font-weight.
+ case CSSValueLighter:
+ case CSSValueBolder:
+ break;
default:
ASSERT_NOT_REACHED();
break;
« no previous file with comments | « LayoutTests/fast/css/font-face-with-lighter-or-bolder-weight-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698