aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/animation.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix Servo build.Emilio Cobos Álvarez2018-08-081-4/+4
|
* style: Fix servo build.Emilio Cobos Álvarez2018-05-051-3/+3
|
* Move DL items from gfx to layoutPyfisch2018-04-221-1/+1
| | | | | | | | | Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, #19680, #19802
* style: Make the TElement type arrive to the `cascade` function.Emilio Cobos Álvarez2018-01-231-20/+29
| | | | | | | | | | | | | | | | | 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.
* Turn flow::base and friends into methodsMatt Brubeck2017-12-141-2/+2
|
* stylo: Remove a lot of the restyle damage related complexity.Emilio Cobos Álvarez2017-08-201-3/+4
| | | | | | | | | | The only reason why we had the `existing_style_for_style_damage` bit is to apply some optimizations that we don't have anymore. I still want to reintroduce a few of them, at least for the non-eager pseudo-element case... But I think I won't need this at all. This allows us to remove a fair amount of Gecko code too.
* Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)Simon Sapin2017-08-151-1/+1
|
* Revert "Backed out changeset b10e6ba9cbdb because gecko part had to be ↵Emilio Cobos Álvarez2017-07-201-1/+3
| | | | | | | | backed out." This reverts commit b96d96d448c8ff93f212f225013461999540a5d0. The fix on the Gecko side is trivial, and I can land it after this lands.
* Backed out changeset b10e6ba9cbdb because gecko part had to be backed out. ↵Gecko Backout2017-07-201-3/+1
| | | | | | r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/17796
* style: Pass old ComputedValues and old cached struct bits to ↵Cameron McCormack2017-07-201-1/+3
| | | | Gecko_CalcStyleDifference.
* style: Avoid some cfg checks in context.rsEmilio Cobos Álvarez2017-05-291-4/+4
|
* style: Use RestyleDamage to determine whether we must continue cascading ↵Cameron McCormack2017-05-201-1/+3
| | | | style changes to children.
* Warn about ignored transitions which can't be rooted.Josh Matthews2017-05-151-4/+8
|
* Accumulate transitioning nodes inside the layout context.Josh Matthews2017-05-151-3/+6
|
* Root nodes for the duration of their CSS transitions.Josh Matthews2017-05-151-3/+10
| | | | | | | | This ensures that we can pass a node address as part of the asynchronous transition end notification, making it safe to fire the corresponding DOM event on the node from the script thread. Without explicitly rooting this node when the transition starts, we risk the node being GCed before the transition is complete.
* stylo: Store font metrics provider in thread local style contextManish Goregaokar2017-04-091-1/+3
|
* Remove cached thread local context from LayoutContextPu Xingyu2017-02-081-2/+2
| | | | | Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
* style: Document the animated_properties code.Emilio Cobos Álvarez2016-12-311-1/+1
|
* Make Restyle tracking more granular.Bobby Holley2016-12-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The primary idea of this patch is to ditch the rigid enum of Previous/Current styles, and replace it with a series of indicators for the various types of work that needs to be performed (expanding snapshots, rematching, recascading, and damage processing). This loses us a little bit of sanity checking (since the up-to-date-ness of our style is no longer baked into the type system), but gives us a lot more flexibility that we'll need going forward (especially when we separate matching from cascading). We also eliminate get_styling_mode in favor of a method on the traversal. This patch does a few other things as ridealongs: * Temporarily eliminates the handling for transfering ownership of styles to the frame. We'll need this again at some point, but for now it's causing too much complexity for a half-implemented feature. * Ditches TRestyleDamage, which is no longer necessary post-crate-merge, and is a constant source of compilation failures from either needing to be imported or being unnecessarily imported (which varies between gecko and servo). * Expands Snapshots for the traversal root, which was missing before. * Fixes up the skip_root stuff to avoid visiting the skipped root. * Unifies parallel traversal and avoids spawning for a single work item. * Adds an explicit pre_traverse step do any pre-processing and determine whether we need to traverse at all. MozReview-Commit-ID: IKhLAkAigXE
* layout: Minor style cleanup.Patrick Walton2016-11-301-3/+5
|
* Remove SelectorImpl aliasesSimon Sapin2016-11-221-2/+2
|
* Rename selector_impl.rs to selector_parser.rsSimon Sapin2016-11-201-1/+1
| | | | This makes it consistent with an upcoming update of the selectors crate.
* Stop using associated types for the concrete TRestyleDamage implementation.Bobby Holley2016-11-071-1/+1
| | | | MozReview-Commit-ID: LfaZFCVlIb1
* Emit TransitionEnd events in the layout thread and process it in the script ↵Keith Yeung2016-10-111-2/+10
| | | | thread
* Make RestyleDamage::compute take no optional argument, delegate the handling ↵Emilio Cobos Álvarez2016-08-101-1/+1
| | | | to the caller.
* style: Refactor TRestyleDamage and TNode to accept/provide a "style source"Emilio Cobos Álvarez2016-08-031-2/+4
| | | | | | | | | | In the Gecko case, this style source would be the style context. In the servo case, it will be always the computed values. We could optimise this further in the case of stylo (from three FFI calls to one) if we use an API of the form CalcAndStore(node, new_cv). But that would imply borrowing the data twice from Servo (we also have borrow_data_unchecked fwiw, but...).
* style: Add a new Timer structure to the shared style context, and basic ↵Emilio Cobos Álvarez2016-07-201-4/+5
| | | | infrastructure for controlling animations.
* Remove the ComputedValue traits and style_struct_traitsSimon Sapin2016-07-201-7/+6
|
* style: Fix parsing and add generated keyframesEmilio Cobos Álvarez2016-06-281-6/+11
|
* layout: Simplify logic in layout/animation.rsEmilio Cobos Álvarez2016-06-281-25/+18
| | | | Self-review is helpful it seems.
* layout: animation: hoist down precise_time_s() call to avoid calling it ↵Emilio Cobos Álvarez2016-06-281-1/+1
| | | | | | | unnecessarily This was here before, but I moved it up presumably in one of my attempts and never forgot to restore that.
* style: Allow pausing and unpausing animations.Emilio Cobos Álvarez2016-06-281-20/+16
| | | | | | There's a bit of flickering when unpausing where the node has the original state, but I'm not totally sure where it comes from, posibly from PropertyAnimation returning None due to no styles changing?
* style: WTF I was thinking about when I wrote that?Emilio Cobos Álvarez2016-06-281-1/+0
|
* style: Support animation-direction.Emilio Cobos Álvarez2016-06-281-18/+7
|
* tidy: Clean up warnings and tidy lints.Emilio Cobos Álvarez2016-06-281-2/+1
|
* style: layout: Get actual keyframes working!Emilio Cobos Álvarez2016-06-281-2/+40
| | | | | | | | | | | | | | | | | | | | | There are a few shortcomings, for example: * We don't do the same as other browsers when some properties are not specified in some of the keyframes, though this is easy to work out (though a bit more expensive in the sense that we should apply all the previous keyframes' style instead of just the previous and the next. * To trigger the initial animation, a restyle is necessary. Should be easy to do an initial restyle off-hand or something like that, but for now this is worked-around adding a :hover rule to the node. Also, the animation is resetted when the node is hovered. That's a bug, but is probably not so difficult to test. * A few things, mainly animation-direction, are not supported yet, but shouldn't be that hard to support. Still a lot of work to do, but I think this approach might be ok.
* layout: Make animations work... more or less.Emilio Cobos Álvarez2016-06-281-23/+43
| | | | | | | | There's some maths I've done wrong, but it DOES animate some things, though they're only triggered past the first restyle, and we probably have some duplications where the animations arrive to layout. Anyway, got to go.
* style: Rewrite the animation representation to allow having state in layoutEmilio Cobos Álvarez2016-06-281-13/+18
| | | | | I have to make the appropriate changes in layout, but I'm running out of battery in the bus.
* Introduce a script_layout_interface crate and move RestyleDamage to it.Ms2ger2016-06-201-1/+1
|
* Remove ConstellationChan.Ms2ger2016-05-191-4/+4
| | | | | | It's a pointless abstraction that propagates the obsolete chan terminology, swaps the order in which the sender and receiver are returned, and hides a source of panics.
* Move AnimationState to script_traitsJoshua Holmer2016-01-131-2/+2
| | | | Resolves #9223
* Stop reexporting Animation from layout_interface.Ms2ger2016-01-111-2/+1
|
* Hoist the rest of css/matching.rs into style/.Bobby Holley2016-01-041-64/+2
|
* Remove the dependency of css/matching.rs on concrete RestyleDamage.Bobby Holley2016-01-041-5/+6
| | | | | We can make this easier by inlining helper method implementations in the traits themselves, which makes the code more compact as a nice side-effect.
* Auto merge of #9077 - bholley:split_layout_context_etc, r=SimonSapinbors-servo2015-12-301-3/+3
|\ | | | | | | | | | | | | | | Split the style-related bits out of LayoutContext and hoist more stuff into style/ <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9077) <!-- Reviewable:end -->
| * Hoist style-related context bits into style/.Bobby Holley2015-12-291-3/+3
| | | | | | | | | | | | | | | | We do a few things-here: * Hoist non-layout-dependent fields in SharedLayoutData and LocalLayoutData into style/. * Hoist parts of css/matching.rs into style/. * Hoist parts of layout/animation.rs into style/animation.rs. * Remove the duplicated-but-slightly-different definition of OpaqueNode.
* | Separate script and layout messages, issue #8843Joe Kachmar2015-12-261-1/+1
|/
* Move ScriptMsg from msg crate into script_traitsTomas Cernaj2015-12-091-2/+1
|
* Move from clock_ticks to time.Ms2ger2015-12-071-4/+4
| | | | This is recommended at <https://github.com/tomaka/clock_ticks>.
* Write animated values into the `ComputedValues` structures whenPatrick Walton2015-11-241-32/+58
| | | | | | | | | | animations complete or are interrupted. This adds a new pair of reader-writer locks. I measured the performance of style recalculation on Wikipedia and the overhead of the locks was not measurable. Closes #7816.