This patch also removes the duplication of style contexts during the
restyle, because otherwise pointer equality of ServoComputedValues stops
holding (and we assert on that in a few places)
MozReview-Commit-ID: 7Evc1p8ZfM2
ForAnimationOnly is somewhat misleading, it means actually we process
*only* animation-only restyle without normal restyle. The purpose of
ForAnimationOnly is for updating throttled animations to get correct position
of the animations when we need to handle events. Currently we do also update
unthrottled animations though.
MozReview-Commit-ID: HBCCluKrZs9
--HG--
extra : rebase_source : bb37080e44b161b8b0210e3ba3c055604cf43a72
And propagate the new flag to servo if mRestyleForCSSRuleChanges is set.
MozReview-Commit-ID: HRZ5duYgciF
--HG--
extra : rebase_source : 65528ea0dfa21e84bb9184a849c72a5c322e306b
We need to request an animation-only restyle to force flush all throttled
animations on main thread when we handle an event with coordinates
(e.g. mouse event).
MozReview-Commit-ID: KkjeQVsLgTl
--HG--
extra : rebase_source : 314408062e719e9f52df9a6726e2f3dad817bbef
As per SVG spec [1], we should also parse negative color components values for
SMIL, but currently Gecko does not support it either.
[1] https://www.w3.org/TR/SVG/implnote.html#RangeClamping
MozReview-Commit-ID: FH80zN3jyKh
--HG--
extra : rebase_source : c9b435222ee7e84cb6e84064a62b2b866e75b6eb
assert_parsing_mode_match() is mostly the same as
assert_restyle_hints_match().
MozReview-Commit-ID: 7oOHlZ06DYk
--HG--
extra : rebase_source : 2ace9d66f64c1cfc11c17ded37fdabf356f57d5c
We need another flag that represents allow-negative-number for SMIL, so
this enum will also comprise the another parsing mode that allows negative number.
MozReview-Commit-ID: IDFNppjGeB
--HG--
extra : rebase_source : 456f661b33346ff4a756a66c6accf4ab1a5f2f80
Text style is always resolved via ServoStyleSet::ResolveStyleForText, either
from the frame constructor initially, or from
ServoRestyleManager::ProcessPostTraversalForText.
So text-only adjustments should go there instead. Since that doesn't call into
cascade(), all the code that passes `pseudo` there is dead code we can remove.
MozReview-Commit-ID: jpbBYpLlUL
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
Add a Gecko side LengthParsingMode enum that matches the Servo version. This
will be used in a few Stylo glue APIs on the FFI boundary.
MozReview-Commit-ID: EuDlWc6ZiQ8
This argument will be used to control whether we are restyling in preparation
for reframing a subtree, which can avoid generating any change hints, as we
aren't preserving the frames that they would otherwise apply to.
MozReview-Commit-ID: DkLVCUnNGt
--HG--
extra : rebase_source : cb3537cea26cb9805b2ec1556cf5ca6eb9d38ab8
The UpdateAnimationsTasks is a bitflags and each bit is generated from
Gecko's UpdateAnimationsTasks (enum class) values for matching values
between C++ and Rust. For this reason, the bitflags is annotated as
(feature = "gecko"), as a result update_animations() which uses this bitflags
also became gecko-only function.
MozReview-Commit-ID: AfQd0FJGkYd
--HG--
extra : rebase_source : 2a5fee40c57a7941defa447357915756af42bc11
I noticed that our current behavior in ContentRangeInserted is incorrect. Unlike
ContentInserted (where this code lived originally), ContentRangeInserted takes a
start and end element. I'm not sure if we ever take that path for new content that
needs style, but it seemed sketchy. And generally, it seems nice to just always
style new content the same way (though we still need to style NAC by the subtree
root, since it hasn't been attached to the parent yet).
For situations where there is indeed only one unstyled child, the traversal
overhead should be neglible, since we special-case the single-element in
parallel.rs to avoid calling into rayon.
Being more explicit about what we want here also makes us more robust against
the other handful of callpaths that can take us into
nsCSSFrameConstructor::{ContentRangeInserted,ContentAppended}. Currently we
can call StyleNewSubtree on an already-styled element via RecreateFramesForContent,
which triggers an assertion in the servo traversal.
MozReview-Commit-ID: DqCGh90deHH