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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSVariableData.cpp

Issue 2632083002: Provide a CSSParserContext to CSSSyntaxDescriptor (Closed)
Patch Set: Fix parser context in PropertyRegistration Created 3 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "core/css/CSSVariableData.h" 5 #include "core/css/CSSVariableData.h"
6 6
7 #include "core/css/CSSSyntaxDescriptor.h" 7 #include "core/css/CSSSyntaxDescriptor.h"
8 #include "core/css/parser/CSSParser.h" 8 #include "core/css/parser/CSSParser.h"
9 #include "core/css/parser/CSSParserTokenRange.h" 9 #include "core/css/parser/CSSParserTokenRange.h"
10 #include "wtf/text/StringBuilder.h" 10 #include "wtf/text/StringBuilder.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 : m_isAnimationTainted(isAnimationTainted), 66 : m_isAnimationTainted(isAnimationTainted),
67 m_needsVariableResolution(needsVariableResolution), 67 m_needsVariableResolution(needsVariableResolution),
68 m_cachedPropertySet(false) { 68 m_cachedPropertySet(false) {
69 ASSERT(!range.atEnd()); 69 ASSERT(!range.atEnd());
70 consumeAndUpdateTokens(range); 70 consumeAndUpdateTokens(range);
71 } 71 }
72 72
73 const CSSValue* CSSVariableData::parseForSyntax( 73 const CSSValue* CSSVariableData::parseForSyntax(
74 const CSSSyntaxDescriptor& syntax) const { 74 const CSSSyntaxDescriptor& syntax) const {
75 DCHECK(!needsVariableResolution()); 75 DCHECK(!needsVariableResolution());
76 return syntax.parse(tokenRange(), m_isAnimationTainted); 76 // TODO(timloh): This probably needs a proper parser context for
77 // relative URL resolution.
78 return syntax.parse(tokenRange(), strictCSSParserContext(),
79 m_isAnimationTainted);
77 } 80 }
78 81
79 } // namespace blink 82 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698