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

1787 Коммитов

Автор SHA1 Сообщение Дата
Brian Birtles 043ffca9de Bug 1483404 - Move conversion of CompositeOperation enum types to KeyframeUtils::GetAnimationPropertiesFromKeyframes; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D3457

--HG--
extra : moz-landing-system : lando
2018-08-16 16:24:52 +00:00
Brian Birtles 29e984d336 Bug 1483404 - Use "auto" values for unspecified keyframe-specific composite operations; r=smaug
Summary:
This brings our implementation into line with the following spec change:

  ced6b5aac0

See https://github.com/w3c/csswg-drafts/issues/3000

Reviewers: smaug

Tags: #secure-revision

Bug #: 1483404

Differential Revision: https://phabricator.services.mozilla.com/D3384

--HG--
extra : rebase_source : 097d8307cea82b5d1ea0345414153965067b2b5b
extra : amend_source : fe1f4aeef842961600fe3dba760a573ed2fc84df
2018-08-15 09:51:28 +09:00
Noemi Erli 8f66a71e70 Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00
Xidorn Quan 8421040c69 Bug 1479995 - Rename ScrollbarStyles to ScrollStyles. r=mstange
This change also renames several related functions, as well as fields,
and the header is moved into EXPORTS.mozilla given it is defined under
mozilla namespace.

MozReview-Commit-ID: LqCdcW8fmUN

--HG--
rename : layout/base/ScrollbarStyles.cpp => layout/base/ScrollStyles.cpp
rename : layout/base/ScrollbarStyles.h => layout/base/ScrollStyles.h
extra : rebase_source : 8933f3bca88d5db4b9508e3947f695ecf7511b3e
2018-08-01 16:14:26 +10:00
Emilio Cobos Álvarez 6c81e2e79c Bug 1479450: Convert GetStringValue to use Servo. r=xidorn
And remove gPropertyTable / kCSSRawProperties while at it.

Differential Revision: https://phabricator.services.mozilla.com/D2516

MozReview-Commit-ID: 8U87BcBkrJF
2018-07-31 12:05:00 +02:00
Boris Zbarsky 754087a992 Bug 1446940 part 5. Stop getting docshells from windows via getInterface in dom/editor/etc code. r=kmag 2018-08-01 13:07:11 -04:00
Cosmin Sabou bfc1e72e01 Backed out changeset 9035ff3757ac (bug 1415980) at request from froydnj on the suspicion that it's going to break MSVC builds when it gets merged to central. 2018-07-31 01:19:49 +03:00
Nathan Froyd 017b016850 Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr.  But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us).  Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle
   that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the place.
Additionally, if moving entries is implemented via memcpy (which is
quite common), PLDHashTable copying around bits *again* is inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement).  In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

   This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead
   of copy constructors.  Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-07-30 17:15:11 -04:00
Hiroyuki Ikezoe 9cb3bb79e5 Bug 1479133 - Use AnimationInfo::GetGenerationFromFrame to get the animation generation for WebRender. r=birtles
WebRender has no layers at all.

MozReview-Commit-ID: 7qYE8vONfU9

--HG--
extra : rebase_source : 58e0853ce4f694bfb32e7fa34ef37db6db511185
2018-07-30 11:20:53 +09:00
Hiroyuki Ikezoe 0ffcf23607 Bug 1478643 - Apply change hints for transform animation in the case where the current transform style is 'none' and no change hint produced in AddLayerChangesForAnimation. r=birtles
The applying change hints are the same as what we apply for transform style
changed from something to 'none'.

All test cases pass with this fix fail without the fix.

MozReview-Commit-ID: 7HStU26lRPq

--HG--
extra : rebase_source : 701361d477ab7954ab15fde75fd40d98724e47b3
2018-07-30 11:13:54 +09:00
Hiroyuki Ikezoe 66cfd53581 Bug 1478643 - Introduce a new change hint set for added or removed transform style. r=birtles
MozReview-Commit-ID: GfK1e5QaOu6

--HG--
extra : rebase_source : c6e28e7fabb43f54d04e756865a652fc4752ce30
2018-07-30 10:51:18 +09:00
Hiroyuki Ikezoe 0637266108 Bug 1478643 - Add test cases checking finished opacity animation on the compositor. r=birtles
All test cases here pass without any changes on the current trunk, but all
counter part test cases for transform introducing in a subsequent patch will
fail without the proper fix.

MozReview-Commit-ID: 3hgsVfFJPrZ

--HG--
extra : rebase_source : 535b74c6ddb070af1b1803d966a94bf7ae7bd37d
2018-07-30 10:44:47 +09:00
Hiroyuki Ikezoe aae11e059f Bug 1479246 - Use z-index for the property running on the main thread instead of background-color. r=boris
background-color animations will run on the compositor.  So we have to change
the property in tests which suppose that background-color animation runs on the
main-thread.

The reason why we use z-index is that the property produces only
nsChangeHint_RepaintFrame, thus it's throttled and won't be unthrottled
periodically on out-of-view elements just like background-color animations.

MozReview-Commit-ID: LZYs0qOGskh

--HG--
extra : rebase_source : f299e46a293db067f771ebd50be34ba9460e8ea7
2018-07-29 15:59:21 +09:00
shindli f36ee2923a Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-26 14:21:26 +03:00
Brian Birtles 0a7609ac13 Bug 1478213 - Don't ignore a redundant change to setting the animation start time if we are pending; r=hiro
As discussed here:

  https://github.com/w3c/csswg-drafts/issues/2691

We have a similar check in SetCurrentTime (with the exception that, according to
the spec, this behavior applies to either play OR pause pending, instead of just
pause-pending) so this patch tries to match the comment and format of that
check.

Differential Revision: https://phabricator.services.mozilla.com/D2410

--HG--
extra : rebase_source : 519a976424b021203a369926344c2174662e6156
2018-07-26 15:07:52 +09:00
Brian Birtles 53282fc266 Bug 1478266 - Don't reset pending tasks when setting the target effect to null r=boris
This updates our implementation and tests to match the following spec change:

  2e56cd7d77

Differential Revision: https://phabricator.services.mozilla.com/D2407

--HG--
extra : moz-landing-system : lando
2018-07-26 05:20:41 +00:00
Hiroyuki Ikezoe ba664f7542 Bug 1444816 - Use navigation start time in the case where the refresh driver's time stamp is behind from the start time to avoid negative timelime time at the very beginning of document load. r=birtles
MozReview-Commit-ID: GTnDNRMAWNQ

--HG--
extra : rebase_source : c741ffdd9b90bf1e11ebc3dfc462b60e032aa2f4
2018-07-25 09:41:14 +09:00
Hiroyuki Ikezoe 580f683896 Bug 1444816 - Drop RefPtr for nsDOMNavigationTiming in DocumentTimeline::ToTimeStamp. r=birtles
We don't need to hold the strong reference in DocumentTimeline::ToTimeStamp().

MozReview-Commit-ID: 85UQBoPTjfA

--HG--
extra : rebase_source : 43f957d5b6cb9a2ed0db7105b23c634b04d10bc2
2018-07-25 08:54:01 +09:00
Hiroyuki Ikezoe 329ff338de Bug 1444816 - Use assert_greater_than instead of assert_true for time comparison. r=birtles
It would be easier to understand what happens.

MozReview-Commit-ID: 5lidrbNBzFm

--HG--
extra : rebase_source : d4f1e75928cee449f98ee8224b8740b2ba0f9898
2018-07-23 11:34:51 +09:00
Brian Birtles 8ab6ee61ba Bug 1471814 - Add a preference for {Document,Element}.getAnimations(); r=bz,hiro
This is probably the last thing we will ship since it needs the most spec work.

MozReview-Commit-ID: LLmDBLCsCBJ

--HG--
extra : rebase_source : c06752c9201a9ede87e1ac200ab12577bf784ce6
2018-07-14 09:23:03 +09:00
Brian Birtles 35fffc8314 Bug 1471814 - Ignore the composite member on Keyframe objects when the compositing pref is not set; r=hiro
MozReview-Commit-ID: 9Xn32jLlpq1

--HG--
extra : rebase_source : cbc6d4a972295174e26629845497e22fe1a80aa1
2018-07-14 09:23:03 +09:00
Brian Birtles 382fd2fe39 Bug 1471814 - Add a preference for animation composite modes; r=bz,hiro
This feature should not be shipped until the various definitions of addition for
each additive property are properly specified.

Unlike other patches in this series, compositing is not frequently used
internally (e.g. by DevTools etc.) so there is no need to enable this by default
for system code.

Also, it turns out we have inadvertently been shipping part of this feature for
some time now. The next patch in this series will add tests for that case and
disable that part of the feature (a suitable intent to unship will follow). This
patch merely adapts and extends the existing tests without affecting the surface
area covered by the combination of the newly-added pref and the existing
dom.animations-api.core.enabled pref.

MozReview-Commit-ID: Htr6mlyCBav

--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_compositing.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_compositing.html
extra : rebase_source : 7715a25e59568eb122ba3f7dbd2c2b2ffdd19954
2018-07-14 09:23:03 +09:00
Brian Birtles fc657410ff Bug 1471814 - Add a preference for implicit keyframes; r=bz,hiro
This preference controls whether authors are allowed to specify animations
without a 0% or 100% keyframe.

We intend to ship this soon but this preference acts as a safeguard in case we
discover we need to disable it.

This feature is very convenient and commonly used so this patch ensures it is
always enabled for system content.

MozReview-Commit-ID: BHTsuS2xO61

--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_implicit_keyframes.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_implicit_keyframes.html
extra : rebase_source : 04fd93dd26a4765c14b0b22febdb0311b650ea59
2018-07-14 09:23:03 +09:00
Brian Birtles 5d13151cb9 Bug 1471814 - Add a preference for Web Animations timelines; r=bz,hiro
We don't intend to ship this in the near future until the integration with
AnimationWorklet is clear (although we might ship a read-only version).

That said, we use this feature extensively internally (e.g. in DevTools etc.) so
we enable this feature for system callers.

MozReview-Commit-ID: AhB7ZmU1Xzw

--HG--
extra : rebase_source : 630d7dc56b44a9261bb34aa5417cb9b7050efba4
2018-07-14 09:23:03 +09:00
Brian Birtles c96dd5e595 Bug 1475162 - Drop pref annotations from tests that no longer need them; r=hiro
Many tests set the dom.animations-api.core.enabled pref to true when all they
really require are the features covered by the dom.element-animate.core.enabled
pref. Now that we have removed that pref and permanently enabled that
functionality we can drop the annotations from such tests.

MozReview-Commit-ID: CGOLp6pVFLE

--HG--
extra : rebase_source : e298e9404d76d55421d9ca4b514410d02cc243b1
2018-07-12 17:22:09 +09:00
Hiroyuki Ikezoe 4abbfa1d61 Bug 1474247 - Call ReschedulePendingtasks when we set a new target to KeyframeEffect. r=birtles
MozReview-Commit-ID: 1n5I6RPKAM5

--HG--
extra : rebase_source : c611c925282a16ec9bbfd184722b0182bf4d1944
2018-07-12 17:05:50 +09:00
Hiroyuki Ikezoe 41c4536a67 Bug 1474247 - Add a test case that the target element changed to another element in the same document. r=birtles
MozReview-Commit-ID: Dgew42GWT5d

--HG--
extra : rebase_source : 4c927d24e03b941d032d78f57ed3eb3bc9193a98
2018-07-12 17:05:49 +09:00
Hiroyuki Ikezoe 0badd2beca Bug 1474247 - Check mPendingState instead of mPendingReadyTime in Animation::ReschedulePendingTasks(). r=birtles
When the pending animation having no target element sets a new effect having
a target element associated with a document, PendingAnimationTracker has to
start tracking the animation regardless of mPendingReadyTime.

MozReview-Commit-ID: DxmbXtLhjCT

--HG--
extra : rebase_source : 46c9a51e7d3b971a0c0ffcf94b579d22450028f5
2018-07-12 17:05:34 +09:00
Hiroyuki Ikezoe dce2768ffd Bug 1474247 - Factor out Animation::ReschedulePendingAnimations and make it public. r=birtles
The function will be used in the case of KeyframeEffect::SetTarget too.

MozReview-Commit-ID: G6ipjxaIJsW

--HG--
extra : rebase_source : 609fa17d698612df21d9cac469e6997582dcca69
2018-07-12 17:05:13 +09:00
Hiroyuki Ikezoe 4466a3936f Bug 1474247 - Test cases for animations tracked by the pending animation tracker for Animation::SetEffect, Animation::Cancel() and . r=birtles
MozReview-Commit-ID: 4XzAoylcwpS

--HG--
extra : rebase_source : b800a4d1c2ca831f2f244050a0faaf071043dfc9
2018-07-12 14:42:10 +09:00
Hiroyuki Ikezoe 1609fd1ef0 Bug 1472900 - Use timestamp associated with the timeline for animation cancel events. r=birtles
Before this change, the test in this commit fails.  The received events order
is;

 1) cancel
 2) transitioncancel
 3) transitionstart
 4) finish

MozReview-Commit-ID: 8liTFXime6e

--HG--
extra : rebase_source : 3c68ef330b1f263afa2fad9670a30b351b8dbf28
2018-07-05 06:19:12 +09:00
Hiroyuki Ikezoe 067150dbd6 Bug 1472900 - Rename mTimeStamp in AnimationEventInfo to mScheduledEventTimeStamp. r=birtles
It matches the name in the spec.
https://drafts.csswg.org/web-animations/#scheduled-event-time

MozReview-Commit-ID: EKoUNRfTVMJ

--HG--
extra : rebase_source : 83a5ee36d5df98273e26789733df69800d115b34
2018-07-05 06:13:18 +09:00
Brian Birtles 3a224153bd Bug 1474766 - Merge the three-argument form of KeyframeEffect::Constructor and ConstructKeyframeEffect; r=hiro
There doesn't appear to be any need to separate these anymore.

MozReview-Commit-ID: GHR259JJHJV

--HG--
extra : rebase_source : e9b15c820df97570c3f6e978a7f0c224e33f0468
2018-07-11 10:27:56 +09:00
Brian Birtles a249976a2e Bug 1474766 - Drop KeyframeEffectType template arg; r=hiro
This is no longer needed since in bug 1456394 we merged the two types of
KeyframeEffects into one.

MozReview-Commit-ID: 8IuTD9ivAGK

--HG--
extra : rebase_source : b14593b33bfa9a0233b524010b3bde3cfc078950
2018-07-11 10:27:01 +09:00
Boris Chiou c8d7bee5ff Bug 1467277 - Avoid getting zero normalized vector of rotate3d for animations. r=hiro
If we have a rotate axis whose length is extremely large, we will get an
infinite value, and its normalized vector is a zero vector, instead of an
unit vector, i.e. (x/inf, y/inf, z/inf) == (0, 0, 0).
The solution is: we scale the vector, so the length becomes a finite value,
and we could get a valid unit vector. Therefore, we use
a different normalization method, robust_normalize().

MozReview-Commit-ID: L8SteFe09aO

--HG--
extra : rebase_source : 4568c8bf906a9246e4ef13672a9ed541852b974a
2018-07-05 15:41:23 -07:00
Ciure Andrei 2198f99f97 Merge inbound to mozilla-central. a=merge 2018-07-05 12:51:41 +03:00
Hiroyuki Ikezoe 043e18fa29 Bug 1473172 - Call MostRecentRefreshTimeUpdated when we start observering the refresh driver for DocumentTimeline. r=birtles
There seem race conditions that we do a paint process when we started observing
the refresh driver but the first tick hasn't happened yet.

MozReview-Commit-ID: KRP8WR644q1
2018-07-05 10:44:42 +09:00
Hiroyuki Ikezoe 8015da3cef Bug 1472654 - Drop SchedulePaint call in AddAnimationsForProperty. r=birtles
This call was added in bug 929362, but the key factor to fix the bug was just
setting a flag representing that the target frame doesn't allow the animation
running on the compositor and checking the flag in the function whether the
animation can be run on the compositor or not in later ticks.  So the call
wasn't necessary in the first place.

The test case here fails without this fix.  The test case actually doesn't
observe animation restyle count at all, so it might look a bit awkward in
file_restyles.html, if we add other test cases checking SchedulePaint calls
in future, we will move the tests in a different file.
(The reason there is no animation restyles in this case is that we properly
 throttle the animation in this case.)

MozReview-Commit-ID: AyHciRJHM0s

--HG--
extra : rebase_source : f3963336ea9165b0a9c1a662bdac5c645b209219
2018-07-05 07:18:45 +09:00
Hiroyuki Ikezoe 8b30a3dc7b Bug 1354501 - Dispatch web animation events at the same time when CSS animations/transitions events are dispatched. r=birtles
MozReview-Commit-ID: u7lWtAF8Ml

--HG--
extra : rebase_source : 6ce807bc253706483960dade2f2c926fa9821460
2018-07-03 11:05:23 +09:00
Hiroyuki Ikezoe 7db3f93d4a Bug 1354501 - Introduce a new function to queue a single animation event. r=birtles
Web animation event (i.e. finish and cancel event) is solely queued.

MozReview-Commit-ID: h1g3NfcY3c

--HG--
extra : rebase_source : 1a7b09783d193195b886fa3a046198ba3e02dd7b
2018-07-03 09:25:02 +09:00
Hiroyuki Ikezoe 7374654896 Bug 1354501 - Change event target variable type to EventTarget and rename it to mTarget. r=birtles
That's because the target for web animation events (i.e. finish and cancel)
is an Animation instance.

MozReview-Commit-ID: 5xR325FXUo

--HG--
extra : rebase_source : 9bd0623ece1dc449d52db283882fe236dbc11c6d
2018-07-03 09:25:02 +09:00
Hiroyuki Ikezoe 1c47aa1edf Bug 1354501 - Factor out calculations for interval start/end times. r=birtles
MozReview-Commit-ID: H9iXX9VLXLr

--HG--
extra : rebase_source : 736d304858cd0a2c5953f9986dd161ebd21c8099
2018-07-03 09:25:02 +09:00
Hiroyuki Ikezoe 92e15ae40f Bug 1472076 - Update animations when the refresh driver's time changed due to the active timer changes. r=birtles
Normally the refresh driver's time changes in nsRefreshDriver::Tick, and then
DocumentTimeline::WillRefresh is called for the change.  But nsRefreshDriver
sometimes updates its own time when their timer changes to the active one.
This patch lets DocumentTimeline update animations in response to the refresh
driver's time updates.  And thus this patch prevents animation state and
relevant stuff inconsistencies such as an animation has been finished without
proper processes, e.g. without invalidating frame for the animation.

MozReview-Commit-ID: 42p5BWITQN0

--HG--
extra : rebase_source : 58cc7d8e203a3632b6934b9d778e82e2fe208adb
2018-07-03 10:59:55 +09:00
Hiroyuki Ikezoe 36993c4e93 Bug 1472601 - Use EnsureInserted to check a key in a hashtable and insert the key into the hashtable. r=boris
As for removing an entry, EnsureRemoved is equal to what Contains && RemoveEntry
do, but for consistency we use EnsureRemoved here.

MozReview-Commit-ID: 9qE3YtvmwC8

--HG--
extra : rebase_source : 1681194cd8b9700d46a07a502f7d2f15580918aa
2018-07-02 15:19:43 +09:00
Hiroyuki Ikezoe b4fed9e95d Bug 1246045 - Throttle animations in out-of-view iframe. r=birtles
Before this change, we don't acend up frame tree across different documents,
but it's possible that subframe document is scrolled out in the parent document,
if there are animations in such subframes, we should throttle the animations
too.

The test case added here fails without this fix.

MozReview-Commit-ID: EdOEVEwomPc

--HG--
extra : rebase_source : 4d6366cf609d9269ec05b3722f5adb21d940a9e3
2018-06-29 10:01:26 +09:00
Hiroyuki Ikezoe 2eca924126 Bug 1471106 - Set overflow:hidden to body element to avoid accidentally unthrottling animations to update the overflow region. r=birtles
MozReview-Commit-ID: CtcgyUq37W5

--HG--
extra : rebase_source : 84015639f21f2acbb544ea7ab0bed1e78e003549
2018-06-27 15:21:48 +09:00
Dorel Luca f51c4fa5d9 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-27 13:26:49 +03:00
Hiroyuki Ikezoe 5a526baa41 Bug 1471174 - Drop opacity value that was for preventing the animations run on the compositor and check the animation is NOT running on the compositor. r=birtles
Because now we don't try to send the animations on visibility:hidden element.

MozReview-Commit-ID: IFqIc8ewz5T

--HG--
extra : rebase_source : ed031b3a55fd89f74437b71812f90dfc1825e823
2018-06-27 09:40:55 +09:00
Hiroyuki Ikezoe 5bb979bdfb Bug 1471174 - Don't try to send invisible animations that we already throttled on the main thread. r=birtles
Even if we unthrottled the invisbile animations to update the overflow region,
we don't need to send the animations to the compositor since the scroll bar
updates caused by the overflow should have been finished before sending
animations to the compositor.

MozReview-Commit-ID: GtKdPfBSyRB

--HG--
extra : rebase_source : 3b15f4578ed60740c1409304fe35ecd4f53fbd5b
2018-06-27 09:40:52 +09:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00