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

Side by Side Diff: Source/core/css/parser/CSSParserImpl.cpp

Issue 1318933002: Revert of Deprecate 'intrinsic' and 'min-intrinsic' CSS keywords (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/css/parser/CSSParserMode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/css/parser/CSSParserImpl.h" 6 #include "core/css/parser/CSSParserImpl.h"
7 7
8 #include "core/css/CSSKeyframesRule.h" 8 #include "core/css/CSSKeyframesRule.h"
9 #include "core/css/CSSStyleSheet.h" 9 #include "core/css/CSSStyleSheet.h"
10 #include "core/css/StylePropertySet.h" 10 #include "core/css/StylePropertySet.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 filterProperties(false, parsedProperties, results, unusedEntries, seenProper ties); 74 filterProperties(false, parsedProperties, results, unusedEntries, seenProper ties);
75 75
76 RefPtrWillBeRawPtr<ImmutableStylePropertySet> result = ImmutableStylePropert ySet::create(results.data() + unusedEntries, results.size() - unusedEntries, mod e); 76 RefPtrWillBeRawPtr<ImmutableStylePropertySet> result = ImmutableStylePropert ySet::create(results.data() + unusedEntries, results.size() - unusedEntries, mod e);
77 parsedProperties.clear(); 77 parsedProperties.clear();
78 return result.release(); 78 return result.release();
79 } 79 }
80 80
81 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> CSSParserImpl::parseInlineStyl eDeclaration(const String& string, Element* element) 81 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> CSSParserImpl::parseInlineStyl eDeclaration(const String& string, Element* element)
82 { 82 {
83 Document& document = element->document(); 83 Document& document = element->document();
84 CSSParserContext context = CSSParserContext(document.elementSheet().contents ()->parserContext(), document.frame(), UseCounter::getFrom(&document)); 84 CSSParserContext context = CSSParserContext(document.elementSheet().contents ()->parserContext(), UseCounter::getFrom(&document));
85 CSSParserMode mode = element->isHTMLElement() && !document.inQuirksMode() ? HTMLStandardMode : HTMLQuirksMode; 85 CSSParserMode mode = element->isHTMLElement() && !document.inQuirksMode() ? HTMLStandardMode : HTMLQuirksMode;
86 context.setMode(mode); 86 context.setMode(mode);
87 CSSParserImpl parser(context, document.elementSheet().contents()); 87 CSSParserImpl parser(context, document.elementSheet().contents());
88 CSSTokenizer::Scope scope(string); 88 CSSTokenizer::Scope scope(string);
89 parser.consumeDeclarationList(scope.tokenRange(), StyleRule::Style); 89 parser.consumeDeclarationList(scope.tokenRange(), StyleRule::Style);
90 return createStylePropertySet(parser.m_parsedProperties, mode); 90 return createStylePropertySet(parser.m_parsedProperties, mode);
91 } 91 }
92 92
93 bool CSSParserImpl::parseDeclarationList(MutableStylePropertySet* declaration, c onst String& string, const CSSParserContext& context) 93 bool CSSParserImpl::parseDeclarationList(MutableStylePropertySet* declaration, c onst String& string, const CSSParserContext& context)
94 { 94 {
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 else 729 else
730 return nullptr; // Parser error, invalid value in keyframe selector 730 return nullptr; // Parser error, invalid value in keyframe selector
731 if (range.atEnd()) 731 if (range.atEnd())
732 return result.release(); 732 return result.release();
733 if (range.consume().type() != CommaToken) 733 if (range.consume().type() != CommaToken)
734 return nullptr; // Parser error 734 return nullptr; // Parser error
735 } 735 }
736 } 736 }
737 737
738 } // namespace blink 738 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/css/parser/CSSParserMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698