Commit Graph

237 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
3d68f92114 Bug 1381431 - Allow that restyle hints other than animation hints remain for flushing throttle animations. r=emilio
MozReview-Commit-ID: GMkgvaK0mAu
2017-07-18 20:56:15 +09:00
Manish Goregaokar
df853f68c9 Bug 1367904 - Part 17: stylo: Clean up GetContext, call it UpdateWithElementState; r=bholley
MozReview-Commit-ID: I23w5hFatk8
2017-07-17 21:01:33 -07:00
Manish Goregaokar
63c907be23 Bug 1367904 - Part 11: stylo: Use ServoStyleContext in ServoStyleSet/ServoRestyleManager; r=bholley
MozReview-Commit-ID: JJOBixTSCZq
2017-07-17 21:00:54 -07:00
Manish Goregaokar
86e90da5c3 Bug 1367904 - Part 10: stylo: Switch Gecko over to ServoStyleContext; r=bholley
MozReview-Commit-ID: EmopKVjEzlz
2017-07-17 21:00:46 -07:00
Manish Goregaokar
a0cec6421f Bug 1367904 - Part 5: stylo: Make GetBaseComputedValuesForElement return a style context; r=bholley
MozReview-Commit-ID: K5WpWc26xNZ
2017-07-17 21:00:32 -07:00
Hiroyuki Ikezoe
b9836375ec Bug 1371450 - Rename TraversalRestyleBehavior::ForAnimationOnly to TraversalRestyleBehavior::ForThrottledAnimationFlush. r=birtles,emilio
ForAnimationOnly is somewhat misleading, it means actually we process
*only* animation-only restyle without normal restyle. The purpose of
ForAnimationOnly is for updating throttled animations to get correct position
of the animations when we need to handle events. Currently we do also update
unthrottled animations though.

MozReview-Commit-ID: HBCCluKrZs9
2017-07-15 13:08:47 +09:00
Cameron McCormack
204525bf4b 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-07 13:35:28 +08:00
Carsten "Tomcat" Book
1dcab108c9 Backed out changeset 6bfb66a2c03e (bug 1376964) 2017-07-12 12:41:35 +02:00
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
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
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
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
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
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
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
Ting-Yu Lin
c08cc55c65 Bug 1290276 Part 4 - Make ServoStyleSet::RawSet() return a pointer. r=heycam
In next part, we'll use ServoStyleSet to host XBL stylesheets. The raw set
is not available until the resources are loaded, so it's easier to tell that
by checking whether the pointer is nullptr or not.

MozReview-Commit-ID: Hqydd55FPO9
2017-06-05 11:57:13 +08: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
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
Emilio Cobos Álvarez
f8a30f11ac Bug 1367553: Provide the kind of change that the stylesheet suffered to RecordStyleSheetChange. r=heycam
I plan to use it for now to force a full document restyle when a standalone rule
changes or something like that.

In practice, we can do better sometimes, and we may just want to propagate to
the StyleSet all the style change notifications in order to have access to the
rule that changed and all that...

But for now this seemed easier than adding other four or five functions to
StyleSetHandle.

MozReview-Commit-ID: 2BEIliGu4mO
2017-05-24 04:28:58 +02: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
Phil Ringnalda
3864eaed9a Backed out 2 changesets (bug 1367553) for build bustage
CLOSED TREE

Backed out changeset 3e6c9a752596 (bug 1367553)
Backed out changeset 1ee24478fa16 (bug 1367553)

MozReview-Commit-ID: B805jBJYcqL
2017-05-25 06:13:01 -07:00
Emilio Cobos Álvarez
84f97fc8cb Bug 1367553: Provide the kind of change that the stylesheet suffered to RecordStyleSheetChange. r=heycam
I plan to use it for now to force a full document restyle when a standalone rule
changes or something like that.

In practice, we can do better sometimes, and we may just want to propagate to
the StyleSet all the style change notifications in order to have access to the
rule that changed and all that...

But for now this seemed easier than adding other four or five functions to
StyleSetHandle.

MozReview-Commit-ID: 2BEIliGu4mO
2017-05-24 04:28:58 +02:00
Emilio Cobos Álvarez
4e79a99600 Bug 1367553: Move dirty style tracking to the StyleSet. r=heycam
MozReview-Commit-ID: 2ut8SAwNGN2
2017-05-24 02:53:08 +02:00
Cameron McCormack
7128db143e Bug 1366157 - stylo: Implement getDefaultComputedStyle. r=emilio
MozReview-Commit-ID: GKr06ylK4tA
2017-05-24 14:37:47 +08:00
Brad Werth
84b701f39e Bug 1339629 Part 9: Uplift EnsureUniqueInnerOnCSSSheets and SetNeedsRestyleAfterEnsureUniqueInner into StyleSetHandle, and eliminate CSSStyleSheet::EnsureUniqueInner. r=heycam
MozReview-Commit-ID: LH7vTKUmuv8
2017-05-15 16:30:10 -07:00
Brad Werth
d5d552db30 Bug 1339629 Part 8: Uplift ClearRuleCascades into StyleSheet. r=heycam
MozReview-Commit-ID: CCYIYjWrw86
2017-05-18 14:21:11 -07:00