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

Side by Side Diff: Source/core/css/parser/BisonCSSParser-in.cpp

Issue 1100563002: Remove font-variant CSSValueList conversion code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « Source/core/css/CSSProperty.cpp ('k') | Source/core/css/parser/CSSParserImpl.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) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 } 721 }
722 clearProperties(); 722 clearProperties();
723 return result; 723 return result;
724 } 724 }
725 725
726 StyleRuleBase* BisonCSSParser::createFontFaceRule() 726 StyleRuleBase* BisonCSSParser::createFontFaceRule()
727 { 727 {
728 m_allowImportRules = m_allowNamespaceDeclarations = false; 728 m_allowImportRules = m_allowNamespaceDeclarations = false;
729 for (unsigned i = 0; i < m_parsedProperties.size(); ++i) { 729 for (unsigned i = 0; i < m_parsedProperties.size(); ++i) {
730 CSSProperty& property = m_parsedProperties[i]; 730 CSSProperty& property = m_parsedProperties[i];
731 if (property.id() == CSSPropertyFontVariant && property.value()->isPrimi tiveValue()) 731 if (property.id() == CSSPropertyFontFamily && (!property.value()->isValu eList() || toCSSValueList(property.value())->length() != 1)) {
732 property.wrapValueInCommaSeparatedList();
733 else if (property.id() == CSSPropertyFontFamily && (!property.value()->i sValueList() || toCSSValueList(property.value())->length() != 1)) {
734 // Unlike font-family property, font-family descriptor in @font-face rule 732 // Unlike font-family property, font-family descriptor in @font-face rule
735 // has to be a value list with exactly one family name. It cannot ha ve a 733 // has to be a value list with exactly one family name. It cannot ha ve a
736 // have 'initial' value and cannot 'inherit' from parent. 734 // have 'initial' value and cannot 'inherit' from parent.
737 // See http://dev.w3.org/csswg/css3-fonts/#font-family-desc 735 // See http://dev.w3.org/csswg/css3-fonts/#font-family-desc
738 clearProperties(); 736 clearProperties();
739 return 0; 737 return 0;
740 } 738 }
741 } 739 }
742 RefPtrWillBeRawPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create(); 740 RefPtrWillBeRawPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create();
743 rule->setProperties(createStylePropertySet()); 741 rule->setProperties(createStylePropertySet());
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 rule->setProperties(createStylePropertySet()); 1012 rule->setProperties(createStylePropertySet());
1015 clearProperties(); 1013 clearProperties();
1016 1014
1017 StyleRuleViewport* result = rule.get(); 1015 StyleRuleViewport* result = rule.get();
1018 m_parsedRules.append(rule.release()); 1016 m_parsedRules.append(rule.release());
1019 1017
1020 return result; 1018 return result;
1021 } 1019 }
1022 1020
1023 } 1021 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSProperty.cpp ('k') | Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698