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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 677103002: Expand system font values during property parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove isExpandedShorthandForAll. Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/core/css/resolver/FontBuilder.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 default: 835 default:
836 // normal and none do not have any effect. 836 // normal and none do not have any effect.
837 { } 837 { }
838 } 838 }
839 } 839 }
840 } 840 }
841 if (!didSet) 841 if (!didSet)
842 state.style()->clearContent(); 842 state.style()->clearContent();
843 } 843 }
844 844
845 void StyleBuilderFunctions::applyInitialCSSPropertyFont(StyleResolverState&)
846 {
847 ASSERT_NOT_REACHED();
848 }
849
850 void StyleBuilderFunctions::applyInheritCSSPropertyFont(StyleResolverState&)
851 {
852 ASSERT_NOT_REACHED();
853 }
854
855 void StyleBuilderFunctions::applyValueCSSPropertyFont(StyleResolverState& state, CSSValue* value)
856 {
857 // Only System Font identifiers should come through this method
858 // all other values should have been handled when the shorthand
859 // was expanded by the parser.
860 // FIXME: System Font identifiers should not hijack this
861 // short-hand CSSProperty like this (crbug.com/353932)
862 state.style()->setLineHeight(RenderStyle::initialLineHeight());
863 state.setLineHeightValue(0);
864 state.fontBuilder().fromSystemFont(toCSSPrimitiveValue(value)->getValueID(), state.style()->effectiveZoom());
865 }
866
867 void StyleBuilderFunctions::applyValueCSSPropertyWebkitLocale(StyleResolverState & state, CSSValue* value) 845 void StyleBuilderFunctions::applyValueCSSPropertyWebkitLocale(StyleResolverState & state, CSSValue* value)
868 { 846 {
869 if (!value->isPrimitiveValue()) 847 if (!value->isPrimitiveValue())
870 return; 848 return;
871 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 849 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
872 if (primitiveValue->getValueID() == CSSValueAuto) 850 if (primitiveValue->getValueID() == CSSValueAuto)
873 state.style()->setLocale(nullAtom); 851 state.style()->setLocale(nullAtom);
874 else 852 else
875 state.style()->setLocale(AtomicString(primitiveValue->getStringValue())) ; 853 state.style()->setLocale(AtomicString(primitiveValue->getStringValue())) ;
876 state.fontBuilder().setScript(state.style()->locale()); 854 state.fontBuilder().setScript(state.style()->locale());
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 return; 921 return;
944 case CSSValueSuper: 922 case CSSValueSuper:
945 svgStyle.setBaselineShift(BS_SUPER); 923 svgStyle.setBaselineShift(BS_SUPER);
946 return; 924 return;
947 default: 925 default:
948 ASSERT_NOT_REACHED(); 926 ASSERT_NOT_REACHED();
949 } 927 }
950 } 928 }
951 929
952 } // namespace blink 930 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/FontBuilder.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698