aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/animation.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* style: More useful logging for transition-related stuff.Emilio Cobos Álvarez2018-10-151-12/+10
| | | | | Transitions are still broken, but I found these messages more helpful than the previous ones when diagnosing problems.
* style: Expire keyframes animations when no longer referenced by the style.Emilio Cobos Álvarez2018-10-151-19/+30
| | | | | | It's a long way to make this sound in general... Fixes #20731
* style: Remove unused expired boolean in Animation::Transition.Emilio Cobos Álvarez2018-10-151-18/+5
| | | | | | | | | | | | The last caller who used was #14418, which did fix a problem but introduced multiple. In particular, now transitions don't get expired ever, until they finish running of course. That is not ok, given you can have something that the user can trigger to change the style (hi, :hover, for example), and right now that triggers new transitions, getting this into a really funny state. I should give fixing this a shot, but it's non-trivial at all.
* style: Make the transitions code make sense again.Emilio Cobos Álvarez2018-10-151-2/+2
|
* style: Cleanup some of the animation starting code.Emilio Cobos Álvarez2018-10-151-53/+56
|
* style: Fix Gecko build.Emilio Cobos Álvarez2018-09-151-0/+8
|
* Replace mpsc with crossbeam/servo channel, update ipc-channelSimon Sapin2018-09-121-1/+1
| | | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* Format style component.chansuke2018-09-091-12/+14
|
* style: Push visited style computation a bit further down.Emilio Cobos Álvarez2018-07-241-3/+2
| | | | | | Bug: 1474959 Reviewed-by: xidorn MozReview-Commit-ID: 1DILenWIw4D
* style: Move TransitionProperty where it belongs.Emilio Cobos Álvarez2018-06-121-1/+2
| | | | | | Bug: 1419695 Reviewed-by: xidorn MozReview-Commit-ID: 9PN6VfbDbLA
* style: Make the transition-property code make more sense.Emilio Cobos Álvarez2018-06-121-1/+2
| | | | | | | | | We were working around the lack of alias support during parsing in TransitionProperty by doing a Gecko lookup. That's a hack and is now gone. Bug: 1419695 Reviewed-by: xidorn MozReview-Commit-ID: EptUvJNTrZr
* style: Remove some unneeded cfg(..).Emilio Cobos Álvarez2018-05-051-2/+1
| | | | The less not-compiled code in common builds, the better for everybody.
* style: Implement Debug for KeyframeAnimationStyle by hand.Emilio Cobos Álvarez2018-05-051-1/+18
| | | | The ComputedValues format is huge and unneeded.
* style: Fix servo build.Emilio Cobos Álvarez2018-05-051-18/+17
|
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-135/+182
| | | | | | | | | | This was generated with: ./mach cargo fmt --package selectors && ./mach cargo fmt --package servo_arc && ./mach cargo fmt --package style Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
* style: Only expose longhands to rust via iterators.Emilio Cobos Álvarez2018-02-281-5/+5
| | | | | | | | | The key here is that we only filter longhands if the shorthand is accessible to content and vice-versa. This prevents the bug that prevented me to land this patch before, which was us not expanding properly chrome-only shorthands. Again, this is incomplete, and I need to teach LonghandsToSerialize to get a potentially incomplete list of properties, and all that.
* Remove TransitionProperty::AllAnthony Ramine2018-02-261-16/+0
|
* style: Return early instead of indenting in animation code.Emilio Cobos Álvarez2018-02-241-3/+5
| | | | And also leave some WTF comments, because they make no sense so far.
* style: Make the TElement type arrive to the `cascade` function.Emilio Cobos Álvarez2018-01-231-40/+57
| | | | | | | | | | | | | | | | | Not super-proud of this one, but it's the easiest way I could think of. The changeset looks bigger than what it is, because while at it I've rewrapped a fair amount of functions around to use proper block indentation. Alternatives are parameterizing Stylist by <E>, which is not fun, or moving the concrete element from layout_thread to layout, but that implies layout depending on script, which isn't fun either. Other alternative is implementing an empty enum and making anon boxes work on it. It has the advantage of removing the annoying type parameter, but the disadvantage of instantiating `cascade` twice, which isn't great, and having to maintain all the boilerplate of a `TElement` implementation that just does nothing.
* Skip rule node which contains only inherited properties for rule cache.Xidorn Quan2018-01-051-0/+1
|
* style: Use the ? operator for OptionMatt Brubeck2017-12-091-6/+1
|
* style: Make all keywords CamelCase for consistency.Emilio Cobos Álvarez2017-12-061-14/+14
| | | | This prevents confusion and paves the ground for derive(Parse) of them.
* style: Move animation-iteration-count outside of mako.Emilio Cobos Álvarez2017-10-241-1/+1
|
* style: Cleanup the animated value setup.Emilio Cobos Álvarez2017-09-291-79/+76
| | | | | | | | We have three different enums to represent slightly different things. Reuse them properly, and kill some code in the animated_properties module while at it. MozReview-Commit-ID: 5ZAly8f4lWy Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Filter out !important property in keyframes for servo.Hiroyuki Ikezoe2017-09-201-4/+6
|
* style: Add a TLS-based style struct caching mechanism.Emilio Cobos Álvarez2017-09-141-1/+3
|
* Auto merge of #18431 - mbrubeck:pdb-size, r=SimonSapinbors-servo2017-09-111-4/+3
|\ | | | | | | | | | | | | | | | | | | | | Use SmallBitVec to optimize size of PropertyDeclarationBlock https://bugzilla.mozilla.org/show_bug.cgi?id=1398322 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18431) <!-- Reviewable:end -->
| * Use SmallBitVec for important flags in PDBMatt Brubeck2017-09-111-4/+3
| |
* | style: Remove another stale todo in animation.rsEmilio Cobos Álvarez2017-09-091-10/+8
|/ | | | There's no mutex anymore.
* style: Remove CascadeInfo.Emilio Cobos Álvarez2017-08-281-1/+0
|
* style: Remove SharedStyleContext::quirks_mode.Emilio Cobos Álvarez2017-08-251-1/+1
|
* order derivable traits listsClément DAVID2017-08-231-5/+5
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* style: Make sure to set the initial value of the transition even if we don't ↵Emilio Cobos Álvarez2017-08-211-9/+11
| | | | | | start it. Otherwise we may get to the end of it directly, which is far from what we want.
* style: Tweak Stylist API for getting animations to avoid exposing the hash ↵Cameron McCormack2017-08-091-2/+2
| | | | table.
* Make it possible to construct StyleBuilder with two different inherited styles.Boris Zbarsky2017-07-261-0/+1
| | | | Part 3 of Gecko bug 1382806. r=emilio
* Auto merge of #17775 - michael-p:rename-stylearc-to-servo-arc, r=emiliobors-servo2017-07-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all uses of the style::stylearc alias with servo_arc. The `stylearc` alias is left there temporarilly and will be removed completely in a later commit/PR where also `components/style/gecko/generated/structs_{debug|release}.rs` are re-generated (they still use the old alias). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17768 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because no new features / only refactoring <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17775) <!-- Reviewable:end -->
| * Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-1/+1
| | | | | | | | | | | | The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
* | Auto merge of #17774 - servo:derive-all-the-things, r=emiliobors-servo2017-07-191-13/+5
|\ \ | |/ |/| | | | | | | | | | | Prepare some code for future derivation 🌊 <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17774) <!-- Reviewable:end -->
| * Don't use Point2D<f32> for cubic curves anymoreAnthony Ramine2017-07-191-13/+5
| |
* | style: Cleanup most of the Inner mess.Emilio Cobos Álvarez2017-07-181-8/+9
|/ | | | MozReview-Commit-ID: Ieg2GJT0yUl
* stylo: Use ComputedValuesInner instead of ComputedValues when we don't need itManish Goregaokar2017-07-171-6/+6
|
* stylo: Create error reporters linked to documents (bug 1352669)Josh Matthews2017-07-101-1/+0
|
* Move match and cascade temporaries to CurrentElementInfoJ. Ryan Stinnett2017-06-221-0/+1
| | | | | | | | | | | | | | | | | Before this change, the `ComputedStyle` struct that is part of permanent style data per element holds 2 `StrongRuleNode`s (unvisited and visited) and 2 `Arc<ComputedValues>` (unvisited and visited). Both rule nodes and the visited values don't actually need to be here. This patch moves these 3 to new temporary storage in `CascadeInputs` on `CurrentElementInfo` during the match and cascade process. Rule nodes are pushed down inside the `ComputedValues` for later access after the cascade. (Visited values were already available there.) The permanent style data per element now has just the `Arc<ComputedValues>` for itself and eager pseudo-elements (plus the `RestyleHint`). MozReview-Commit-ID: 3wq52ERMpdi
* style: Be more strict when setting the root font size.Emilio Cobos Álvarez2017-06-211-1/+0
| | | | | | | | | | Before this commit, we assumed that if the element had no parent element, it was the root of the document, which is plain false, since we can arrive there from, let's say, getComputedStyle on a detached node. Bug: 1374062 Reviewed-By: heycam MozReview-Commit-ID: 65DxdzXgd0J
* Use AnimatableLonghand for AnimationValueMap and related codeBrian Birtles2017-06-151-7/+27
| | | | | | | | | In the next few patches we move all non-transition related code over to using AnimatableLonghand instead of TransitionProperty. This will allow us to re-purpose TransitionProperty to represent only properties that can be transitioned (i.e. excluding discrete properties) as well as simplifying the code by removing the need to deal with shorthands and the "all" value in places that do not need to handle those values.
* Bump euclid to 0.14.Nicolas Silva2017-06-141-1/+1
|
* Use generics for transition-timing-function 📈Anthony Ramine2017-06-051-19/+20
|
* style: Split stylesheets.rsEmilio Cobos Álvarez2017-06-041-1/+1
| | | | | | | | | | | | | This file has become quite bloated lately. This commit deletes that file in favor of a set of submodules. The only noticeable change apart from code move, is converting deep_clone_foo methods into a trait. It also unifies logic related to different style rules in the same place. There's some missing work, specially related to font-face and counter-style, but I think this is worth landing in the meantime.
* style: Add support for disabled document colors.Cameron McCormack2017-05-301-1/+3
|
* Match and cascade visited stylesJ. Ryan Stinnett2017-05-241-0/+3
| | | | | | | | | | | | | | | To support visited styles, we match and cascade a separate set of styles any time we notice that an element has a relevant link. The visited rules and values are held in `ComputedStyle` alongside the regular rules and values, which simplifies supporting various APIs like `cascade_primary_and_pseudos` which expect easy access to previously matched rules. To simplify passing the additional values around, an additional reference to the visited `ComputedValues` is placed inside the regular `ComputedValues`. MozReview-Commit-ID: 2ebbjcfkfWf