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

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

Issue 1809223002: Remove some CSSParserMode parameters in CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 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 419adc0c8689172fb5591fedd15974a368a99914..0270fd4fd9ac1f28ec7be36e157b6d5e7b9d5aba 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -620,7 +620,7 @@ static CSSValueList* consumeRotation(CSSParserTokenRange& range)
return list;
}
-static CSSValueList* consumeScale(CSSParserTokenRange& range, CSSParserMode cssParserMode)
+static CSSValueList* consumeScale(CSSParserTokenRange& range)
{
ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
@@ -659,7 +659,7 @@ static CSSValueList* consumeTranslate(CSSParserTokenRange& range, CSSParserMode
return list;
}
-static CSSValue* consumeCounter(CSSParserTokenRange& range, CSSParserMode cssParserMode, int defaultValue)
+static CSSValue* consumeCounter(CSSParserTokenRange& range, int defaultValue)
{
if (range.peek().id() == CSSValueNone)
return consumeIdent(range);
@@ -938,7 +938,7 @@ static CSSValue* consumeColumnGap(CSSParserTokenRange& range, CSSParserMode cssP
return consumeLength(range, cssParserMode, ValueRangeNonNegative);
}
-static CSSValue* consumeColumnSpan(CSSParserTokenRange& range, CSSParserMode cssParserMode)
+static CSSValue* consumeColumnSpan(CSSParserTokenRange& range)
{
return consumeIdent<CSSValueAll, CSSValueNone>(range);
}
@@ -2699,7 +2699,7 @@ static CSSValue* consumeBorderImageRepeat(CSSParserTokenRange& range)
return CSSValuePair::create(horizontal, vertical, CSSValuePair::DropIdenticalValues);
}
-static CSSValue* consumeBorderImageSlice(CSSPropertyID property, CSSParserTokenRange& range, CSSParserMode cssParserMode)
+static CSSValue* consumeBorderImageSlice(CSSPropertyID property, CSSParserTokenRange& range)
{
bool fill = consumeIdent<CSSValueFill>(range);
CSSPrimitiveValue* slices[4] = { 0 };
@@ -2782,7 +2782,7 @@ static bool consumeBorderImageComponents(CSSPropertyID property, CSSParserTokenR
continue;
}
if (!slice) {
- slice = consumeBorderImageSlice(property, range, context.mode());
+ slice = consumeBorderImageSlice(property, range);
if (slice) {
ASSERT(!width && !outset);
if (consumeSlashIncludingWhitespace(range)) {
@@ -2899,21 +2899,21 @@ static CSSValue* consumePrefixedBackgroundBox(CSSPropertyID property, CSSParserT
return nullptr;
}
-static CSSValue* consumeBackgroundSize(CSSPropertyID unresolvedProperty, CSSParserTokenRange& range, CSSParserMode mode)
+static CSSValue* consumeBackgroundSize(CSSPropertyID unresolvedProperty, CSSParserTokenRange& range, CSSParserMode cssParserMode)
{
if (identMatches<CSSValueContain, CSSValueCover>(range.peek().id()))
return consumeIdent(range);
CSSPrimitiveValue* horizontal = consumeIdent<CSSValueAuto>(range);
if (!horizontal)
- horizontal = consumeLengthOrPercent(range, mode, ValueRangeAll, UnitlessQuirk::Forbid);
+ horizontal = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid);
CSSPrimitiveValue* vertical = nullptr;
if (!range.atEnd()) {
if (range.peek().id() == CSSValueAuto) // `auto' is the default
range.consumeIncludingWhitespace();
else
- vertical = consumeLengthOrPercent(range, mode, ValueRangeAll, UnitlessQuirk::Forbid);
+ vertical = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid);
} else if (unresolvedProperty == CSSPropertyAliasWebkitBackgroundSize) {
// Legacy syntax: "-webkit-background-size: 10px" is equivalent to "background-size: 10px 10px".
vertical = horizontal;
@@ -3313,7 +3313,7 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty)
case CSSPropertyRotate:
return consumeRotation(m_range);
case CSSPropertyScale:
- return consumeScale(m_range, m_context.mode());
+ return consumeScale(m_range);
case CSSPropertyTranslate:
return consumeTranslate(m_range, m_context.mode());
case CSSPropertyWebkitBorderHorizontalSpacing:
@@ -3321,7 +3321,7 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty)
return consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
case CSSPropertyCounterIncrement:
case CSSPropertyCounterReset:
- return consumeCounter(m_range, m_context.mode(), property == CSSPropertyCounterIncrement ? 1 : 0);
+ return consumeCounter(m_range, property == CSSPropertyCounterIncrement ? 1 : 0);
case CSSPropertySize:
return consumeSize(m_range, m_context.mode());
case CSSPropertySnapHeight:
@@ -3390,7 +3390,7 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty)
case CSSPropertyColumnGap:
return consumeColumnGap(m_range, m_context.mode());
case CSSPropertyColumnSpan:
- return consumeColumnSpan(m_range, m_context.mode());
+ return consumeColumnSpan(m_range);
case CSSPropertyZoom:
return consumeZoom(m_range, m_context);
case CSSPropertyAnimationDelay:
@@ -3589,7 +3589,7 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty)
return consumeBorderImageRepeat(m_range);
case CSSPropertyBorderImageSlice:
case CSSPropertyWebkitMaskBoxImageSlice:
- return consumeBorderImageSlice(property, m_range, m_context.mode());
+ return consumeBorderImageSlice(property, m_range);
case CSSPropertyBorderImageOutset:
case CSSPropertyWebkitMaskBoxImageOutset:
return consumeBorderImageOutset(m_range);
@@ -3982,7 +3982,7 @@ bool CSSPropertyParser::parseViewportDescriptor(CSSPropertyID propId, bool impor
}
}
-static bool consumeColumnWidthOrCount(CSSParserTokenRange& range, CSSParserMode cssParserMode, CSSValue*& columnWidth, CSSValue*& columnCount)
+static bool consumeColumnWidthOrCount(CSSParserTokenRange& range, CSSValue*& columnWidth, CSSValue*& columnCount)
{
if (range.peek().id() == CSSValueAuto) {
consumeIdent(range);
@@ -4002,9 +4002,9 @@ bool CSSPropertyParser::consumeColumns(bool important)
{
CSSValue* columnWidth = nullptr;
CSSValue* columnCount = nullptr;
- if (!consumeColumnWidthOrCount(m_range, m_context.mode(), columnWidth, columnCount))
+ if (!consumeColumnWidthOrCount(m_range, columnWidth, columnCount))
return false;
- consumeColumnWidthOrCount(m_range, m_context.mode(), columnWidth, columnCount);
+ consumeColumnWidthOrCount(m_range, columnWidth, columnCount);
if (!m_range.atEnd())
return false;
if (!columnWidth)
« 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