Title: [209000] trunk/Source/WebCore
- Revision
- 209000
- Author
- hy...@apple.com
- Date
- 2016-11-28 10:28:50 -0800 (Mon, 28 Nov 2016)
Log Message
[CSS Parser] Support -webkit-animation-trigger
https://bugs.webkit.org/show_bug.cgi?id=165095
Reviewed by Zalan Bujtas.
* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeWebkitAnimationTrigger):
(WebCore::consumeAnimationValue):
(WebCore::CSSPropertyParser::parseSingleValue):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (208999 => 209000)
--- trunk/Source/WebCore/ChangeLog 2016-11-28 17:22:30 UTC (rev 208999)
+++ trunk/Source/WebCore/ChangeLog 2016-11-28 18:28:50 UTC (rev 209000)
@@ -1,3 +1,16 @@
+2016-11-28 Dave Hyatt <hy...@apple.com>
+
+ [CSS Parser] Support -webkit-animation-trigger
+ https://bugs.webkit.org/show_bug.cgi?id=165095
+
+ Reviewed by Zalan Bujtas.
+
+ * css/CSSValueKeywords.in:
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeWebkitAnimationTrigger):
+ (WebCore::consumeAnimationValue):
+ (WebCore::CSSPropertyParser::parseSingleValue):
+
2016-11-28 Antti Koivisto <an...@apple.com>
Remove FIRST_LINE_INHERITED fake pseudo style
Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (208999 => 209000)
--- trunk/Source/WebCore/css/CSSValueKeywords.in 2016-11-28 17:22:30 UTC (rev 208999)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2016-11-28 18:28:50 UTC (rev 209000)
@@ -1150,6 +1150,7 @@
scale-down
// background-image, etc.
+container-scroll
cross-fade
image-set
linear-gradient
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (208999 => 209000)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2016-11-28 17:22:30 UTC (rev 208999)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2016-11-28 18:28:50 UTC (rev 209000)
@@ -30,6 +30,9 @@
#include "config.h"
#include "CSSPropertyParser.h"
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+#include "CSSAnimationTriggerScrollValue.h"
+#endif
#include "CSSAspectRatioValue.h"
#include "CSSBasicShapes.h"
#include "CSSBorderImage.h"
@@ -1315,6 +1318,40 @@
return nullptr;
}
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+static RefPtr<CSSValue> consumeWebkitAnimationTrigger(CSSParserTokenRange& range, CSSParserMode mode)
+{
+ if (range.peek().id() == CSSValueAuto)
+ return consumeIdent(range);
+
+ if (range.peek().functionId() != CSSValueContainerScroll)
+ return nullptr;
+
+ CSSParserTokenRange rangeCopy = range;
+ CSSParserTokenRange args = consumeFunction(rangeCopy);
+
+ RefPtr<CSSPrimitiveValue> startValue = consumeLength(args, mode, ValueRangeAll, UnitlessQuirk::Forbid);
+ if (!startValue)
+ return nullptr;
+
+ if (args.atEnd()) {
+ range = rangeCopy;
+ return CSSAnimationTriggerScrollValue::create(startValue.releaseNonNull());
+ }
+
+ if (!consumeCommaIncludingWhitespace(args))
+ return nullptr;
+
+ RefPtr<CSSPrimitiveValue> endValue = consumeLength(args, mode, ValueRangeAll, UnitlessQuirk::Forbid);
+ if (!endValue || !args.atEnd())
+ return nullptr;
+
+ range = rangeCopy;
+
+ return CSSAnimationTriggerScrollValue::create(startValue.releaseNonNull(), endValue.releaseNonNull());
+}
+#endif
+
static RefPtr<CSSValue> consumeAnimationValue(CSSPropertyID property, CSSParserTokenRange& range, const CSSParserContext& context)
{
switch (property) {
@@ -1339,6 +1376,10 @@
case CSSPropertyAnimationTimingFunction:
case CSSPropertyTransitionTimingFunction:
return consumeAnimationTimingFunction(range, context);
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+ case CSSPropertyWebkitAnimationTrigger:
+ return consumeWebkitAnimationTrigger(range, context.mode);
+#endif
default:
ASSERT_NOT_REACHED();
return nullptr;
@@ -3563,6 +3604,9 @@
case CSSPropertyTransitionProperty:
case CSSPropertyAnimationTimingFunction:
case CSSPropertyTransitionTimingFunction:
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+ case CSSPropertyWebkitAnimationTrigger:
+#endif
return consumeAnimationPropertyList(property, m_range, m_context);
#if ENABLE(CSS_GRID_LAYOUT)
case CSSPropertyGridColumnGap:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes