Commit Graph

405 Commits

Author SHA1 Message Date
Brad Werth
9a6acfc3f1 Bug 1363572 Part 2: Change ServoStyleSet to use uint64_t for entry unique IDs. r=heycam
MozReview-Commit-ID: 50whQ71j4B5
2017-05-10 11:20:57 -07:00
Ryan VanderMeulen
adc0a8eaec Backed out changesets 72fe8375faa0 and 5f55c10a0a72 (bug 1352306) for ElementInlines.h assertions.
CLOSED TREE
2017-05-12 12:58:05 -04:00
Cameron McCormack
3278a8497b 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
dada34d927 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
Boris Zbarsky
f2703f662f Bug 1361843 part 4. Remove the now-unused mBatching member of ServoStyleSet. r=emilio
MozReview-Commit-ID: DvyZkQh6q8A
2017-05-10 13:13:50 -04:00
Boris Zbarsky
22e387d682 Bug 1361843 part 3. Clear the stylist when styleshets change, but don't do anything else until there's an explicit sheet flush. r=emilio
MozReview-Commit-ID: IhK1ECeuYbM
2017-05-10 13:13:45 -04:00
Boris Zbarsky
abab8246f8 Bug 1361843 part 2. Track whether the stylist may need a rebuild in ServoStyleSet and do on-demand rebuilds as needed. r=emilio
This does not remove the eager rebuilds we're doing yet.

I'm not completely happy with the ad-hoc manner in which we end up doing
rebuilds.  I considered doing something where we'd make stylist a non-public
member of PerDocumentStyleDataImpl and have a getter that updates the stylist on
get, with maybe a separate non-flushing getter for special situations, if those
arise.  But that requires that we make various cases where we currently have a
non-mut PerDocumentStyleDataImpl use a mut one.  Maybe that would be the right
tradeoff...

I'm also not sure whether the naming is right here.  Maybe we should just talk
about needing a stylesheet flush, not a stylist rebuild, in ServoStyleSet?

MozReview-Commit-ID: 9C7BG5ygm79
2017-05-10 13:13:39 -04:00
Emilio Cobos Álvarez
c4f847ffaa 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
2017-05-07 16:36:47 +02:00
Matt Brubeck
4eebd81661 Bug 1349651 - stylo: Implement HasAuthorSpecifiedRules. r=bholley
MozReview-Commit-ID: 8ta5KqKzncZ
2017-05-10 13:11:36 -07:00
Cameron McCormack
2c95e462e3 Bug 1356103 - Part 4: Add a mechanism for C++ functions to perform post-Servo traversal tasks. r=bholley
MozReview-Commit-ID: 5Gx1qZzQxAK
2017-04-30 14:45:32 +08:00
Cameron McCormack
ff89dc775e Bug 1356103 - Part 3: Make it easy to access the ServoStyleSet currently in traversal. r=bholley
In a later patch, we'll want to queue up some tasks to run when the
Servo traversal is one, and the ServoStyleSet seems like the natural
place to store those tasks.  We could probably find the ServoStyleSet
by chasing a bunch of pointers from the task-adding call sites, but
it seems simpler just to make it available directly.

MozReview-Commit-ID: AJoFZEoNaGm
2017-04-30 14:41:11 +08:00
Iris Hsiao
b5dd6e2208 Backed out 12 changesets (bug 1356103) for build bustage at PostTraversalTask.h
Backed out changeset 9fb487252c28 (bug 1356103)
Backed out changeset 301237c65945 (bug 1356103)
Backed out changeset 7bc3a4861a39 (bug 1356103)
Backed out changeset 2f383d89184b (bug 1356103)
Backed out changeset a03112e1c9d5 (bug 1356103)
Backed out changeset c60b4c9cbd83 (bug 1356103)
Backed out changeset 34280baeaabe (bug 1356103)
Backed out changeset 31a0881cfb47 (bug 1356103)
Backed out changeset 529d037f9c33 (bug 1356103)
Backed out changeset 1c7831db6b07 (bug 1356103)
Backed out changeset 559f06e32df3 (bug 1356103)
Backed out changeset 784865d234cd (bug 1356103)
2017-05-04 17:56:25 +08:00
Cameron McCormack
91f9f517c8 Bug 1356103 - Part 4: Add a mechanism for C++ functions to perform post-Servo traversal tasks. r=bholley
MozReview-Commit-ID: 5Gx1qZzQxAK
2017-04-30 14:45:32 +08:00
Cameron McCormack
5ab9a5f7ab Bug 1356103 - Part 3: Make it easy to access the ServoStyleSet currently in traversal. r=bholley
In a later patch, we'll want to queue up some tasks to run when the
Servo traversal is one, and the ServoStyleSet seems like the natural
place to store those tasks.  We could probably find the ServoStyleSet
by chasing a bunch of pointers from the task-adding call sites, but
it seems simpler just to make it available directly.

MozReview-Commit-ID: AJoFZEoNaGm
2017-04-30 14:41:11 +08:00
Boris Chiou
f3f76c3cc6 Bug 1346052 - Part 3: Implement AnimationValue::FromString. r=birtles
AnimationValue::FromString compute the AnimationValue from a string.

MozReview-Commit-ID: CX8wairpnfN
2017-05-03 11:15:27 +08:00
Brad Werth
f568bc451b Bug 1348481 Part 3: Fix a dangerous typo in StyleSetHandleInlines (replaced one variable with another) and add assert to catch the problem it created. r=heycam
MozReview-Commit-ID: L2tfMt7TM60
2017-04-18 11:29:13 -07:00
Brad Werth
6c3c7a46ad Bug 1348481 Part 2: Gecko-side track unique IDs for each stylesheet and send them to Servo. r=heycam
MozReview-Commit-ID: 7ZaQYhjdYmG
2017-05-01 16:46:41 -07:00
Cameron McCormack
27bda60595 Bug 1344914 - stylo: Stop pretending to handle style fixups on the C++ side. r=bz
MozReview-Commit-ID: FBM2NOlXIe5
2017-04-25 12:52:51 +08:00
Cameron McCormack
072c4c2c15 Bug 1358968 - Part 2: Use nsCSSAnonBoxList.h data to skip parent display-based style fixups when resolving anon box style. r=bz
MozReview-Commit-ID: HugxFcRcCqv
2017-04-24 16:25:37 +08:00
Emilio Cobos Álvarez
c280ee2acd Bug 1360508: Adjust text-combine properly. r=jryans
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>
2017-04-28 20:18:00 +02:00
Emilio Cobos Álvarez
d257e85835 Bug 1331047: Look at the style with animations in ResolveStyleLazily. r=hiro
MozReview-Commit-ID: 1p4D5p0jymb
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-27 17:06:30 +02:00
Emilio Cobos Álvarez
5cff30131d 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
bd34f5af7c Bug 1336863: Flush stylesheets in RestyleForCSSRuleChanges if not under an update. r=heycam
This also moves the NoteStyleSheetsChanged to RecordStylesheetChange, which
makes more sense, and stopped special-casing author styles, since it's not
needed now.

MozReview-Commit-ID: 9WKFa0JxqlU
2017-04-25 21:03:18 +02:00
Brian Birtles
6f31f71d47 Bug 1355348 - Move ServoComputedValuesWithParent to separate file; r=hiro
We will use this type later in this patch series in nsSMILCSSProperty so this
patch moves it to a separate file so it can be re-used.

MozReview-Commit-ID: 4Z7YbsQ9xz4
2017-04-26 13:00:11 +09:00
Brian Birtles
babb0b8e0f Bug 1355348 - Add SMIL restyles in the stylo pretraverse; r=heycam
MozReview-Commit-ID: mwjkKr6wsr
2017-04-26 13:00:11 +09:00
Manish Goregaokar
59c91e3b16 Bug 1356305 - stylo: Initialize system metrics before traversing; r=bholley
MozReview-Commit-ID: IOeT4qSHTy5
2017-04-14 09:28:25 +08:00
Boris Chiou
8e97c6a574 Bug 1341372 - Part 1: Let animation-only restyle include css-transition. r=heycam,hiro
Animation-only restyle should include both Animation and Transition
cascade levels.

MozReview-Commit-ID: Jo1sb5fGUC0
2017-04-17 14:22:28 +08:00
Hiroyuki Ikezoe
b0b912ac2c Bug 1324700 - Add an FFI which returns computed values for a given declaration block with/without parent_style. r=heycam
The function uses document's default computed values if the parent style
is not specified.

MozReview-Commit-ID: ICd3phAi0C6
2017-04-15 07:37:35 +09:00
Hiroyuki Ikezoe
de5ee3a9e0 Bug 1324700 - Add ResolveServoTransientStyle to get servo's computed values instead of nsStyleContext. r=heycam
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
2017-04-15 07:37:34 +09:00
Hiroyuki Ikezoe
0803055b86 Bug 1324700 - Call PreTraverseSync() before calling ResolveStyleLazily() in ResolveTransientStyle(). r=heycam
MozReview-Commit-ID: 5KMELNYZJnq
2017-04-15 07:37:34 +09:00
Brad Werth
3502e99f42 Bug 1341721 Part 2a: Add a bool argument to Servo_StyleSet_NoteStyleSheetsChanged. r=heycam
MozReview-Commit-ID: 1CLnJ87fPF1
2017-04-11 15:59:44 +08:00
Brad Werth
8067c910a4 Bug 1341721 Part 1: ServoStyleSet implementation of SetAuthorStyleDisabled. r=heycam
MozReview-Commit-ID: Bd0TJDfcj94
2017-04-11 15:43:14 +08:00
Cameron McCormack
30e9f3659f Bug 1345695 - stylo: Assert that we have computed style in Servo_ResolveStyle when lazy computation is forbidden. r=bholley
MozReview-Commit-ID: Bul00XOpfxA
2017-04-12 10:05:26 +08:00
Gregory Szorc
f3a828460f Backed out changeset f00f1ad996f7 (bug 1345695) for touching servo/
Autoland should have prevented this. A bug is on file so it hopefully
won't happen again.

MozReview-Commit-ID: 1tN1lAyTLyE
2017-04-11 09:36:48 -07:00
Cameron McCormack
36659f5c55 Bug 1345695 - stylo: Assert that we have computed style in Servo_ResolveStyle when lazy computation is forbidden. r=bholley
MozReview-Commit-ID: Bul00XOpfxA
2017-03-30 12:54:25 +08:00
Wes Kocher
2d64f649cd Merge inbound to central, a=merge 2017-04-10 16:32:45 -07:00
Manish Goregaokar
93f8302fde Bug 1341724 - Part 4: stylo: Make font metrics usage threadsafe; r=heycam
MozReview-Commit-ID: 3EqpUy09UuI
2017-04-10 17:06:19 +08:00
Cameron McCormack
7fbce911f8 Bug 1351286 - stylo: Make Servo mapped attributes mechanism cope with the document being in the bfcache. r=dbaron
MozReview-Commit-ID: H8tpBVKf3xo
2017-04-08 22:42:43 +08:00
Cameron McCormack
5096ed733a Bug 1351535 - Part 6: Add ServoStyleSet::StyleSubtreeForReconstruct. r=bholley
MozReview-Commit-ID: CovU36o4lAV
2017-04-04 19:34:30 +08:00
Cameron McCormack
eacc6e8099 Bug 1351535 - Part 4: Add a TraversalRestyleBehavior argument to traversal functions. r=bholley
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
2017-04-08 22:57:08 +08:00
Nicholas Nethercote
d1e195a649 Bug 1353948 - Add SizeOfIncludingThis() methods to ServoStyle{Set,Sheet,SheetInner}. r=heycam.
This fills things in a bit more on the Gecko side.
2017-04-06 12:22:36 +10:00
Hiroyuki Ikezoe
79fd16dee6 Bug 1311257 - Add a function that returns a base computed values (i.e. computed values without any animations rules). r=heycam
This base value will be used for additive, accumulative animations
and also SMIL.

MozReview-Commit-ID: LHV8ZnxSzjb
2017-04-06 10:34:50 +09:00
Manish Goregaokar
57d32834b4 Bug 1341714 - Part 2: stylo: Add support for <table> color quirk ; r=heycam
MozReview-Commit-ID: 56IKARwfbhw
2017-03-26 13:53:34 -07:00
Xidorn Quan
53ee36eabe Bug 1345696 part 7 - Provide @font-face rules for stylo backend. r=heycam
MozReview-Commit-ID: CHPxz7iOLg6
2017-03-27 17:53:27 +11:00
Cameron McCormack
480359bef9 Bug 1350671 - stylo: Allow resolving out of date styles when explicitly reconstructing frames for an element. r=bholley
MozReview-Commit-ID: 7w9pehHNXQ
2017-03-28 15:31:41 +08:00
Iris Hsiao
c919df1249 Backed out changeset 6e4ccddb5c4b (bug 1350671) for build bustage 2017-03-28 15:23:59 +08:00
Cameron McCormack
943b935a6e Bug 1350671 - stylo: Allow resolving out of date styles when explicitly reconstructing frames for an element. r=bholley
MozReview-Commit-ID: A7ssy7ygWLh
2017-03-28 13:46:59 +08:00
Bobby Holley
aacbfde69f 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
Manish Goregaokar
de1687e9f8 Bug 1341086 - Part 2: stylo: Support all non-ts pseudos with an argument; r=emilio,heycam
MozReview-Commit-ID: IHjX2Q3k8eD
2017-03-16 14:10:22 -07:00
Boris Chiou
51b2cebdaa Bug 1349124 - Replace ServoComputedStyleValues with ServoComputedValuesWithParent. r=hiro
MozReview-Commit-ID: 5POa8DRjmc8
2017-03-21 15:41:23 +08:00