Граф коммитов

146 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 152083b709 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 3188b9bfd6 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA

--HG--
extra : rebase_source : e2f65c316be2c5640150eb5ff5628505ce446535
2017-06-10 22:27:45 -07:00
Emilio Cobos Álvarez 716f239e92 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 8d140efc44 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 573dec8ba1 Bug 1371955: Diff against the correct style, not the table wrapper style. r=heycam
MozReview-Commit-ID: 9fwt2D7vOpW

--HG--
extra : rebase_source : be1e23d1d56d7c8b21529358801e903ff8aff899
2017-06-11 13:44:24 +02:00
Cameron McCormack 100ad77dae Bug 1365162 - Part 1: Restyle entire subtree when lang="" or xml:lang="" changes. r=emilio
MozReview-Commit-ID: 46YSGTxjshc

--HG--
extra : rebase_source : 427396818c90d74b4ea04ff1308c80d82a337c38
2017-06-05 13:05:19 +08:00
Ryan VanderMeulen 9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00
Hiroyuki Ikezoe cdde6f6108 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

--HG--
extra : rebase_source : d048c9a053c03bf3fef46fcbfd9cbd5f60204e1d
2017-06-08 10:22:25 +09:00
L. David Baron 53383e2d5c 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 faef490277 Bug 1365159 - Part 1: Record :-moz-browser-frame and :-moz-table-border-nonzero state on snapshots. r=emilio
MozReview-Commit-ID: BEglHnXhpYJ

--HG--
extra : rebase_source : 0b10b26a8ef0c504e38be89b87ea319af7a31d3f
2017-06-05 14:19:30 +08:00
Emilio Cobos Álvarez 2f69bad812 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 96f5484a9f 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 0eea23decf Bug 1357583: Tidy the PostRestyleEventForCSSRuleChanges API. r=heycam
MozReview-Commit-ID: BtOWWC5knsi
2017-05-29 23:01:50 +02:00
Hiroyuki Ikezoe 49bc653390 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

--HG--
extra : rebase_source : 65528ea0dfa21e84bb9184a849c72a5c322e306b
2017-05-21 08:16:26 +09:00
Hiroyuki Ikezoe 665da78452 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

--HG--
extra : rebase_source : 5014c0a978f98e81543ec7766d2daa415317069c
2017-05-21 08:16:26 +09:00
Emilio Cobos Álvarez 51e1c0b54e Bug 1366142: Ignore reentrant change hints without primary frame. r=heycam
MozReview-Commit-ID: 4bF7M0KMhNL

--HG--
extra : rebase_source : 5ad2d1a21e8b1110345b3b2c350de0f1011e61dc
2017-05-20 14:35:37 +02:00
Boris Chiou 38215cedea 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

--HG--
extra : rebase_source : 314408062e719e9f52df9a6726e2f3dad817bbef
2017-05-19 16:16:41 +08:00
Boris Chiou 9a42bdba22 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

--HG--
extra : rebase_source : cd028a3d8f5dc251ec6615918a0f9569f0af44f5
2017-05-02 14:03:16 +08:00
Emilio Cobos Álvarez cd98f069a2 Bug 1364871: Restyle ::backdrop too. r=heycam
MozReview-Commit-ID: BGWRiaeZiD8

--HG--
extra : rebase_source : a3ebd025ca9a9d7a03a5aeec95e0d40791c9af7c
2017-05-19 23:59:23 +02:00
Emilio Cobos Álvarez cbebceac22 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

--HG--
extra : rebase_source : 2d0b8dbcf451b8e9bc69759681dbce1f35ad28c5
2017-05-19 23:58:22 +02:00
Emilio Cobos Álvarez 5a98022984 Bug 1365902: Make ServoStyleSet::RebuildAllStyleData async. r=heycam
MozReview-Commit-ID: D9Ri4gO3F6G

--HG--
extra : rebase_source : 7bcd208994a7140eadc54fa32f209643a8570b72
2017-05-17 18:33:32 +02:00
Emilio Cobos Álvarez 9e24a8c649 Bug 1364862: Make PostRebuildAllStyleData async. r=heycam
MozReview-Commit-ID: EM3eUP1dWwA
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 2928e4cbd12af99dde2d913bb814febec72200a0
2017-05-15 18:02:59 +02:00
Emilio Cobos Álvarez ab5433c222 Bug 1364824: Implement ServoRestyleManager::PostRebuildAllStyleDataEvent. r=heycam
MozReview-Commit-ID: I9HmM9ZMB2c
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 08481f2a84508ed79d544fefbf39a92cac0d5ce5
2017-05-15 09:41:42 +02:00
Hiroyuki Ikezoe 2cac8774d0 Bug 1356916 - Call PostRestyleEvent() with the change hint obtained by Element::GetAttributeChangeHint in ServoRestyleManager::AttributeChanged. r=heycam
MozReview-Commit-ID: 14clm0eE0iE

--HG--
extra : rebase_source : d2b14bdc264c283075284172cae873294b16a51f
2017-05-11 07:30:34 +09:00
Emilio Cobos Álvarez 68f1504992 Bug 1355343: Take all the snapshots into account. r=bholley
I've chosen this approach mainly because there's no other good way to guarantee
the model is correct than holding the snapshots alive until a style refresh.

What I tried before this (storing them in a sort of "immutable element data") is
a pain, since we call into style from the frame constructor and other content
notifications, which makes keeping track of which snapshots should be cleared an
which shouldn't an insane task.

Ideally we'd have a single entry-point for style, but that's not the case right
now, and changing that requires pretty non-trivial changes to the frame
constructor.

MozReview-Commit-ID: FF1KWZv2iBM

--HG--
extra : rebase_source : b02d516ea164fc567110338411bf6ba251d53dab
2017-05-07 16:36:47 +02:00
Emilio Cobos Álvarez 266c5357b1 Bug 1362991: Compute at most one text style context per element. r=heycam
MozReview-Commit-ID: IDTRk47CsRS

--HG--
extra : rebase_source : fa38a591fea6ed6852532d939bce4323eb6552ae
2017-05-08 14:49:57 +02:00
Emilio Cobos Álvarez 3f51663f2e Bug 1351339: Compute text style changes when the parent is a display: contents element. r=heycam
MozReview-Commit-ID: GWPNevfP4xc

--HG--
extra : rebase_source : b8fb49f80c4e5c30747eb76d95961ec669aa579b
2017-05-08 03:16:43 +02:00
Emilio Cobos Álvarez e464dadceb Bug 1361766: Move MathML content state changes outside of reflow. r=xidorn
This also adds assertions to ensure attributes and state don't change during
layout or frame construction.

MozReview-Commit-ID: BANcpxnRsYS

--HG--
extra : rebase_source : 5d1bc424d3ed90fda3047d3c92c09251346b7bec
2017-05-02 22:42:26 +02:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Emilio Cobos Álvarez d77548d239 Bug 1331047: Implement the new traversal semantics for stylo. r=bholley,hiro
MozReview-Commit-ID: 4BXx9JpGZKX
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-27 17:06:11 +02:00
Emilio Cobos Álvarez 6fe2b3e89d Bug 1355351: Simplify nsLayoutUtils callers, and make child iterators notice display: contents pseudos. r=heycam
This also happens to fix other bugs, like making display: contents pseudos
animatable, which weren't before.

MozReview-Commit-ID: LhwTPNbFvSZ

--HG--
extra : rebase_source : 785105b08d6bfa15ad257e61b769a263c6810ad0
2017-04-19 12:53:57 +02:00
Boris Chiou 14c973b7b3 Bug 1355758 - Update RestyleManager::mAnimationGeneration for non-animation update. r=heycam
We use RestyleManager::mAnimationGeneration as the animation index of a
new created transition, and Element.getAnimations() uses this index to
sort the order of transitions. We increase mAnimationGeneration one per
restyle cycle if there is any non-animation update.

MozReview-Commit-ID: KmirBzI7CXi

--HG--
extra : rebase_source : 6a9001ea99f86c25b1d8d0a822b51b8753248bfb
2017-04-21 16:44:17 +08:00
Ting-Yu Lin 919df843aa Bug 1354975 - Let the frame handles attribute change in ServoRestyleManager::AttributeChanged(). r=heycam
MozReview-Commit-ID: EdvgBnPlP9Y

--HG--
extra : rebase_source : 23acb09872d97f29354f5cac0a0485d88ef13bea
2017-04-07 16:41:33 +08:00
Manish Goregaokar 111b56703c Bug 1341647 - stylo: Move HTMLBodyElement::WalkContentStyleRules to the mapped attr functionality; r=bz
MozReview-Commit-ID: 90qDHl0Ane4

--HG--
extra : rebase_source : e3dace4a0ec7345ec801c02db7339e78a6242a1e
2017-03-29 12:10:00 -07:00
Emilio Cobos Álvarez 9aaeccc118 Bug 1351791: Move PostRestyleEventForLazyConstruction and PostRestyleEventInternal to GeckoRestyleManager. r=bholley
MozReview-Commit-ID: 5lrNlkbrnZb
2017-03-31 11:56:29 +02:00
Manish Goregaokar d52216a79d Bug 1341648 - stylo: Include content rules from HTMLTableCellElement::WalkContentStyleRules ; r=bz
This also removes the TABLE_ATTRS_DIRTY optimization. Constructing nsMappedAttributes isn't really expensive and we do it all the time anyway.

MozReview-Commit-ID: 2krt1nFUzgl

--HG--
extra : rebase_source : 18d400aed6f427e5efc503b87b6ee2d9af74f3f5
2017-03-26 13:53:34 -07:00
Bobby Holley e76c016430 Bug 1350441 - Make ServoRestyleManager::ClearServoDataFromSubtree a bit smarter. r=heycam
There's no reason to traverse the entire subtree if we encounter an unstyled section.

MozReview-Commit-ID: 7WeMTI73wR9
2017-03-29 09:27:24 -07:00
Emilio Cobos Álvarez 4b0d6c2248 Bug 1350140: Flush the overflow changed tracker when done with restyles. r=heycam
MozReview-Commit-ID: 6ENzvvxCok5

--HG--
extra : rebase_source : 5145b2761258de58d208b1d958e83e324723faaf
2017-03-27 22:55:20 +02:00
Bobby Holley 887595286b Bug 1350115 - Squelch post-traversal generated by additional animation traversals when we're styling a fresh subtree. r=heycam,r=birtles
This patch exists to avoid a crash in layout/style/test/test_animations.html. We end up
generating some ::before content, which causes us to style the new subtree at [1]. In
StyleNewSubtree, we fail the !postTraversalRequired assertion because
PrepareAndTraverseSubtree decided to traverse the tree twice (once to style it, and again
to restyle it for animations), and return that a post-traversal is needed.

The reason this issue happens with my NAC patches and not without is that we were previously
filtering out generated ::before content from the servo traversal, so the servo traversal
wouldn't have reached it and (presumably) the animation restyle wouldn't have happened and
we wouldn't have returned true for needing a post-traversal.

[1] http://searchfox.org/mozilla-central/rev/c48398abd9f0f074c69f2223260939e30e8f99a8/layout/base/nsCSSFrameConstructor.cpp#1918

MozReview-Commit-ID: 8tgzLjV8B3A
2017-03-24 09:40:30 -07:00
Cameron McCormack 5131fe23a2 Bug 1302054 - Part 1: Avoid computing style differences when we just want to ensure structs are cached on the new context. r=dbaron
MozReview-Commit-ID: DLhHcCD4GQS
2017-03-21 16:33:05 +08:00
Emilio Cobos Álvarez 6c40f8a40b Bug 1296516: Tidy RestyleManager::ContentStateChanged. r=heycam
MozReview-Commit-ID: 7iWc6JvljhT
2017-03-20 22:28:13 +01:00
Cameron McCormack 52f712bba2 Bug 1338461 - Pass eRestyle_StyleAttribute through to Servo_NoteExplicitHints. r=bholley
MozReview-Commit-ID: C7HIOTs1SSY

--HG--
extra : rebase_source : 638fe3e1c9ecf47dcd9b175ae03344450417c7da
2017-03-20 14:42:31 +08:00
Boris Zbarsky 2745162ccf Bug 1347411 part 1. Make sure to correctly update anon boxes belonging to ::before/::after pseudo-elements. r=heycam
MozReview-Commit-ID: AzF9WdUo1E
2017-03-15 14:00:42 -04:00
Emilio Cobos Álvarez ce085313a9 Bug 1328652: Ensure we do actual restyling work after calling RebuildAllStyleData. r=bz
The Gecko restyle manager does this synchronously, along with a content flush.

In my testing there's no need to do so, and Boris couldn't think off-hand of
why, except the fact that we have this mRebuildAllStyleData thing that takes
care of rebuilding the rule tree, which is quite sensitive.

Also, Boris made a good point about non-inheriting anon boxes, that could
technically change style. I've left a note about it too.

MozReview-Commit-ID: 2lvzhxugKB0

--HG--
extra : rebase_source : 38cf56811f73f5a9f0f6659e08d03e78d4c6dcb5
2017-03-11 00:25:37 +01:00
Cameron McCormack e309269346 Bug 1291786 - stylo: Move eRestyle_Subtree translation handling to Servo. r=bholley
MozReview-Commit-ID: LHTJzImnj6h

--HG--
extra : rebase_source : 1c3f9f7dd729a129f02ed3d803e25119bb653dc0
2017-03-10 17:54:19 +08:00
Hiroyuki Ikezoe 843466ec0d Bug 1341985 - Trigger the second traversal for updating CSS animations. r=birtles,heycam
The restyle request during restyling is a result of creating/updating/removing
CSS animations that will come from a SequentialTask which will be implemented
in a subsequent patch.

MozReview-Commit-ID: JoAqvcN3y51

--HG--
extra : rebase_source : fdff59771b81518509dfd52e73d3f63ddb82390d
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe 11c8680e9d Bug 1344619 - Part 7: Drop EffectCompositor::ClearElementsToRestyle. r=birtles
MozReview-Commit-ID: DlTj2OR0wI0

--HG--
extra : rebase_source : 33307226315e6fb3facb000214e27d5582279dd6
2017-03-09 05:20:17 +09:00
Bobby Holley 09bc17720b Bug 1344386 - Don't look for overlapping change hints in stylo documents. r=emilio
MozReview-Commit-ID: 9wK8TTXolPM
2017-03-07 13:14:32 -08:00
Bobby Holley fa5229bbea Bug 1338921 - Handle lazy frame construction in the regular post-servo pass. r=emilio
MozReview-Commit-ID: FSXKAiyZDzt
2017-03-03 14:55:22 -08:00
Boris Zbarsky e5e572124c Bug 1337696. Fix change hint computation for table-outer frames to be more correct. r=emilio
MozReview-Commit-ID: LgRmTlWsM6o

--HG--
extra : rebase_source : dc18a9ca923eedbb2aaba80d515c70bd80a90d4e
2017-03-03 15:54:47 -05:00