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

Issue 22925002: Add support to resolve unprefixed CSS animations properties. (Closed)

Created:
7 years, 4 months ago by darktears
Modified:
7 years, 4 months ago
CC:
blink-reviews, shans, rjwright, alancutter (OOO until 2018), Mike Lawther (Google), eae+blinkwatch, dglazkov+blink, leviw+renderwatch, dstockwell, Timothy Loh, apavlov+blink_chromium.org, jchaffraix+rendering, darktears, Steve Block, Eric Willigers
Visibility:
Public.

Description

Add support to resolve unprefixed CSS animations properties. This is the start of various patches to support unprefixed CSS Animations. The approach here is the same used for the CSS Transitions : - Both sets of properties are added to the StylePropertySet which keep them in sync. - Only the prefixed ones are resolved. Added a parsing tests to cover the parsing behavior in detail. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156034

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+1565 lines, -15 lines) Patch
A LayoutTests/animations/animations-parsing.html View 1 chunk +827 lines, -0 lines 0 comments Download
A LayoutTests/animations/animations-parsing-expected.txt View 1 chunk +521 lines, -0 lines 0 comments Download
M LayoutTests/inspector/console/console-css-warnings.html View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/webexposed/css-properties-as-js-properties-expected.txt View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/css/CSSComputedStyleDeclaration.cpp View 8 chunks +33 lines, -0 lines 0 comments Download
M Source/core/css/CSSParser.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/CSSParser-in.cpp View 10 chunks +32 lines, -8 lines 2 comments Download
M Source/core/css/CSSProperty.h View 3 chunks +58 lines, -0 lines 2 comments Download
M Source/core/css/CSSProperty.cpp View 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/css/CSSPropertyNames.in View 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/css/CSSShorthands.in View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/StylePropertyShorthandCustom.cpp View 1 2 chunks +39 lines, -0 lines 2 comments Download
M Source/core/css/resolver/StyleBuilderCustom.cpp View 2 chunks +9 lines, -0 lines 0 comments Download
M Source/core/page/RuntimeEnabledFeatures.in View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/page/UseCounter.cpp View 2 chunks +10 lines, -1 line 2 comments Download
M Source/core/rendering/style/KeyframeList.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/scripts/templates/StylePropertyShorthand.h.tmpl View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
darktears
7 years, 4 months ago (2013-08-13 10:06:22 UTC) #1
eseidel
lgtm OK. https://codereview.chromium.org/22925002/diff/11001/Source/core/css/CSSParser-in.cpp File Source/core/css/CSSParser-in.cpp (right): https://codereview.chromium.org/22925002/diff/11001/Source/core/css/CSSParser-in.cpp#newcode4488 Source/core/css/CSSParser-in.cpp:4488: case CSSPropertyAnimationFillMode: Are the expected implementations of ...
7 years, 4 months ago (2013-08-13 17:49:15 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexis.menard@intel.com/22925002/11001
7 years, 4 months ago (2013-08-13 17:49:28 UTC) #3
commit-bot: I haz the power
Change committed as 156034
7 years, 4 months ago (2013-08-13 17:54:10 UTC) #4
darktears
7 years, 4 months ago (2013-08-13 18:08:53 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/22925002/diff/11001/Source/core/css/CSSParser...
File Source/core/css/CSSParser-in.cpp (right):

https://codereview.chromium.org/22925002/diff/11001/Source/core/css/CSSParser...
Source/core/css/CSSParser-in.cpp:4488: case CSSPropertyAnimationFillMode:
On 2013/08/13 17:49:15, eseidel wrote:
> Are the expected implementations of these really identical? :)

The parsing should be the same. And the tests added proves it. I wrote the new
tests reading the spec and the expected parsing results. This patch does not
cover the actual behaviour on the screen. I will review that later based on the
spec, the existing tests and the bugs open.

https://codereview.chromium.org/22925002/diff/11001/Source/core/css/CSSProper...
File Source/core/css/CSSProperty.h (right):

https://codereview.chromium.org/22925002/diff/11001/Source/core/css/CSSProper...
Source/core/css/CSSProperty.h:113: case CSSPropertyAnimationIterationCount:
On 2013/08/13 17:49:15, eseidel wrote:
> Bleh.  This should just be one big static array mapping these.

Yes, let's fix that in a following patch.

https://codereview.chromium.org/22925002/diff/11001/Source/core/css/StyleProp...
File Source/core/css/StylePropertyShorthandCustom.cpp (right):

https://codereview.chromium.org/22925002/diff/11001/Source/core/css/StyleProp...
Source/core/css/StylePropertyShorthandCustom.cpp:88: const
StylePropertyShorthand& parsingShorthandForProperty(CSSPropertyID propertyID)
On 2013/08/13 17:49:15, eseidel wrote:
> I'm confused by this new wrapper around shorthandForProperty?  I see, we're
just
> trying to support these as parse-only?

No. When we parse the shorthand properties we start matching them following the
order of declaration as in the spec (e.g. border-top then border-right then
border-bottom then border-left) but in few cases this order is different (or you
want to enforce it) when parsing (note that the array generated in
StylePropertyShorthand template is used also to construct the CSSOM and
cssText() values). Concrete example in the case of the animation is that you
want to try parse the animation name last as you still want to match the
keywords first (animation-name can be anything per the spec). I hope I made it
clear. This function only use the set of longhands in a different order for
parsing purpose.

https://codereview.chromium.org/22925002/diff/11001/Source/core/page/UseCount...
File Source/core/page/UseCounter.cpp (right):

https://codereview.chromium.org/22925002/diff/11001/Source/core/page/UseCount...
Source/core/page/UseCounter.cpp:496: case CSSPropertyAnimationTimingFunction:
return 432;
On 2013/08/13 17:49:15, eseidel wrote:
> This isn't error prone at all. :p

:D

Powered by Google App Engine
This is Rietveld 408576698