Without this change, we can end up asserting in ComputeVariablesData and
crashing in CSSVariableResolver::Resolve due to not finding any variable
declarations on the rules we matched, when we have content like in the
crashtest added here, i.e. variables inheriting into a pseudo like
::first-line and animations on the element inside the ::first-line.
We could solve this alternatively by removing the assertion and making
CSSVariableResolver::Resolve handle a null aDeclarations more gracefully,
but since we can save the effort of recomputing the Variables struct in
this case, we may as well.
MozReview-Commit-ID: 6l06ZF3WGsy
Also update test_transitions_dynamic_changes.html because we don't
support "font" property for stylo now. According to its context and purpose, we
only need a property other than "text-indent", so it is not
necessary to use "font".
Besides, we don't support shorthand properties for transitions, so
test_transitions.html have two intermittents. Mark the expect number as
'*' until we fix shorthand properties for transitions.
MozReview-Commit-ID: HyuOV29AJ9a
--HG--
extra : rebase_source : b5d4bf2786bb590e16c06b7b93c95a38cabf1781
We need a utility method to get the AnimationCollection by dom::Element
and the pseudo element tag.
MozReview-Commit-ID: KCOY6EKFFX5
--HG--
extra : rebase_source : de1b9386d6324cfb4cee0d84b13a0b1af4aa5c12
We add these FFIs for retrieving the existing transitions, so we can
reduce the false alarms of triggering transitions from Servo:
1. Gecko_ElementTransitions_Length
2. Gecko_ElementTransitions_PropertyAt
3. Gecko_ElementTransitions_EndValueAt
MozReview-Commit-ID: 9eLd8fxmNd9
--HG--
extra : rebase_source : 0ea23dd7f48dbdc1f31a83244ab1dfaf1b20a321
Add one FFI, Gecko_ElementHasCSSTransitions, to check if there is any
transition in CSSTransitionCollection. This will be used to check if we need
to update transition and if we should compute the after-change style.
MozReview-Commit-ID: 7xP4SdxNp7g
--HG--
extra : rebase_source : dbc4941151835c2f1c3596a6baaef77b2198890c
Animation-only restyle should include both Animation and Transition
cascade levels.
MozReview-Commit-ID: Jo1sb5fGUC0
--HG--
extra : rebase_source : ddd7d796b93f9e7ced912ec4fa2eb79e7ba58784
The function uses document's default computed values if the parent style
is not specified.
MozReview-Commit-ID: ICd3phAi0C6
--HG--
extra : rebase_source : 343dee682096b75cd7f905db7207823f7e3624b5
It will be used to check whether the PropertyDeclarationBlock has 'inherit',
'initial' or 'unset'.
MozReview-Commit-ID: JxlxAJJSNJI
--HG--
extra : rebase_source : 99912dcbcfb39e2710e822b93c7933af79b5421b
Also this patch add nsIAtom as an argument to ResolveTransientStyle() to call
the new function ResolveServoTransientStyle easier. The only call site of the
ResolveTransientStyle() has already nsIAtom* there.
MozReview-Commit-ID: IwxqZbaCSpB
--HG--
extra : rebase_source : b94a3a8723fe53f38eb6144a5926dec3d7796e72
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 switches over from using nsStringBuffer to nsString for URLValueData's
|mString| member. This avoids various tedious conversions and can provide
potential performance improvements by avoiding length calculations.
MozReview-Commit-ID: 5eRifUZrAso
For people working on Rust code, compiling in debug mode (Cargo's "dev"
profile) is convenient: debug assertions are turned on, optimization is
turned off, and parallel compilation inside of rustc itself can be
used. These things make the build faster and the debugging experience
more pleasant.
To obtain that currently, one needs to --enable-debug at the Gecko
toplevel, which turns on debug assertions for the entire browser, which
makes things run unreasonably slowly. So it would be desirable to be
able to turn *off* debug mode for the entirety of the browser, but turn
on debug mode for the Rust code only.
Hence this added switch, --enable-rust-debug, which does what it
suggests and defaults to the value of --enable-debug. For our own
sanity and because we judge it a non-existent use case, we do not
support --enable-debug --disable-rust-debug.