Commit graph

39 commits

Author SHA1 Message Date
Hiroyuki Ikezoe
501edfdbdb Get all animated properties in *all* keyframes.
@keyframes anim {
  from { transform: none; }
  to { opacity: 0; transform: none; }
}

In above case, we have to add opacity property and value in the 'from' keyframe.
2017-02-22 19:04:49 +09:00
Hiroyuki Ikezoe
35192b03c3 Assert if there is an important declaration while collecting animated properties in keyframes.
Parser has already dropped it.
2017-02-01 07:33:37 +09:00
Hiroyuki Ikezoe
a80725c91b Allow empty keyframe and keyframes with non-animatable properties.
We need to create CSS animations that have empty keyframe or keyframes
which have only invalid properties or non-animatable properties to fire
animation events for such animations.
2017-02-01 07:06:38 +09:00
Hiroyuki Ikezoe
90571eaa54 Bug 1328787 - Part 11: The last keyframe's KeyframePercentage is 1.0. r=heycam
MozReview-Commit-ID: Hgsc45m9401
2017-01-29 09:07:41 +09:00
Hiroyuki Ikezoe
e20a3ad9b5 Bug 1328787 - Part 8: Animation timing function can be overridden by animation-timing-function specified in keyframe. r=heycam 2017-01-29 09:07:41 +09:00
Manish Goregaokar
b5cb401aef Reduce allocator churn when parsing property declaration blocks (fixes #15060) 2017-01-18 16:31:46 -08:00
Emilio Cobos Álvarez
0b3c1a8924
style: Document the keyframes module. 2017-01-02 12:57:54 +01:00
Emilio Cobos Álvarez
fa01716c52
style: Avoid ending up with an invalid keyframe when inf or NaN are at play. 2016-12-15 13:58:51 +01:00
Simon Sapin
433c33c4df Match on PropertyId (not strings) to parse a declaration. 2016-12-09 17:06:51 -10:00
Nazım Can Altınova
e978f11c9f Fix Keyframe selector serialization 2016-12-06 01:38:06 +03:00
Simon Sapin
70b250fe2a Use stylesheet’s base URL and ns prefixes in CSSOM insert/appendRule. 2016-11-28 18:01:02 +01:00
Manish Goregaokar
18742e72fa Update test expectations 2016-11-23 09:32:48 -08:00
Manish Goregaokar
8108fc465a Add CSSNamespaceRule.{namespaceURI, prefix} 2016-11-23 09:32:46 -08:00
Manish Goregaokar
64442090ba Add CSSKeyframesRule.{findRule, deleteRule, appendRule} 2016-11-23 09:32:44 -08:00
Nazım Can Altınova
fdbadcdce2 Implement ToCss serialization for CSSRules 2016-11-18 12:17:53 +03:00
Simon Sapin
742681a623 Add RwLock in more Arc’d things in stylesheets. 2016-10-19 19:55:05 +02:00
Simon Sapin
89a29a7f12 Use parking_lot::RwLock instead of DOMRefCell for PropertyDeclarationBlock 2016-10-04 18:34:59 +02:00
Simon Sapin
d986fd2d2f Use PropertyDeclarationBlock in a DOMRefCell everywhere. 2016-10-04 18:34:57 +02:00
Simon Sapin
29c72d15a9 Make style build without impl<T: HeapSizeOf> HeapSizeOf for Arc<T>.
The removal of this impl is not included in this commit.
CC https://github.com/servo/heapsize/issues/37#issuecomment-249861171
2016-10-04 13:45:57 +02:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Simon Sapin
8bfe978c78 Update cssparser 2016-09-07 14:13:56 +08:00
Simon Sapin
3ce64fd269 Rename DeclarationBlock to ApplicableDeclarationBlock
Make it more different from PropertyDeclarationBlock
2016-09-06 14:17:26 +08:00
Simon Sapin
ad3437b98a Remove now-redundant Arc inside PropertyDeclarationBlock. 2016-08-31 02:34:08 +02:00
Simon Sapin
acc38aa8c2 Use Arc<PropertyDeclarationBlock> everwhere it’s appropriate. 2016-08-31 02:34:07 +02:00
Simon Sapin
ef5977f059 Wrap in Arc<_> every object reflected in CSSOM.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1281962#c5
2016-08-31 02:34:03 +02:00
Simon Sapin
16bbc2f26e Merge normal and important declarations in style rules.
Have a single Vec instead of two. Fix #3426
2016-08-21 03:40:35 +02:00
Simon Sapin
ab846ab196 Make parsing of keyframe declaration blocks spec-compliant.
Exclude animation properties.
2016-08-21 03:40:24 +02:00
Simon Sapin
901aaeaf68 Remove unused Keyframe::parse method 2016-08-21 00:30:22 +02:00
Emilio Cobos Álvarez
8ba676533b
style: Fix timing-function overriding from the keyframe declaration list.
The previous behavior is plain wrong, since that array has always at least one
element, so we effectively couldn't specify anything else than "ease" in our
animations.
2016-07-07 16:05:28 -07:00
Simon Sapin
2d52b13f2f Make geckolib possible to build on stable Rust 2016-07-05 15:37:16 +02:00
Ms2ger
70e964b707 Reorder code in KeyframesAnimation::from_keyframes() to avoid a panic.
Fixes #11999.
Fixes #12006.
2016-07-01 12:04:29 +02:00
Emilio Cobos Álvarez
2d566ef0ef
style: Fix parsing and add generated keyframes 2016-06-28 15:20:59 +00:00
Emilio Cobos Álvarez
9cf2e52d36
tidy: Clean up warnings and tidy lints. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
c16c5acade
style: Rewrite the animation representation to allow having state in layout
I have to make the appropriate changes in layout, but I'm running out of battery
in the bus.
2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
0077eb147c
style: Actually animate something!
So this actually allows some more animations to be triggered. The bad part of
this is that they're actually triggered always when the style is recalculated,
so we're going to have at least some more state into the node, and the
constellation, which would have to keep track of the animations states.
2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
f389cf61c4
style: Make animation functions as generic as possible. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
058bfb39ae
style: Refactor the @keyframes parsing and add adequate computation for it. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
6a362ae8e8
style: Refactor all the animated properties to use the style system properly 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
c1fd7432e9
style: Add @keyframe rule parsing. 2016-06-28 15:09:53 +00:00