Commit Graph

1378 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
653e15ba32 Bug 1403433 - Add another variant of SchedulePaint that does not call InvalidateRenderingObservers for PendingAnimationTracker. r=birtles
nsFrame::SchedulePaint() invokes InvalidateRenderingObservers, and
InvalidateRenderingObservers ends up posting change hints during we are
processing sequential tasks for animations, but we don't allow posting any
change hints while we are in the middle of restyling process.

Though the change hints posted by InvalidateRenderingObservers are not harmful
in this case since the change hints will be processed in a second post
traversal without problems.  That's said, InvalidateRenderingObservers stuff
should be processed in display list based invalidation anyway (bug 1284053).

MozReview-Commit-ID: GKVRZ98lvEN
2017-09-29 19:42:13 +09:00
Hiroyuki Ikezoe
9e9a01fd49 Bug 1402219 - Compute css variables with custom properties in keyframes for getKeyframes(). r=birtles
MozReview-Commit-ID: 7CMnWbzzemY

--HG--
extra : rebase_source : 977a2d4af632beef45906cb0eb1077fc48ccd4ed
2017-09-27 16:49:21 +09:00
Hiroyuki Ikezoe
56e08ccc96 Bug 1402219 - Check the length of returned keyframes of getKeyframes(). r=birtles
Otherwise, if getKeyframes() returns an empty array, we don't check each keyframes
at all.

MozReview-Commit-ID: LSBIgetZq2G

--HG--
extra : rebase_source : cc24d093a1e0c9223ac696e44d297602016189a2
2017-09-27 12:46:03 +09:00
Wei-Cheng Pan
f3f406f76b Bug 1363805 - Part 3: Do lazy flushing if possible. r=heycam
Skips flushing current document if the target of getComputedDOMStyle cannot be
affected by any pending restyles.

MozReview-Commit-ID: C87HDIDvOth

--HG--
extra : rebase_source : 064880493f9aac2599689cdd0749200bb579c60b
2017-05-23 12:02:11 +08:00
Hiroyuki Ikezoe
933ef2c9ba Bug 1401809 - Use Atom::from(nsIAtom) to increment reference count in case of dynamic atom for will-change. r=xidorn
If we don't increment the reference count for the Atom in servo side, it's
possible to try to release the Atom in servo side even if we have already
released in gecko side.  When it happens, nsIAtom::mKind is no longer reliable.

MozReview-Commit-ID: GrxbcYxowRB

--HG--
extra : rebase_source : 94e054e3357b31e398e8e5e81522dab3019c561c
2017-09-21 15:50:37 +09:00
Brian Birtles
3b5522acdc Bug 1314537 - Drop comment reference to SharedKeyframeList; r=comment-only, DONTBUILD
This has been dropped from the spec in:

  17b14a7269

--HG--
extra : rebase_source : f0c824c5bd5bec7aefbc742830520a3a210468ef
2017-09-20 11:56:00 +09:00
Hiroyuki Ikezoe
121662e3ab Bug 1400022 - Crash test. r=hiro
MozReview-Commit-ID: 6voy0F9GwbC

--HG--
extra : rebase_source : 3a93c8ae1b88eab6cbfd4bc67f3e450080da1742
2017-09-19 13:58:31 +09:00
Hiroyuki Ikezoe
e077bd95a1 Bug 1400022 - Backed out changeset 610fbd30a6a3 (bug 1397057). r=mattwoodrow
The SchedulePaint() ends up calling
nsSVGEffects::InvalidateDirectRenderingObservers, it doesn't need for retained
display list, and causes harmful restyle events for stylo.

We will call ScheulePaint without involing InvalidateDirectRenderingObservers
later in another bug.

MozReview-Commit-ID: 10V9JLHZmCs

--HG--
extra : rebase_source : 664718eb91e973a4619847e4bfa94327e410f364
2017-09-19 11:14:48 +09:00
Boris Chiou
7d37ae2816 Bug 1388601 - Part 2: Add tests of distance for Filter lists. r=hiro
MozReview-Commit-ID: 1asVvBnV93r

--HG--
extra : rebase_source : 72fe8c006970f8b002b63df982a6f54f773fc6fb
2017-09-14 15:21:47 +08:00
Boris Chiou
f5d25a9abd Bug 1388601 - Part 1: Add tests of distance for Basic Shape. r=hiro
MozReview-Commit-ID: 8m5km7hVNvR

--HG--
extra : rebase_source : 513747aadf699fdd827d241d2caef072b5f6742b
2017-09-14 11:25:16 +08:00
Hiroyuki Ikezoe
37c05393f5 Bug 1398661 - Convert target element to the parent if the target element is pseudo in EffectCompositor::PreTraverseInSubtree/PreTraverse. r=emilio
MozReview-Commit-ID: Dl2gvkLpo4k

--HG--
extra : rebase_source : a741b8d1e10e111ab8255e50a56ad11041fe39f9
2017-09-14 06:22:40 +09:00
Boris Chiou
19ef8ca18f Bug 1392161 - Part 2: Update test expectation. r=xidorn
MozReview-Commit-ID: lURbKrREBp

--HG--
extra : rebase_source : 401a346acc551218d082ce47db4c89e984cb3f7f
2017-09-01 15:33:32 +08:00
Matt Woodrow
a33c79d3b5 Bug 1397057 - Invalidate frames whenever we toggle an animation on the corresponding Element. r=birtles
MozReview-Commit-ID: GPGaRU9HxY6

--HG--
extra : rebase_source : 9029c46b539acec5206d8e32fad9fbf36e7ee51c
2017-09-12 14:13:10 -04:00
Hiroyuki Ikezoe
c30d8acb21 Bug 1334582 - Check whether overall progress exceeds UINT64_MAX. r=boris
The overall progress is factored in iteration start, so even if
TimingParams.mIterations is less than UINT64_MAX, it will exceed UINT64_MAX.

MozReview-Commit-ID: CEOYAGsCoIE

--HG--
extra : rebase_source : 54ed450ebd0218ee2cac9f27125601c6575ee1a5
2017-09-12 08:42:54 +09:00
Hiroyuki Ikezoe
b46966f3e8 Bug 1334582 - Use UINT64_MAX instead of IsInfinite() for checking whether TimingParans.mIterations is infinite or not. r=boris
Because our ComputedTiming.mCurrentIteration is uint64_t.

MozReview-Commit-ID: FjbhEvTUMr4

--HG--
extra : rebase_source : d8ba72c914aac6661f0a5a21885505f94844ce38
2017-09-12 08:42:45 +09:00
Hiroyuki Ikezoe
eb4460d339 Bug 1397127 - Rewrite a test with async/await. r=birtles
MozReview-Commit-ID: Jdh4G022Gzd

--HG--
extra : rebase_source : d7359d344277ba8109c813a07fbe29b640789a21
2017-09-06 13:51:18 +09:00
Hiroyuki Ikezoe
84aff91995 Bug 1336772 - Request any restyles required by changes to the cascade result. r=birtles
When an animation is newly created while the same property transition is
running, the transition style rule persists until we call RequestRestyle() for
transitions level. That means if user calls getComputedStyle for the property
right after creating animation, the style obtained by getComputedStyle still
included the transitions level rule. As a result, the transitions level style
overrides newly created animation style until the next normal restyling process
happens (i.e. process transition level restyle request). Vice versa, in the
case where an animation is removed, transitions level style does not appear
until the next normal restyling.

This patch fixes this problem by trigerring a resyle of the transitions level
when an animation is created or removed.

MozReview-Commit-ID: HY6amLmDHTi

--HG--
extra : rebase_source : 67e58dc9a6c695299c3eef684bf7357153c5168b
2017-09-05 16:34:24 +09:00
Emilio Cobos Álvarez
bf24bd8bc9 Bug 1395351: Use the style flattened tree in EffectCompositor::PreTraverseInSubtree. r=bholley
MozReview-Commit-ID: ATVxx8EXJWY

--HG--
extra : rebase_source : 8652e3f24335e5850ea7abae41e57a2397966d57
2017-09-01 19:28:01 +02:00
J. Ryan Stinnett
37f8066886 Bug 1395762 - Update Stylo check in file_restyling_xhr_doc.html. r=birtles
Automation also uses env vars to change the Stylo mode, so reading the pref is
not enough.  Change the test to `isStyledByServo` which covers all cases.

MozReview-Commit-ID: KLh42b4roF4

--HG--
extra : rebase_source : f77e78694d00489d4e5c7d7f4eaffca0610f128a
2017-08-31 18:57:25 -05:00
Boris Chiou
5a4b83f24b Bug 1393605 - Fix gecko assertion and add one crashtest. r=birtles
MozReview-Commit-ID: 44QIZ8SipWX

--HG--
extra : rebase_source : 764a560a322b9945365929a7bba6eac77f47b554
2017-08-31 11:11:09 +08:00
Boris Chiou
f2076b6d4a Bug 1390039 - Add tests for mismatched transform lists and some other corner cases. r=birtles
MozReview-Commit-ID: ESchrGe6h9N

--HG--
extra : rebase_source : 099f3b882e7851519a998c51dde4ef9fdd44a998
2017-08-21 16:36:17 +08:00
Andrew McCreight
78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Mantaroh Yoshinaga
c042d7aeea Bug 1366603 - Wait for rAF before waiting the MozAfterPaint in test_deferred_start.html. r=hiro
This test called waitForPaints() after creating an animation, but waitForPaints()
didn't wait for a MozAfterPaint event actually since
DOMWindowUtils.IsMozAfterPaintPending which is checked a MozAfterPaint event has
been queued return false[1]. (i.e. This test didn't wait for a MozAfterPaint)

This is related to bug 1341294. If gecko can receive a MozAfterPaint
corresponded to own paint, waitForPaint() does not need to check for
DOMWindowUtils.IsMozAfterPaintPending.

This patch is a workaround until bug 1341294 is resolved.

[1] http://searchfox.org/mozilla-central/rev/5696c3e525fc8222674eed6a562f5fcbe804c4c7/testing/mochitest/tests/SimpleTest/paint_listener.js#60

MozReview-Commit-ID: 6Rnv8MBP6Se

--HG--
extra : rebase_source : 052f62b01df819961040f6652954e1068f86fc47
2017-08-28 08:01:31 +09:00
Hiroyuki Ikezoe
18bae8b2e9 Bug 1394247 - Enable test_keyframeeffect-getkeyframes.html on stylo. r=birtles
MozReview-Commit-ID: A1Dth4dl87u

--HG--
extra : rebase_source : 6ca648a86d4ce1e159939b6f39bb632e01b0eca5
2017-08-28 05:56:25 +09:00
Tim Huang
5d6e73cb8d Bug 1382545 - Part 1: Rounding the time of Animation API to 100ms when 'privacy.resistFingerprinting'is true. r=arthuredelstein,birtles
Adopt from Tor #16337.

This patch makes Animation API to report a rounded time when 'privacy.resistFingerprinting'
is true. The Animation API uses AnimationUtils::TimeDurationToDouble() to convert
its time duration into a double value and reports it when someone tries to query
time through Animation API. So, we use nsRFPService::ReduceTimePrecisionAsMSecs()
inside this method to round the time in the scope of the millisecond.

MozReview-Commit-ID: 8o01G6AlAu9

--HG--
extra : rebase_source : e2d52f04c1d63accb786f6cf9b1a102607eed517
2017-08-17 22:37:29 +08:00
Eric Rahm
a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Brian Birtles
ac44c390db Bug 1385139 - Expand var() references in keyframes from CSS animations when serializing; r=hiro
This is a temporary step until we implement bug 1391537. It is needed to
maintain consistent behavior with Gecko and provide sensible output,
particularly in the case where we have longhands whose values are drawn from
unparsed shorthands.

MozReview-Commit-ID: 9aD2tsLagBp

--HG--
extra : rebase_source : cdabb26be17b96a574ea8b2e8093e11abb1af430
2017-08-21 12:35:35 +09:00
Boris Chiou
92c6add172 Bug 1389429 - Part 1: Add a test for rotate3d with the non-nomalizable direction vector. r=birtles
MozReview-Commit-ID: 70ZMe0QJbG5

--HG--
extra : rebase_source : f2e4a60cb7e8162ab50d990ccfe295b160bd3393
2017-08-16 11:19:38 +08:00
Hiroyuki Ikezoe
178b49d49e Bug 1390046 - Enable test_transform_limits.html on stylo. r=jdm
MozReview-Commit-ID: C5IJi3q6sLa
2017-08-19 11:15:50 +09:00
Emilio Cobos Álvarez
aadc647248 Bug 1341102 - Update test_animation_properties.html after servo/servo#18131. r=bholley
calc() serialization in stylo changed to align to the spec more closely (modulo percentage order).

See the linked issue.

MozReview-Commit-ID: GyzZvdumMSe
2017-08-18 12:33:21 -04:00
Boris Chiou
7c301ac6aa Bug 1362896 - Part 2: Add a test for computation of distance of transform. r=birtles
MozReview-Commit-ID: 4WgZtyNlU4
2017-08-18 22:18:24 +08:00
Daisuke Akatsuka
ee774b8c7a Bug 1390046: Fix test fail. r=hiro
In Servo, the max value for 'translate' is different from normal float since
is using Au ( AppUnit ). The value which we introduced as MAX_AU_PX
( 1.78957e+7 ) in this test is calculated by following mechanis.

1. Like this time, if the value is larger than max float, stored into specified
   value as infinity by parsing.
2. Then, when converts to the computed value Au from the specified value
   (infinity), ABSOLUTE_LENGTH_MAX (1 << 30) = 1073741824 stores into the Au.
   [1]
3. Finally, when get the PX value, returns the value which devided by
   AU_PER_PX ( 60 ). This value is 1.78957e+7.

[1] to_au_round() method
    https://searchfox.org/mozilla-central/source/servo/components/style/values/specified/length.rs#249

MozReview-Commit-ID: BVfDhOKXaWw

--HG--
extra : rebase_source : e55be1f42d9198c35bb8f29882ff19ec9de8f2fa
2017-08-18 14:12:54 +09:00
Hiroyuki Ikezoe
5c2f4171c6 Bug 1387951 - Enable test_discrete-animations.html on stylo. r=daisuke
MozReview-Commit-ID: HSUA9yMKC7b

--HG--
extra : rebase_source : 5e004fb78b301b680c6872463cafd07dc600924f
2017-08-15 06:57:40 +09:00
Daisuke Akatsuka
21fe68ef86 Bug 1389439 - Part 2: Enable test_underlying-discrete-value.html on stylo. r=hiro
MozReview-Commit-ID: 8zqUHnoZvee

--HG--
extra : rebase_source : b0c372cc5badb5b2d0661a478c6bc2905cb481d2
2017-08-15 12:38:45 +09:00
Daisuke Akatsuka
0b08d2f34b Bug 1389439 - Part 1: Use computed values as all expected values. r=hiro
The serialization of the value in getKeyframes() on both Gecko and Servo is
different, especially 'initial', 'inherit' and 'unset' on discrete animation.
Gecko returns those value as is, but Servo returns computed value.
We are understanding computed value (Servo) is right, so we change expected
values for them. Also, we skip them if this test is running on Gecko.

MozReview-Commit-ID: 4GFpCpec0eP

--HG--
extra : rebase_source : 8bb9fc670fb7ffd56935cdfb4f038be334782de7
2017-08-15 12:38:41 +09:00
Daisuke Akatsuka
d6d4c04b81 Bug 1382138 - Part 2: Add -moz-appearance property to moz prefixed properties test. r=hiro
Since we made -moz-appearance animatable, append to the moz prefixed properties
test.

MozReview-Commit-ID: 9tdouU1umEB

--HG--
extra : rebase_source : 79e9639360461452249ce54ff538294f25b6cd4f
2017-08-14 16:27:05 +09:00
Hiroyuki Ikezoe
fb03af5d7d Bug 1388031 - Process normal traversal for throttled animation flush as well. r=bholley
MozReview-Commit-ID: BirD8BDMifp
2017-08-11 20:34:06 -07:00
Hiroyuki Ikezoe
d041bd8493 Bug 1389450 - Use a valid value for -moz-force-broken-image test. r=daisuke
From the official link for -moz-force-broken-image:

 A value of 1 means that the broken image icon is even shown if the image has
 an alt attribute. A value of 0 only displays the alt attribute.

It's really ambiguous how we handle other values. Actually stylo's parser
rejects other values.  We should use the valid values for this test.

MozReview-Commit-ID: CzmIvsmauke

--HG--
extra : rebase_source : a6387e07b3578cf811bd17f772d791ec73bfa1e7
2017-08-11 20:19:43 +09:00
Hiroyuki Ikezoe
1cc55be690 Bug 1379516 - A test case that checks animations on the compositor keeps running on the compositor when unrelated style attribute is changed. r=birtles
MozReview-Commit-ID: 7fX6fRiZsw5

--HG--
extra : rebase_source : 8583a4633a7dc61dbfb2cbb4a5c647af7aa1da6e
2017-08-11 08:44:16 +09:00
Hiroyuki Ikezoe
80dfc0d6fb Bug 1379516 - Mark animation timerline marker for stylo. r=birtles
MozReview-Commit-ID: GkPSXEk4xua

--HG--
extra : rebase_source : 3fa0f5029bcfd87e9d6abfec9c6ea5d03a7656e6
2017-08-11 08:44:11 +09:00
Hiroyuki Ikezoe
94c7df914d Bug 1379516 - Add descriptions for re-attaching orphaned animation case for stylo. r=birtles
Unlike Gecko, Stylo currently invokes a needless RequestRestyle(Standard)
for this test case (bug 1388560). For this reason, the check right after
re-attaching the orphaned element passes accidentally.

MozReview-Commit-ID: JUG1dgMUQEX

--HG--
extra : rebase_source : a86d72a41c160edc30f83d82179ebe1226b842de
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe
6c56c62a1c Bug 1379516 - Update the test where an orphaned element is attached to a document. r=birtles
Actually we have a chance to run styling process when we attach an orphaned
element to a document in this test setup. Precisely, we can process a restyle
between rAF callbacks and Promise.then() callback for waitForAnimationFrames().
So if we call RequestRestyle(Layer) when we attach the element to the document
(bug 1388557), the animation starts restyling in the first frame. *BUT* this
behavior will also change once our micro tasks handling becomes the HTML spec
compliance (bug 1193394). When the micro tasks handling changes, we should also
fix a bunch of test cases and test utilities in bug 1388557.

MozReview-Commit-ID: GyH1ofGhXOP

--HG--
extra : rebase_source : 3536c315960150960fd43286b205c03c584d53ca
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe
bc0c27d4eb Bug 1379516 - Skip offscreen throttling tests on stylo. r=birtles
MozReview-Commit-ID: F3k3snSRDJG

--HG--
extra : rebase_source : c982236d1871541796d0099b312231a22a9c879d
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe
46ef7fb2b9 Bug 1379516 - Add isStyledByServo(). r=birtles
DOMWindowUtils.isStyledByServo checks not only the preference value but also
STYLO_FORCE_ENABLED value. This is important especially when we run test on
our CI. On our CI, the preference value is false but just STYLO_FORCE_ENABLED
is set.

MozReview-Commit-ID: FKEd5LFwcxf

--HG--
extra : rebase_source : 1ffd8a68a8339babed14f441bf2d69c9ffd9e3ee
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe
393dc8eb24 Bug 1379516 - Get dom.animations.offscreen-throttling preference value just once at startup. r=birtles
MozReview-Commit-ID: KiZ3SRrsCOx

--HG--
extra : rebase_source : e63cd9e2c8c28d3e7c90c3c17fb25ea9844c3fe7
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe
1545907066 Bug 1388209 - Enable test_animation_observers_async.html on stylo. r=birtles
It has been able to pass on stylo since bug 1376248.

MozReview-Commit-ID: 142ptKlqrHe

--HG--
extra : rebase_source : 3bb601122b1593d87a520d3585cc84c0868d6ac8
2017-08-08 11:04:02 +09:00
Nicholas Nethercote
f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Brad Werth
d073eb9bda Bug 1383296 Part 1: Remove all uses of the nsCSSValue::Serialization enum, now that it no longer has multiple values. r=heycam
MozReview-Commit-ID: n6px5hNHtB

--HG--
extra : rebase_source : 6269a9d52e0282d0391276dc1b9ee26dbde7b985
2017-07-21 17:26:35 -07:00
Boris Chiou
7c6e2bd80c Bug 1383998 - Enable dom/animation/test/css-transitions/test_element-get-animations.html. r=heycam
MozReview-Commit-ID: Dbr3XpkZk20

--HG--
extra : rebase_source : 8f630e1f0d06c2dddeadcc6ab340989e93914595
2017-08-02 11:54:04 +08:00
Hiroyuki Ikezoe
16b042e1e5 Bug 1367975 - Call RequestRestyle(Layer) when specified timing is changed for CSS animations. r=birtles
Current Gecko does not need this (see bug 1367975 comment 10 for the reason),
but this is the right thing to do for our animation styling machinery
especially for updating animations on the compositor.


MozReview-Commit-ID: H6mgTXMHecG

--HG--
extra : rebase_source : ef2e5127a5c56008771a434cc5c342ebeca1b7be
2017-08-03 06:34:38 +09:00