In particular, this fixes:
* Restyling of <area> elements that reuse the primary frame mapping for the
image map.
* Restyling of children of display: contents elements when the display:
contents element generates a hint.
* Restyling of out-of-flows (if my analysis in the bug is right).
* Restyling of the ::backdrop pseudo-element.
* Restyling of the Viewport frame.
I only managed to do a reftest for the second one, but the rest of them are
covered by the assertions added.
MozReview-Commit-ID: E7QtiQ1vPqu
This also makes us stop reframing on lack of frame for pseudo-elements for which
such a lack is expected in various situations and means the pseudo-element's
styles do not matter.
MozReview-Commit-ID: K1qzeow2Z6H
::first-letter and ::first-line both want to change the styles of kids, and we
don't want the normal post-traversal for kids to clobber those changes.
MozReview-Commit-ID: 1tIsXz1n0uZ
This also makes us stop reframing on lack of frame for pseudo-elements for which
such a lack is expected in various situations and means the pseudo-element's
styles do not matter.
MozReview-Commit-ID: K1qzeow2Z6H
::first-letter and ::first-line both want to change the styles of kids, and we
don't want the normal post-traversal for kids to clobber those changes.
MozReview-Commit-ID: 1tIsXz1n0uZ
The child anon box may be an nsHTMLScrollFrame, a nsRootBoxFrame, or a
nsSimplePageSequenceFrame. nsHTMLScrollFrame already knows how to deal with
its anonymous box kids, nsRootBoxFrame doesn't have any, and the next changeset
will deal with anon box kids of nsSimplePageSequenceFrame.
MozReview-Commit-ID: 2ZV061EhRmc
Before this patch, we were setting the dirty descendants bit in animation-only
restyles and it triggered unnecessary traversal for elements that does not need
the traversal (i.e no need selector matching).
MozReview-Commit-ID: 6pmF3ojVzgb
As I've said before, as module owner I prefer that MOZ_ASSERT_IF not be
used in the module because I consider it to be unreadable. However, a
few uses have crept in, and this patch removes them.
I consider it to be unreadable because the name looks like a name that
uses smalltalk-ish naming conventions, i.e., with a part of the name
corresponding to each parameter, in order. However, the parameters are
in the order opposite the name.
This was written primarily with the vim commands:
:%s/MOZ_ASSERT_IF(\([^,]*\),/MOZ_ASSERT(!\1 ||/
:wn
followed by manual cleanup for indentation and removal of !!.
MozReview-Commit-ID: G6rLbOn7k8d
This can happen with content attribute or state changes that end up not
generating any hint.
In particular, in the media_queries_dynamic.html case, the iframe resize was
toggling a few scrollbar attributes, which made us never pass the "didn't
restyle" test, even though the test really passed.
I'll probably need to add a workaround to assume we use viewport units, so
probably won't pass for long.
MozReview-Commit-ID: 2oEfic5yaOy
The difference is that PostRestyleEventForCSSRuleChanges sets
mRestyleForCSSRuleChanges true. In a subsequent patch,
we propagate a new TraversalRestyleBehavior flag to servo side
if mRestyleForCSSRuleChanges is true.
MozReview-Commit-ID: IKsBbm09uT9
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
Some changes to animations don't affect the computed style and yet still
require the layer to be updated. Therefore, we also need to call
AddLayerChangesForAnimation in ServoRestyleManager. In this patch, we
factor out this function from GeckoRestyleManager, so we can reuse it.
MozReview-Commit-ID: LL7D1oGS65l