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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 1471933003: Consume initial whitespace up front in CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index b3b7bb3fccaddd31d49b45a046ebbef6ae57f315..59981999cdd5c4c56c50b923434ac05bfffc6a09 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -42,6 +42,7 @@ CSSPropertyParser::CSSPropertyParser(CSSParserValueList* valueList, const CSSPar
, m_currentShorthand(CSSPropertyInvalid)
, m_implicitShorthand(false)
{
+ m_range.consumeWhitespace();
}
bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool important,
@@ -1874,7 +1875,6 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeStrokeDasharray(CSSParserTokenRan
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty)
{
CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
- m_range.consumeWhitespace();
switch (property) {
case CSSPropertyWillChange:
return consumeWillChange(m_range);
@@ -2134,8 +2134,6 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::consumeFontFaceSrc()
bool CSSPropertyParser::parseFontFaceDescriptor(CSSPropertyID propId)
{
RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
-
- m_range.consumeWhitespace();
switch (propId) {
case CSSPropertyFontFamily:
if (consumeGenericFamily(m_range))
@@ -2330,8 +2328,6 @@ bool CSSPropertyParser::parseViewportDescriptor(CSSPropertyID propId, bool impor
{
ASSERT(RuntimeEnabledFeatures::cssViewportEnabled() || isUASheetBehavior(m_context.mode()));
- m_range.consumeWhitespace();
-
switch (propId) {
case CSSPropertyWidth: {
RefPtrWillBeRawPtr<CSSValue> minWidth = consumeSingleViewportDescriptor(m_range, CSSPropertyMinWidth, m_context.mode());
@@ -2533,7 +2529,6 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool im
{
CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
- m_range.consumeWhitespace();
CSSPropertyID oldShorthand = m_currentShorthand;
// TODO(rob.buis): Remove this when the legacy property parser is gone
m_currentShorthand = property;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698