| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.
Closes #19649, #19680, #19802
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
backed out."
This reverts commit b96d96d448c8ff93f212f225013461999540a5d0.
The fix on the Gecko side is trivial, and I can land it after this lands.
|
|
|
|
|
|
| |
r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/17796
|
|
|
|
| |
Gecko_CalcStyleDifference.
|
| |
|
|
|
|
| |
style changes to children.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Remove cached thread local context from LayoutContext, use LayoutContext for
assign_inline_sizes(), and simplify the parallel flow traversal code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
This makes it consistent with an upcoming update of the selectors crate.
|
|
|
|
| |
MozReview-Commit-ID: LfaZFCVlIb1
|
|
|
|
| |
thread
|
|
|
|
| |
to the caller.
|
|
|
|
|
|
|
|
|
|
| |
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...).
|
|
|
|
| |
infrastructure for controlling animations.
|
| |
|
| |
|
|
|
|
| |
Self-review is helpful it seems.
|
|
|
|
|
|
|
| |
unnecessarily
This was here before, but I moved it up presumably in one of my attempts and
never forgot to restore that.
|
|
|
|
|
|
| |
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?
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
I have to make the appropriate changes in layout, but I'm running out of battery
in the bus.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Resolves #9223
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| | |
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 -->
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
|
|
|
| |
This is recommended at <https://github.com/tomaka/clock_ticks>.
|
|
|
|
|
|
|
|
|
|
| |
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.
|