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

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

Issue 2612783003: Implements CSSPropertyAPI for the shape-margin property. (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
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 b7f9ff35f4908017e3d23f8088c71c577b408ee0..31c639bc8a2f994292a8c3a38827eaf87d938d7c 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -815,41 +815,6 @@ static CSSValue* consumeMarginOrOffset(CSSParserTokenRange& range,
return consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, unitless);
}
-static CSSValue* consumeClipComponent(CSSParserTokenRange& range,
- CSSParserMode cssParserMode) {
- if (range.peek().id() == CSSValueAuto)
- return consumeIdent(range);
- return consumeLength(range, cssParserMode, ValueRangeAll,
- UnitlessQuirk::Allow);
-}
-
-static CSSValue* consumeClip(CSSParserTokenRange& range,
- CSSParserMode cssParserMode) {
- if (range.peek().id() == CSSValueAuto)
- return consumeIdent(range);
-
- if (range.peek().functionId() != CSSValueRect)
- return nullptr;
-
- CSSParserTokenRange args = consumeFunction(range);
- // rect(t, r, b, l) || rect(t r b l)
- CSSValue* top = consumeClipComponent(args, cssParserMode);
- if (!top)
- return nullptr;
- bool needsComma = consumeCommaIncludingWhitespace(args);
- CSSValue* right = consumeClipComponent(args, cssParserMode);
- if (!right || (needsComma && !consumeCommaIncludingWhitespace(args)))
- return nullptr;
- CSSValue* bottom = consumeClipComponent(args, cssParserMode);
- if (!bottom || (needsComma && !consumeCommaIncludingWhitespace(args)))
- return nullptr;
- CSSValue* left = consumeClipComponent(args, cssParserMode);
- if (!left || !args.atEnd())
- return nullptr;
- return CSSQuadValue::create(top, right, bottom, left,
- CSSQuadValue::SerializeAsRect);
-}
-
static bool consumePan(CSSParserTokenRange& range,
CSSValue*& panX,
CSSValue*& panY,
@@ -3223,8 +3188,6 @@ const CSSValue* CSSPropertyParser::parseSingleValue(
return consumeLengthOrPercent(m_range, m_context->mode(),
ValueRangeNonNegative,
UnitlessQuirk::Allow);
- case CSSPropertyClip:
- return consumeClip(m_range, m_context->mode());
case CSSPropertyTouchAction:
return consumeTouchAction(m_range);
case CSSPropertyScrollSnapDestination:
@@ -3264,9 +3227,6 @@ const CSSValue* CSSPropertyParser::parseSingleValue(
case CSSPropertyGridRowGap:
return consumeLengthOrPercent(m_range, m_context->mode(),
ValueRangeNonNegative);
- case CSSPropertyShapeMargin:
- return consumeLengthOrPercent(m_range, m_context->mode(),
- ValueRangeNonNegative);
case CSSPropertyShapeImageThreshold:
return consumeNumber(m_range, ValueRangeAll);
case CSSPropertyWebkitBoxOrdinalGroup:

Powered by Google App Engine
This is Rietveld 408576698