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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 444413003: Make style building for font-weight less custom. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/css/resolver/StyleBuilderConverter.cpp ('k') | Source/platform/fonts/FontDescription.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 4e906189c736cad19dd30ad9a609ddcf77ec9a22..284088fbb5b91761d9703cd55a4192871183f528 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -307,36 +307,6 @@ void StyleBuilderFunctions::applyValueCSSPropertyFontSize(StyleResolverState& st
state.fontBuilder().setFontSizeValue(value, state.parentStyle(), state.rootElementStyle());
}
-void StyleBuilderFunctions::applyInitialCSSPropertyFontWeight(StyleResolverState& state)
-{
- state.fontBuilder().setWeight(FontWeightNormal);
-}
-
-void StyleBuilderFunctions::applyInheritCSSPropertyFontWeight(StyleResolverState& state)
-{
- state.fontBuilder().setWeight(state.parentFontDescription().weight());
-}
-
-void StyleBuilderFunctions::applyValueCSSPropertyFontWeight(StyleResolverState& state, CSSValue* value)
-{
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- switch (primitiveValue->getValueID()) {
- case CSSValueInvalid:
- ASSERT_NOT_REACHED();
- break;
- case CSSValueBolder:
- state.fontBuilder().setWeight(state.parentStyle()->fontDescription().weight());
- state.fontBuilder().setWeightBolder();
- break;
- case CSSValueLighter:
- state.fontBuilder().setWeight(state.parentStyle()->fontDescription().weight());
- state.fontBuilder().setWeightLighter();
- break;
- default:
- state.fontBuilder().setWeight(*primitiveValue);
- }
-}
-
void StyleBuilderFunctions::applyValueCSSPropertyGlyphOrientationVertical(StyleResolverState& state, CSSValue* value)
{
if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueAuto)
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | Source/platform/fonts/FontDescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698