Commit Graph

175 Commits

Author SHA1 Message Date
Boris Zbarsky
6cfed605fc Bug 1376640. Fix dynamic updates when an inline that sits between a first-letter and its block changes style. r=heycam
MozReview-Commit-ID: 8osMUpYVRvR
2017-06-28 22:19:35 -07:00
Carsten "Tomcat" Book
1370c74581 Backed out changeset 2992d5af6251 (bug 1376640) for assertion failures like Assertion failure: mOwner == ExpectedOwnerForChild(aFrame) (Missed some frame in the hierarchy?) 2017-06-29 08:22:08 +02:00
Boris Zbarsky
2bc0e8180b Bug 1376640. Fix dynamic updates when an inline that sits between a first-letter and its block changes style. r=heycam
MozReview-Commit-ID: 8osMUpYVRvR
2017-06-28 22:19:35 -07:00
Emilio Cobos Álvarez
03a3dd1fea Bug 1375969: Fix MightHave{State,Attribute}Dependency for XBL. r=heycam
MozReview-Commit-ID: 8I29pMHq4uf
2017-06-28 18:45:34 -07:00
Bobby Holley
53a0874e63 Bug 1376655 - Don't call EnsureSameStructsCached in ServoRestyleManager. r=emilio 2017-06-28 10:08:37 -07:00
Bobby Holley
0bb4f2f9ec Bug 1376655 - Use ServoStyleContext in more places. r=emilio 2017-06-28 10:08:36 -07:00
Emilio Cobos Álvarez
23662f6e46 Bug 1375674: Track the owner that represents the changes handled, and fix a bunch of issues while at it. r=heycam
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
2017-06-23 19:31:35 +02:00
Emilio Cobos Álvarez
d4f8f4534c Bug 1375674: Don't use the owner's changes handled for the backdrop frame. r=heycam
MozReview-Commit-ID: GpIQwqge8L
2017-06-23 19:26:20 +02:00
Boris Zbarsky
41540c4fa2 Bug 1324618 part 9. Implement FrameForPseudoElement for ::first-letter. r=emilio
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
2017-06-26 23:35:09 -07:00
Boris Zbarsky
37997250b7 Bug 1324618 part 7. Set our new style context on all our continuations in ServoRestyleManager. r=emilio
MozReview-Commit-ID: 4gVXPDCPZnq
2017-06-26 23:35:08 -07:00
Boris Zbarsky
ba3577a6cb Bug 1324618 part 6. Change when we update frame pseudo styles to happen after we've dealt with styles for the frame's kids. r=emilio
::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
2017-06-26 23:35:08 -07:00
Carsten "Tomcat" Book
9fcc7089b0 Backed out changeset d2ac7a671d41 (bug 1324618) 2017-06-27 10:39:43 +02:00
Carsten "Tomcat" Book
1268db481a Backed out changeset 01deb185c67a (bug 1324618) 2017-06-27 10:39:41 +02:00
Carsten "Tomcat" Book
5b501e61cc Backed out changeset 18cd81f24778 (bug 1324618) 2017-06-27 10:39:38 +02:00
Boris Zbarsky
d2856a83ea Bug 1324618 part 9. Implement FrameForPseudoElement for ::first-letter. r=emilio
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
2017-06-26 23:35:09 -07:00
Boris Zbarsky
ad077db78a Bug 1324618 part 7. Set our new style context on all our continuations in ServoRestyleManager. r=emilio
MozReview-Commit-ID: 4gVXPDCPZnq
2017-06-26 23:35:08 -07:00
Boris Zbarsky
3fba3a09b9 Bug 1324618 part 6. Change when we update frame pseudo styles to happen after we've dealt with styles for the frame's kids. r=emilio
::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
2017-06-26 23:35:08 -07:00
Boris Zbarsky
7d9cc57ca2 Bug 1375315. Make sure to update block pseudo-element styles on various anonymous blocks. r=emilio
MozReview-Commit-ID: HBabvfWYgdP
2017-06-22 11:24:11 -04:00
Emilio Cobos Álvarez
fc8b78f775 Bug 1374752: Pack together the StyleSet, ChangeList and handled change hints, and use the latter with anonymous boxes while we're at it. r=heycam
MozReview-Commit-ID: DiWcUwD9po5
2017-06-20 23:21:27 +02:00
Boris Zbarsky
1f252462c7 Bug 1369321. Make sure to restyle from all our style roots when rebuilding all style data with stylo. r=bholley
MozReview-Commit-ID: 5pghPVb2UY1
2017-06-21 15:52:56 -04:00
Boris Zbarsky
b5761d0213 Bug 1374761 part 1. Properly restyle the viewport and its child anonymous box when we do a restyle. r=heycam
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
2017-06-21 11:45:12 -04:00
Hiroyuki Ikezoe
6b6e18eb8b Bug 1356141 - Don't traverse any elements that needed only for animation-only restyles in normal traversal. r=heycam
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
2017-06-20 06:30:48 +09:00
Cameron McCormack
9d18031cce Bug 1352306 - Part 2: stylo: Only snapshot EventStates if there is some rule that depends on it. r=emilio
MozReview-Commit-ID: J5xhdi7pGSv
2017-05-09 18:13:45 +08:00
Cameron McCormack
ad3e8ba35b Bug 1352306 - Part 1: stylo: Only snapshot attributes if there is some rule that depends on that attribute. r=emilio
MozReview-Commit-ID: Emey96ovc2a
2017-05-08 16:04:31 +08:00
Sebastian Hengst
931186e1b7 Backed out changeset bb6b79e53e82 (bug 1352306) as requested by emilio. r=backout 2017-06-17 14:16:54 +02:00
Sebastian Hengst
667e4b12e2 Backed out changeset 46d7719ee8ae (bug 1352306) 2017-06-17 14:16:20 +02:00
Cameron McCormack
71fdcfcde8 Bug 1352306 - Part 2: stylo: Only snapshot EventStates if there is some rule that depends on it. r=emilio
MozReview-Commit-ID: J5xhdi7pGSv
2017-05-09 18:13:45 +08:00
Cameron McCormack
0e46a12d89 Bug 1352306 - Part 1: stylo: Only snapshot attributes if there is some rule that depends on that attribute. r=emilio
MozReview-Commit-ID: Emey96ovc2a
2017-05-08 16:04:31 +08:00
Bobby Holley
08b7a41caa Bug 1373725 - Trigger a rule tree gc at the end of DoProcessPendingRestyles. r=emilio
MozReview-Commit-ID: W2lkQohudA
2017-06-16 21:59:58 -07:00
Emilio Cobos Álvarez
ad49506734 Bug 1368236: Implement the "hints handled for descendants" optimization. r=heycam
MozReview-Commit-ID: D6CCmWbEXTs
2017-06-16 09:37:45 +02:00
Manish Goregaokar
533734efc7 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA
2017-06-10 22:27:45 -07:00
Emilio Cobos Álvarez
5808ad7655 Bug 1368240: Record whether an snapshot is recording a class attribute change or id change. r=heycam
I'll use this information in order to get fewer dependencies out of the
dependency set.

MozReview-Commit-ID: 5HlmKmSNO8p
2017-06-13 15:52:42 +02:00
Emilio Cobos Álvarez
f2f5a08725 Bug 1368240: Manually expand later sibling hints. r=heycam
This will help keeping RestyleData small, and the amount of complexity we need
to handle during the traversal down.

MozReview-Commit-ID: 2a0FF40tr66
2017-06-13 15:52:37 +02:00
Emilio Cobos Álvarez
1e5cead0c1 Bug 1371955: Diff against the correct style, not the table wrapper style. r=heycam
MozReview-Commit-ID: 9fwt2D7vOpW
2017-06-11 13:44:24 +02:00
Cameron McCormack
9677c86fa6 Bug 1365162 - Part 1: Restyle entire subtree when lang="" or xml:lang="" changes. r=emilio
MozReview-Commit-ID: 46YSGTxjshc
2017-06-05 13:05:19 +08:00
Ryan VanderMeulen
75cc747ca2 Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE
2017-06-07 22:55:56 -04:00
Hiroyuki Ikezoe
73a43218dd Bug 1368889 - Post animation restyle hint againt pseudo element instead of its parent. r=birtles
To traverse pseudo elements in animation-only restyle, the pseudo element
itself needs the animation-only dirty bit.

MozReview-Commit-ID: 11RfVqnPXfJ
2017-06-08 10:22:25 +09:00
L. David Baron
03d37750a7 Bug 1369260 - Remove use of MOZ_ASSERT_IF in layout. r=heycam
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
2017-06-06 22:27:17 -07:00
Cameron McCormack
7ac5893904 Bug 1365159 - Part 1: Record :-moz-browser-frame and :-moz-table-border-nonzero state on snapshots. r=emilio
MozReview-Commit-ID: BEglHnXhpYJ
2017-06-05 14:19:30 +08:00
Emilio Cobos Álvarez
084a6bad22 Bug 1357461: Ensure not to increment the restyle generation if we haven't restyled after all. r=heycam
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
2017-06-03 18:59:10 +02:00
Emilio Cobos Álvarez
75dd4f7f8c Bug 1369187: Don't return an old style context for ::first-line and ::first-letter, but not crash either. r=bholley
This will make us reframe until fixed. It's not hard to fix, just requires to
discuss how :)

MozReview-Commit-ID: 1vlRUSuMqtp
2017-06-01 22:19:26 +02:00
Emilio Cobos Álvarez
0ebab4c299 Bug 1357583: Tidy the PostRestyleEventForCSSRuleChanges API. r=heycam
MozReview-Commit-ID: BtOWWC5knsi
2017-05-29 23:01:50 +02:00
Hiroyuki Ikezoe
f68519c81c Bug 1364799 - Add a new TraversalRestyleBehavior that represents the traversal is triggered by CSS rule changes. r=birtles
And propagate the new flag to servo if mRestyleForCSSRuleChanges is set.

MozReview-Commit-ID: HRZ5duYgciF
2017-05-21 08:16:26 +09:00
Hiroyuki Ikezoe
ac168a7d07 Bug 1364799 - Add PostRestyleEventForCSSRuleChanges to distinguish PostRestyleEvent. r=birtles,heycam
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
2017-05-21 08:16:26 +09:00
Emilio Cobos Álvarez
392abfca94 Bug 1366142: Ignore reentrant change hints without primary frame. r=heycam
MozReview-Commit-ID: 4bF7M0KMhNL
2017-05-20 14:35:37 +02:00
Boris Chiou
18ca899edb Bug 1334036 - Part 11: Trigger animation-only restyle when we handle an event with coordinates. r=birtles,heycam
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
2017-05-19 16:16:41 +08:00
Boris Chiou
647a46ae04 Bug 1334036 - Part 8: Add AddLayerChangesForAnimation in ServoRestyleManager. r=birtles
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
2017-05-02 14:03:16 +08:00
Emilio Cobos Álvarez
7423e83770 Bug 1364871: Restyle ::backdrop too. r=heycam
MozReview-Commit-ID: BGWRiaeZiD8
2017-05-19 23:59:23 +02:00
Emilio Cobos Álvarez
17e7c60699 Bug 1364871: Add a function to update frame pseudo-element styles during the post-traversal, and restyle bullet frames. r=heycam
MozReview-Commit-ID: 9m0jqmxjOb6
2017-05-19 23:58:22 +02:00
Emilio Cobos Álvarez
af4b6e8260 Bug 1365902: Make ServoStyleSet::RebuildAllStyleData async. r=heycam
MozReview-Commit-ID: D9Ri4gO3F6G
2017-05-17 18:33:32 +02:00