Commit Graph

325 Commits

Author SHA1 Message Date
Cameron McCormack
537eefd98b Bug 1376964 - Part 4: Call FontLoadAllowed ahead of time and cache the results for style worker threads. r=jfkthame
Handling a document's node principal changing is done in part 9.

MozReview-Commit-ID: 1gPtRpddys5
2017-07-12 16:35:46 +08:00
Emilio Cobos Álvarez
2ec93aa1e1 Bug 1379505: Allow calling GetBaseComputedStylesForElement for an unstyled element. r=boris
Before this refactoring, getComputedStyle could have side effects, and left the
style data in the element, so we could never arrive there without data.

There are a few crashtests that caught this, but this was already broken if you
called animate() on an element deep in a display: none subtree.

MozReview-Commit-ID: 1AvOvhAyOP3
2017-07-10 13:33:21 +02:00
Carsten "Tomcat" Book
718f42ee0d Backed out changeset 20866468f52d (bug 1376964) 2017-07-12 10:32:20 +02:00
Carsten "Tomcat" Book
5abe24a914 Backed out changeset b7424dfa039c (bug 1376964) 2017-07-12 10:32:11 +02:00
Cameron McCormack
7d64df7f20 Bug 1376964 - Part 9: Use gfxFontSrcPrincipal in the user font set and cache. r=jfkthame
MozReview-Commit-ID: LRRFbkhbgts
2017-07-12 13:03:35 +08:00
Cameron McCormack
fa3b1cf3ca Bug 1376964 - Part 4: Call FontLoadAllowed ahead of time and cache the results for style worker threads. r=jfkthame
Handling a document's node principal changing is done in part 9.

MozReview-Commit-ID: 1gPtRpddys5
2017-07-12 13:03:35 +08:00
Hiroyuki Ikezoe
fe09ff65ac Bug 1379529 - drop AllowResolveStaleStyles flag. r=emilio
It's no longer used since bug 1357142.

MozReview-Commit-ID: LqNQTux2OZl
2017-07-11 07:51:34 +09:00
Hiroyuki Ikezoe
1ef73f827c Bug 1360398 - Do not fill computed values in missing keyframes for CSS animations during generating Keyframes. r=birtles
MozReview-Commit-ID: C2dYneoB09g
2017-07-10 17:19:23 +09:00
Wes Kocher
8cbe4b5d79 Backed out changeset f220d8060c14 (bug 1352669) for build bustage CLOSED TREE a=bustage
MozReview-Commit-ID: INYGT4WT1pO
2017-07-06 14:56:06 -07:00
Josh Matthews
6416600b5e Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter.
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-06 13:15:08 -07:00
J. Ryan Stinnett
492af0b172 Bug 1371457 - Add restyle markers for Stylo. r=bholley,gregtatum
Add restyle markers to `PrepareAndTraverseSubtree` to cover both initial styling
and part of the work of restyling.  Also add restyle markers around the post
traversal work in `DoProcessPendingRestyles`.

A new marker is also added around the change hint processing after the post
traversal.

MozReview-Commit-ID: 43PSyCJLikR
2017-06-28 12:03:18 -07:00
Emilio Cobos Álvarez
2bbfd6efff Bug 1378190: Try to make ServoRestyleManager easier to follow. r=heycam
MozReview-Commit-ID: B9bw23n2jUe
2017-07-04 19:16:04 +02:00
Bobby Holley
15c2c950db Bug 1378005 - Stop synchronously clearing serving data on style set teardown. r=emilio
MozReview-Commit-ID: 3B2qV84peCv
2017-07-04 15:02:18 -07:00
Emilio Cobos Álvarez
6941d33a8e Bug 1372041: Refactor a bunch of stuff so link rel="media" is honored. r=heycam
This still leaves one annoying refactoring of @import so we also fix it for
them.

MozReview-Commit-ID: 4s0WExDEH75
2017-07-02 17:19:07 +02:00
Ting-Yu Lin
ceb27796f7 Bug 1377196 Part 2 - Add AppendAllXBLStyleSheets to ServoStyleSet. r=heycam
MozReview-Commit-ID: HSQnBk8djil
2017-06-29 16:09:22 -07:00
Ting-Yu Lin
6b1d1d9b71 Bug 1377196 Part 1 - Store nsBindingManager* in ServoStyleSet. r=heycam
We need to call nsBindingManager's method from ServoStyleSet in a later
patch.

Also, we call nsStyleSet::SetBindingManager() immediately after we call
nsStyleSet::Init(). Therefore, we could pass binding manager to Init()
directly, and delete SetBindingManager().

MozReview-Commit-ID: 43WTpW3mSKX
2017-06-29 13:43:59 -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
0bb4f2f9ec Bug 1376655 - Use ServoStyleContext in more places. r=emilio 2017-06-28 10:08:36 -07:00
Boris Zbarsky
862a593835 Bug 1324618 part 10. Fix style resolution for pseudo-elements to actually pass through the right parent style. r=emilio
MozReview-Commit-ID: 1UVJj9l0tKi
2017-06-26 23:35:09 -07:00
Carsten "Tomcat" Book
c0df029c53 Backed out changeset a33ae6fa707d (bug 1324618) 2017-06-27 10:39:36 +02:00
Boris Zbarsky
45eed99d99 Bug 1324618 part 10. Fix style resolution for pseudo-elements to actually pass through the right parent style. r=emilio
MozReview-Commit-ID: 1UVJj9l0tKi
2017-06-26 23:35:09 -07:00
Emilio Cobos Álvarez
a0e2e119c3 Bug 1376077: Remove aPseudoElement argument from the StyleSet classes. r=heycam
MozReview-Commit-ID: InxDtd5Pmf3
2017-06-24 11:25:05 +02:00
Brad Werth
8abb58fab4 Bug 1373193 Part 2: Create and call a new UpdateStyleSheet method on ServoStyleSet when a ServoStyleSheet has its inner cloned. r=xidorn
MozReview-Commit-ID: GKxnEiZvziS
2017-06-19 10:47:13 -07:00
Cameron McCormack
bfb8c04b71 Bug 1373874 - stylo: Clear Servo data from NAC created by position:fixed replicated frames too. r=bz
We don't need the call to ClearServoDataFromSubtree in
nsDocumentViewer::SetPageMode because the pres shell destruction
will call BeginShutdown on the style set, which will do it for us.

MozReview-Commit-ID: ErSAyr3l0wm
2017-06-18 17:57:55 +08:00
Xidorn Quan
d7fcde119b Bug 1359217 part 6 - Add ServoStyleRuleMap to handle style rule mapping. r=heycam
This commit adds class ServoStyleRuleMap which caches the mapping from
raw Servo style rule to Gecko's wrapper object.

It is a per-document object, and is added as an observer of document
when constructed, so that it updates data inside when possible.

For safety consideration, this change also makes ServoStyleRule support
weak pointer, and use weak pointer inside ServoStyleRuleMap.

MozReview-Commit-ID: YxBnZ88tjf
2017-06-19 15:45:43 +10: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
Manish Goregaokar
533734efc7 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA
2017-06-10 22:27:45 -07:00
Xidorn Quan
850fec5ca4 Bug 1372757 - Remove several dependencies to ServoBindings.h. r=heycam
MozReview-Commit-ID: Lruin1acS19
2017-06-14 09:38:16 +10:00
Cameron McCormack
14cf0d858c Bug 1370793 - Followup bustage fix. r=me 2017-06-13 11:51:15 +08:00
Cameron McCormack
a3d60562f0 Bug 1370793 - Part 1: Don't try to style unstyled children of elements with newly applied XBL bindings if in a display:none or unstyled subtree. r=bholley
MozReview-Commit-ID: EFi2Vp19AQm
2017-06-11 19:11:08 +08:00
Nazım Can Altınova
c22e06c6a2 Bug 1355724 - stylo: Fix propagation of quirks mode information to servo side r=emilio
It was getting inial value from gecko side before and that was always
eCompatibility_NavQuirks. Created an FFI to fetch quirks mode.

MozReview-Commit-ID: 1lXsM9hwldZ
2017-06-10 17:22:23 +03:00
Hiroyuki Ikezoe
e51e0ef7a0 Bug 1358966 - Use Servo_GetAnimationValues. r=birtles
MozReview-Commit-ID: 7ag2IFUViDX
2017-06-09 06:19:37 +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
Emilio Cobos Álvarez
d352758f8f Bug 1357461: Cache effective media query results. r=heycam
And implement a function that returns whether they changed, to be shared with
Servo.

MozReview-Commit-ID: 8gnAdJaEfZC
2017-06-03 18:59:07 +02:00
Hiroyuki Ikezoe
11db326869 Bug 1367293 - Don't get parent style for GetComputedKeyframeValuesFor. r=birtles
MozReview-Commit-ID: 7WjsO7P2QGz
2017-06-02 09:38:54 +09:00
Hiroyuki Ikezoe
4c498515cd Bug 1367293 - Don't get parent style for ComputeAnimationValue. r=birtles
MozReview-Commit-ID: 4TskjmoKchD
2017-06-02 09:38:46 +09:00
Hiroyuki Ikezoe
1eced9b23b Bug 1367293 - Get parent style from the target element. r=birtles
We can get the parent style from element tree in servo side.
The parent style has been already restyled.
E.g.;
 When we get target element style with nsComputedDOMStyle::GetStyleContext,
 the function flushes styles so that the parent style has also
 restyled.

 When we call Servo_GetComputedKeyframeValues, it's called from a
 SequentialTask, that means all elements have been already restyled.

Unfortunately we can't assert that the parent style is not stale
to check the parent element has no dirty descendant bit since
Servo_GetComputedKeyframeValues is called in a SequantialTask
that is processed before post traversal, that means elements
still have the dirty bit to update nsStyleContext in the
post traversal.

MozReview-Commit-ID: AC2ZRyzk3eu
2017-06-02 09:38:22 +09:00
Emilio Cobos Álvarez
65423fd88b Bug 1368589: handle the case where a RebuildAllStyleData event is posted and stylesheets are added at the same time. r=heycam
MozReview-Commit-ID: IWiTCCo55cg
2017-05-30 02:46:33 +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
Emilio Cobos Álvarez
e7785ec381 Bug 1357583: style: Hook up the invalidator in the StyleSheetSet. r=heycam
MozReview-Commit-ID: IhgKAovTJMX
2017-05-29 23:01:43 +02:00
Emilio Cobos Álvarez
fb442d9711 Bug 1357583: Ensure we send the document element to Servo when flushing stylesheets. r=heycam
We'll use it to invalidate stuff.

MozReview-Commit-ID: Il3wO5JQh1Y
2017-05-29 23:01:37 +02:00
Cameron McCormack
5e1a69a21d Bug 1366921 - stylo: Update user fonts in cached font metrics' gfxFontGroups in the pre-traversal step. r=bholley,jfkthame
MozReview-Commit-ID: DAhhWyAjxku
2017-05-26 22:29:10 +08:00
J. Ryan Stinnett
feb0ddcc55 Bug 1328509 - Wire up visited values in ServoStyleSet::GetContext. r=emilio
Create an extra style context using the visited values (if they exist).  This
mirrors the logic Gecko performs in nsStyleSet::GetContext for visited support.

MozReview-Commit-ID: EiJQXDgz8tX
2017-05-25 10:13:23 -05:00
Emilio Cobos Álvarez
3dd88e000f Bug 1367553: Move dirty style tracking to the StyleSet. r=heycam
MozReview-Commit-ID: 2ut8SAwNGN2
2017-05-24 02:53:08 +02:00