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

1449 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe ddb1e94651 Bug 1379515 - Propagate testharness functions only if we use testharness.js. r=birtles
We are going to use SimpleTest.js in the sub window.

MozReview-Commit-ID: HAAMnY7xDNn

--HG--
extra : rebase_source : 3600376a992abf5e1e55baba99bff1a656afdaa6
2017-10-30 09:49:29 +09:00
Hiroyuki Ikezoe 886e45f39e Bug 1379515 - Make test cases that use synthesizeWheelAtPoint proper. r=birtles
We shouldn't call synthesizeWheelAtPoint() in an rAF callback and observe
animation restyle makers there since we might end up observing an animation
restyle maker which is brought by flushing throttled animation styles for
hit-testing caused by the wheel event.  Now we have sendWheelAndPaintNoFlush
which does not flush any styles before sending the wheel event, we use it.

MozReview-Commit-ID: 6WP2ExA7fAv

--HG--
extra : rebase_source : a2a5cea00fbe431dea8096b584a9f82c658158aa
2017-10-30 09:49:23 +09:00
Hiroyuki Ikezoe 1ec24b403d Bug 1379515 - Change a child element position to be able to move into view of the parent by mouse wheel. r=birtles
Before this patch the child element actually did not move into the view and
observed an unrelated restyle maker.  In the next patch we fix the observation
of the unrelated restyle maker.

MozReview-Commit-ID: 1DejqwF6hJg

--HG--
extra : rebase_source : ea6d6a48043f1b2a52ddedcbc41c321624a723d2
2017-10-30 09:43:04 +09:00
Hiroyuki Ikezoe 886e615302 Bug 1379515 - Unify test cases that checks animation are/were in scrolled out elements. r=birtles
It much makes more sense to check the animation in out-of-view is throttled
and unthrottled once it got visible in a single test.

MozReview-Commit-ID: AZY5Xc0cbDF

--HG--
extra : rebase_source : bcdf999ee10283853c7b0bda8f450a53990a0e1c
2017-10-30 09:42:56 +09:00
Andrew McCreight 298aa82710 Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL

--HG--
extra : rebase_source : a4b9d16a4c06c4e85d7d85f485221b1e4ebdfede
2017-10-26 15:08:41 -07:00
Hiroyuki Ikezoe abef3a3a96 Bug 1409166 - Check whether the target animating frame is scrolled out of each scrollable ancestor. r=birtles,mattwoodrow
Before this patch, we had been checking each scrollable ancestor is scrolled
out of its scrollable ancestor.  So if the target animating frame is at the
bottom of its scrollable parent and if half of the scrollable parent is
scrolled out of its ancestor, the animating frame was considered as 'in-view'.

MozReview-Commit-ID: BDueuF3cT4I

--HG--
extra : rebase_source : de1dead6e67a44691887c8364be23734c3b1adef
2017-10-26 18:09:32 +09:00
Brian Birtles 525200b457 Bug 1411318 - Don't consider an animation playing if its timeline is inactive; r=hiro
When we receive animations on the compositor, we assert that either they're not
playing, or they have a resolved start and origin time.

However, on the main thread we determine if an animation is playing by checking
if it has a timeline, if it's in the correct state, and if it has a non-zero
playback rate.

The problem with this check is that if an animation has a timeline but it is
inactive, that is, its current time is null, we will not be able to get
a resolved origin time -- yet we will still report that is is playing.

This patch fixes this mismatch by treating animations with an inactive timeline
as "not playing".

The IsPlaying() method is used a number of call sites but it appears that they
all would expect an animation with an inactive timeline to be considered "not
playing". Furthermore, this makes IsPlaying() consistent with the check we do
for an active timeline in other functions such as Animation::Tick(),
TriggerNow(), SilentlySetCurrentTime(), UpdateFinishedState(),
and IsPossibleOrphanedPendingAnimation().


MozReview-Commit-ID: BQOBpHHFMoD

--HG--
extra : rebase_source : e84a50a16a61d48553610cb7ea0863f09ba86c60
2017-10-26 10:18:42 +09:00
Emilio Cobos Álvarez f3053729c9 Bug 1406750: Fix detection of animations to avoid flushing. r=hiro,birtles
This fixes multiple things:

 * EffectCompositor was using the light tree instead of the flat tree.

 * When we insert an element inside the document, we may not style it right away
   (we mark it for lazy frame construction with the NODE_NEEDS_FRAME). Since we
   trigger animations and transitions from the traversal, we can't skip flushing
   if we call getComputedStyle on any of those.

MozReview-Commit-ID: DpAhmLH3uJ2
2017-10-25 19:02:01 +02:00
Brian Birtles db9b84ee6c Bug 1407898 - Check if presContext is null before dereferencing in GetComputedKeyframeValues; r=hiro
There are no reliable steps to make this happen but it appears to have happened
at least twice during fuzzing. As a result, it doesn't matter too much what the
behavior here is as long as we don't crash.

MozReview-Commit-ID: 4gdiBL2wngU

--HG--
extra : rebase_source : 54afce721f8b59c2ad038e0c2222f64e71a9b917
2017-10-25 15:34:50 +09:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) 3fa03bb34e Bug 1404181 - Part 22: Make sure we mark frames as modified any time they change position or style data and make sure we don't accidentally mark the root as being modified when we don't need to. r=mstange
MozReview-Commit-ID: J5ov5cwvvrE

--HG--
extra : rebase_source : 4eadb82e5e0b3264cc7d6aeef2693ce8aea69b43
2017-09-29 10:51:49 +13:00
Hiroyuki Ikezoe be0c3c9792 Bug 1383239 - Don't throttle non-visible changes involved animations on out-of-view elements when they are newly in-effect. r=birtles
MozReview-Commit-ID: G9OL3pPZarr

--HG--
extra : rebase_source : 649211f4054eb3c62e993f0aafbb21a6ddd1a17a
2017-10-20 18:23:44 +09:00
Brian Birtles c38308c79b Bug 1398038 - Implement extended property-indexed keyframe syntax; r=bz,hiro
This implements the changes specified in these three spec changesets:

  8efd180bd9
  f43ecdfbe5
  a4f1ad1a60

MozReview-Commit-ID: KFhgZ5ip6BA

--HG--
extra : rebase_source : aa18f8e3fbcd5d96194ff9a5239a3c415622dc2f
2017-10-18 16:12:21 +09:00
Boris Chiou 22d25c4d73 Bug 1303235 - Part 3: Enable test_restyle.html and remove the early return in CanIgnoreIfNotVisible. r=hiro
MozReview-Commit-ID: LMKSVW2sh5N

--HG--
extra : rebase_source : 96d48acefeedaa5e9510ea51567b87439bb8f48e
2017-10-11 14:39:37 +08:00
Boris Chiou 80e5237e58 Bug 1303235 - Part 2: Templatize CalculateCumulativeChangeHint. r=hiro
MozReview-Commit-ID: JHSn7FoRPpW

--HG--
extra : rebase_source : f79dbf3b65bc20c13976e348cb9d192bd8b4bb4b
2017-10-12 16:12:54 +08:00
Brian Birtles fd4770f818 Bug 1406381 - Update the simple iteration progress calculation to match recent changes to the Web Animations specification; r=hiro
This implements the following change to the Web Animations specification:

  19b6c33cee

The background to that change is described in the corresponding spec issue:

  https://github.com/w3c/web-animations/issues/201

MozReview-Commit-ID: GGA64LG5vT

--HG--
extra : rebase_source : 92c2a60a250071926c2c998dbfadc5979b89cc0c
2017-10-13 12:31:21 +09:00
Brian Birtles 6334b49355 Bug 1282691 - Drop the assertion about an animation that we're making play-pending not already being pause-pending; r=boris
We could handle this case by dropping the animation from the pause-pending table
but that's an extra hashtable lookup that so far seems to be unnecessary.

I have verified that the crashtest added in this patch fails without the code
changes included here.

MozReview-Commit-ID: Ed6u7WRLD2t

--HG--
extra : rebase_source : 8b175ef2d06b4394f3c51f740a1d305aeea9ed04
2017-10-13 14:37:51 +09:00
Hiroyuki Ikezoe 2b54925c5c Bug 1407463 - Drop unused pseudo atom argument from GetBaseContextForElement. r=heycam
MozReview-Commit-ID: JJ2Jh1I6y4h

--HG--
extra : rebase_source : 99c458dfffee88103e5f2b01f9ff9ae0256b8c62
2017-10-11 10:00:37 +09:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Hiroyuki Ikezoe 9d610320fe Bug 1406284 - Remove unused parent context argument. r=heycam
MozReview-Commit-ID: A1yIOZ1bWjY

--HG--
extra : rebase_source : a4daa3466382b64f50256d1c081f886b98f4f80d
2017-10-06 13:51:02 +09:00
Brian Birtles 3afa921d85 Bug 1291413 - Fix assertion when resuming an Animation with both a start time and hold time; r=hiro
When we set the playback rate to zero on a play-pending animation that is
resuming from an aborted pause we can arrive in a state where both the start
time and hold time are resolved. However, we previously added an assertion that
only one of these is ever set at a time.

Part of the assertion is warranted since that method contains the following
code:

  if (mStartTime.IsNull()) {
    mStartTime = StartTimeFromReadyTime(aReadyTime);
    if (mPlaybackRate != 0) {
      mHoldTime.SetNull();
    }
  }

Here StartTimeFromReadyTime requires a non-null hold time. So either mStartTime
or mHoldTime needs to be non-null. The requirement that only one or the other be
non-null, however, is not in the spec and not necessary (as the test cases in
this bug show).

What this assertion does bring to light, however, is that in the case where we
have *both* the start time and the hold time, we need to consider whether to use
the start time as-is, or calculate it from the hold time.

I have filed the following spec issue for this:

  https://github.com/w3c/web-animations/issues/200



MozReview-Commit-ID: CTCT7Up1E5n

--HG--
extra : rebase_source : 95233f7cd2bc3c4bcc56615d8387fe54852986c1
2017-10-05 10:50:38 +09:00
Brian Birtles 02f8ed3fe4 Bug 1404774 - Defer throwing errors from parsing keyframe easing until after reading off all properties; r=hiro
As required by the recent spec change:

  d696468777

MozReview-Commit-ID: Ev6kUk1uLAY

--HG--
extra : rebase_source : 70f8ca3143a8b3bb4e03016b9989925d5a328049
2017-10-02 12:35:47 +09:00
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
Mantaroh Yoshinaga 2552a3af16 Bug 1377541 - Change the order of serialized value for mochitest. r=birtles
MozReview-Commit-ID: 1zL93y3Lkxd

--HG--
extra : rebase_source : c49f368e548bafb75474e0d21725c87ddcc453e5
2017-08-01 23:20:35 +09:00
Emilio Cobos Álvarez 1a47c01765 Bug 1384542: Move GetParent and IsLinkContext to GeckoStyleContext. r=heycam
MozReview-Commit-ID: C19yGcphixX
2017-07-31 14:32:59 +02:00
Xidorn Quan c4c6fbf75a Bug 1383980 - Enable animation mochitests in mochitest-style task. r=birtles
MozReview-Commit-ID: 38Ir2MG7IMO

--HG--
extra : rebase_source : 0997b7026a24cc271ad977db5ce233c393554dfa
2017-07-25 14:17:04 +10:00
Cameron McCormack f6934ef88b Bug 1376248 - Part 2: Allow tree_ordering sub-test to generate records in any order when simultaneously starting animations. r=birtles
MozReview-Commit-ID: AHkOA7DrXji

--HG--
extra : rebase_source : da38bba8839fe2743bfca3f96d1604dd0fb9b929
2017-07-24 16:03:42 +08:00
Brian Birtles 3f0630429e Bug 1371493 - Compare AnimationValues when producing property-based keyframes; r=hiro
The KeyframeEffectReadOnly::GetProperties compares AnimationValue's mGecko
member which means it sometimes produces the wrong results when using the Servo
backend. Now that AnimationValue has a suitable operator!= method we can simply
compare the AnimationValues directly.

MozReview-Commit-ID: DQQbmcdeynw

--HG--
extra : rebase_source : 509230cf460308b0a534fe9831e9e0d7fa3b8bee
2017-07-24 10:25:13 +09:00
Hiroyuki Ikezoe 604fc397e4 Bug 1380258 - Test case for restarting CSS animation on pseudo element once after the pseudo element was re-generated. r=birtles
This test fails without the first patch in this series.

MozReview-Commit-ID: A22aFPnklqj

--HG--
extra : rebase_source : c3a4e1f1dea0444895a3b60c45814c219ff65ac6
2017-01-16 07:49:09 +09:00
Emilio Cobos Álvarez 2b7de51623 Bug 1381844: Be more explicit about the kind of style context we handle all the time. r=bholley
MozReview-Commit-ID: E0mdkhU3XBz
2017-07-22 18:02:57 +02:00
Manish Goregaokar 26f3a98f78 Bug 1382017 part 4 Gecko piece - Remove usage of ServoComputedValues from most Gecko code; r=xidorn
MozReview-Commit-ID: 2NB4DgxMrL3
2017-07-20 17:27:05 -07:00
Cameron McCormack 9654eabe7f Bug 1380133 - Part 1: Minor reformatting and encapsulation. r=emilio
MozReview-Commit-ID: 3hmptLbxxok
---
 dom/animation/KeyframeUtils.h      |  2 +-
 layout/style/ServoBindings.cpp     | 24 +++++++++++++++---------
 layout/style/ServoStyleContext.cpp | 21 ++++++++++++---------
 layout/style/ServoStyleContext.h   | 33 ++++++++++++++-------------------
 layout/style/ServoTypes.h          | 24 ++++++++++++++----------
 layout/style/nsAnimationManager.h  |  7 +++----
 6 files changed, 59 insertions(+), 52 deletions(-)

--HG--
extra : rebase_source : 150278b5f7429986e79976ec9faf290db6de86c0
2017-07-21 11:42:42 +08:00
Daisuke Akatsuka 3045b91d6e Bug 1378076 - Part 4: add tests for moz prefixed properties. r=hiro
Add tests for following moz prefixed properties.

* -moz-user-select

MozReview-Commit-ID: 6X3iNYpc6kH

--HG--
extra : rebase_source : dc7d53801bab2b5563af3b35fd2f045b60000132
2017-07-20 15:21:12 +09:00
Brian Birtles 267881f1f1 Bug 1381389 - Append PropertyValuePair objects on Gecko side so they are initialized correctly; r=hiro
Without this mValue may end up looking like a valid nsCSSValue object and bad
things will happen when we try to clone it.

We could just assign mem::zeroed() to mValue but this array hacking on the Servo
side is already pretty nasty and mSimulateComputeValuesFailure would still
remain unassigned (and if we did try to assign it on the Servo side we'd need to
only assign it in debug builds). Unless this proves performance-critical, it's
probably best to just do this on the Gecko side.

MozReview-Commit-ID: 75nFsflhZUM

--HG--
extra : rebase_source : 0e5d94a7f6fdb6768983ba440a3ea69d65cbffbf
2017-07-20 14:38:54 +09:00
Emilio Cobos Álvarez dde6942936 Bug 1381764 - style: More ComputedValuesInner cleanup. r=Manishearth on a CLOSED TREE
MozReview-Commit-ID: 8rkAP3pMEpD
2017-07-18 16:22:33 -07:00
Emilio Cobos Álvarez 9a6ef770c1 Bug 1381764: Cleanup the Gecko bits. r=manishearth
MozReview-Commit-ID: dbVDy1u4vp
2017-07-18 16:22:00 -07:00
Manish Goregaokar f33beecc59 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 c2b070c584 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
Emilio Cobos Álvarez dc33155ad6 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

--HG--
extra : rebase_source : 0a920df8809961f784026a14a624d8eafb4cc79f
2017-07-10 13:33:21 +02:00
Brian Birtles 4ec9d9a3c9 Bug 1370123 - Skip restyling elements in documents without a pres shell; r=heycam
The previous patch takes the approach that we should simply not add elements in
documents without a pres shell to EffectCompositor's set of elements to restyle.
However, there exists a case where we might have an element in a displayed
document, then we might tickle it so that it requests an animation restyle, and
then move it to a document without a browsing context. In that case we should
skip the element when we next do animation restyles.

However, even if we successfully skip the element in the document without a pres
shell, we need to make sure it eventually gets removed from the set of elements
to restyle rather than simply remaining there forever. For that reason this
patch makes us unconditionally clear the set of elements to restyle whenever we
do a full restyle from the root.

This patch also adds a test case to trigger the scenario outlined in the first
paragraph above. I have confirmed that without the code changes in this patch,
if we simply assert that target.mElement has an associated pres shell in
getNeededRestyleTarget, then that assertion will fail when running this test
case.

MozReview-Commit-ID: ED2X5g39hYZ

--HG--
extra : rebase_source : 06fecc98c25c739d26123bddf1fd0908cf4410e6
extra : source : 12c7a036215a901bf6804c0e9aacd2a9fc20f932
2017-06-21 14:45:24 +09:00
Brian Birtles 9696b59052 Bug 1370123 - Ignore animation restyle requests for elements in documents without a pres shell; r=heycam
This patch makes us ignore animation restyle requests for elements in documents
without a pres shell made by either:

* Calls to EffectCompositor::RequestRestyle (e.g. by calling Web Animations API
  methods on animations that target such elements)

* Calls to EffectCompostior::PreTraverse(dom::Element*, CSSPseudoElementType)
  (e.g. by calling getComputedStyle(elem).prop on such an element).

  The other overloads of PreTraverse should presumably be called during regular
  document restyling where the element is expected to be in a displayed document
  and hence we simply assert that that is the case for those methods.

MozReview-Commit-ID: FZD0hKAXYEf

--HG--
extra : rebase_source : 9b9ddf4648b49e0241054ffa51a02ae66f1c5009
2017-06-21 08:48:21 +09:00
Brian Birtles f5f71f7eb5 Bug 1370123 - Add tests for Element.animate when used on an element in a document without a browsing context; r=xidorn
MozReview-Commit-ID: FL37UKP6s3k

--HG--
extra : rebase_source : e71da012708f2df179049cee9a1dedc875ff13af
2017-06-19 12:19:57 +09:00
Josh Matthews e0c37f0ed3 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter. r=emilio
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-10 17:52:00 -04:00
Carsten "Tomcat" Book 1f4ac4e7ce Merge mozilla-central to autoland 2017-07-10 13:21:25 +02:00
Brian Birtles 48097ceb05 Bug 1376594 - Coalesce two hashmap lookups in EffectCompositor::RequestRestyle; r=mats+5168
MozReview-Commit-ID: 4TyFKwtcDEz

--HG--
extra : rebase_source : 59edb907e7179a296bb2f553f555f13157d54220
2017-07-05 10:30:44 +09:00
Brian Birtles 8ff7b93580 Bug 1376594 - Track locally whether an effect is part of an EffectSet to avoid hashmap lookups; r=hiro
MozReview-Commit-ID: IEeAmyR9ZlS

--HG--
extra : rebase_source : 112ec688662a14668839f3ceb45192e50edbe381
2017-07-05 10:29:58 +09:00
Wes Kocher a9eb08898f 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 723b20d420 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 0338ac2a6a Bug 1371457 - Update animation restyle tests. r=hiro
Update the various animation restyle tests to check the new animation only data
inside the restyle marker.

MozReview-Commit-ID: HEe8x45IhHj

--HG--
extra : rebase_source : fdaa5855e94d68ce2a70d00fde11582c9a538f45
2017-06-29 10:14:31 -07:00
Geoff Brown 79ab006d0e Bug 1326306 - Skip test_restyles.html on Android; r=hiro 2017-07-09 17:18:05 -06:00
Daisuke Akatsuka d1aa803f11 Bug 1371115 - Part 14: add tests for moz prefixed properties. r=hiro
Since we implement following properties animatable, append to test.

* -moz-border-bottom-colors
* -moz-border-left-colors
* -moz-border-right-colors
* -moz-border-top-colors

MozReview-Commit-ID: E3zWaDcRdtE

--HG--
extra : rebase_source : 27301a4bc354f14cf3f90e8c8271be6022d99721
2017-07-05 13:54:08 +09:00
Mantaroh Yoshinaga 0f2de51f8e Bug 1374564 - Add drop-shadow's serialization test. r=hiro
MozReview-Commit-ID: Cf3Zhvwmklv

--HG--
extra : rebase_source : c1a630bc7a4431cbbd6147833b5a1b85cf508066
2017-06-30 16:28:13 -07:00