Commit Graph

52 Commits

Author SHA1 Message Date
Brian Birtles
4264e3210a Bug 1527210 - Be more consistent about only applying transforms to primary frames; r=hiro
For display:table content we generate two frames: a table wrapper frame and an
inner table frame. The styles are applied to the inner frame (referred to as the
style frame), whilst the wrapper frame is the primary frame for the content.

However, in order to make tables with transforms behave as a container for
abspos/fixed-pos content as required by the spec, we apply the transform to the
wrapper frame (bug 722777) by inheriting the transform from inner to wrapper and
then ignoring the transform on the inner frame (bug 722777 and bug 816458).

When handling animations on table elements we need to be careful of this
distinction. in particular, css animations[1] and web animations[2] require that
when we have an unfinished transform animation targetting an element, the
element acts as if it had `will-change: transform` applied and therefore
generates a stacking context. As a result we need to accurately detect when
a frame should be considered as having transform animations applied to it or not
for the purpose of creating a stacking context.

Previously our handling of display:table content was quite inconsistent and
contradictory. For example, `nsIFrame::HasAnimationOfTransform` would check for
a primary frame AND for animations on that frame, despite the fact that we only
ever store animations on the style frame. As a result it could never return true
for either a table wrapper or inner table frame.

This patch attempts to make this handling at least a little more consistent,
producing the following result:

Outer table frame (primary frame):

    nsIFrame::IsTransformed → true
    nsIFrame::IsCSSTransformed → true
    nsIFrame::HasAnimationOfTransform → true
    nsLayoutUtils::HasAnimationOfProperty(frame, eCSSProperty_transform) → false

Inner table frame (style frame):

    nsIFrame::IsTransformed → false
    nsIFrame::IsCSSTransformed → false
    nsIFrame::HasAnimationOfTransform → false
    nsLayoutUtils::HasAnimationOfProperty(frame, eCSSProperty_transform) → true

We maintain that the NS_FRAME_MAY_BE_TRANSFORMED bit is only set on the primary
frame whilst the mMayHaveTransformAnimation flag is only set on the style frame.

Note that we don't simply always put everything on the primary frame because for
other property types (e.g. opacity) the default setup of putting all styles and
animations on the style frame is simpler and correct. So far it is only
transforms that require special handling to apply the effect to the wrapper
frame.

This patch adds a reftest that fails without the code changes included in this
patch.


[1] https://drafts.csswg.org/css-animations/#animations
[2] https://drafts.csswg.org/web-animations-1/#side-effects-section

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

--HG--
extra : moz-landing-system : lando
2019-03-05 03:09:19 +00:00
Brian Birtles
fb78c09d5c Bug 1524480 - Add tests for unstyled data; r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D19886

--HG--
extra : moz-landing-system : lando
2019-02-15 05:54:49 +00:00
Hiroyuki Ikezoe
d745109dfb Bug 1504065 - Drop text in the child element inside background-color animated element to avoid fuzziness on Windows 7 GPU. r=birtles
Depends on D13002

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

--HG--
extra : moz-landing-system : lando
2018-11-28 01:43:55 +00: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
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
c9ba9539cc Bug 1439803 - Add reftest-no-flush flag to stacking-context-transform-none-animation-before-appending-element.html. r=birtles
If reftest-no-flush is not specified, reftest harness flushes layout in a
callback of setTimeout() that happens after paint process happened in the next
refresh driver's tick.  Thus, the paint process triggered by the layout flush
causes no invalidation changes, so reftest harness ends up waiting for the
animation end until the animation finishes.

MozReview-Commit-ID: GXvmyXh0kfV

--HG--
extra : rebase_source : 091a91122b7337ff05032bd64fa2597e59bed3a4
2018-02-23 07:22:10 +09:00
Hiroyuki Ikezoe
9721d084da Bug 1439279 - Drop needless requestAnimationFrame in reftest for web-animation. r=birtles
Refrests without specifing reftest-no-flush flush all pending styles so that
we don't need to wait for a requestAnimationFrame to apply the final style
changes.

MozReview-Commit-ID: lAFsFG8CrE

--HG--
extra : rebase_source : 46ba219da0ccbb1bee0d8243b7e2ee5f8d81a13f
2018-02-19 10:57:53 +09:00
Hiroyuki Ikezoe
5342ead8c3 Bug 1439279 - Append animating element after animation gets ready. r=birtles
This test is supposed to append *animating* element to the document.

MozReview-Commit-ID: 39kvw6IYRF9

--HG--
extra : rebase_source : 510e99190fb60067b0bf404c37d7250e2d994ff0
2018-02-19 10:57:53 +09:00
Kartikaya Gupta
18ef86a9cf Bug 1353399 - Remove stale comment. r=me and DONTBUILD
MozReview-Commit-ID: HsZfmxdBmSm
2017-10-24 11:34:50 -04:00
Ethan Lin
6c6b68f2e7 Bug 1404091 - Re-enable some skip-if and random-if tests after the fix. r=kats
MozReview-Commit-ID: 6gFLZWi0p4b

--HG--
extra : rebase_source : df2013e00b5eacea450d161a000b9e6bfe5c1e07
2017-10-02 22:51:03 +08:00
Kartikaya Gupta
818cfd7499 Bug 1389000 - Update reftest annotations for layers-free results. r=jrmuizel
This patch:
- adds fails-if annotations for all the reftests that were consistently failing
  with layers-free turned on.
- removes fails-if or reduces the range on fuzzy-if annotations for all
  the reftests that were producing UNEXPECTED-PASS results with
  layers-free turned on.
- adds skip-if, random-if, or fuzzy-if annotations to the reftests that
  were intermittently failing due to timeout, obvious incorrectness, or
  slight pixel differences, respectively.

MozReview-Commit-ID: A0Aknn6rnjj

--HG--
extra : rebase_source : 420d9cf43f23a5d654fa36eec69138937d13c173
2017-09-26 14:49:19 -04:00
Hiroyuki Ikezoe
9f3bb3532e Bug 1401801 - A reftest for a child element in animating element that the display property is changed from none by CSSOM. r=birtles
MozReview-Commit-ID: FaBSP4g4FnP

--HG--
extra : rebase_source : 377597a5653e38fd40af87e485d3a9b977267bf0
2017-09-25 12:29:42 +09:00
Hiroyuki Ikezoe
a65ac9940c Bug 1372335 - A reftest to check that animation styles are surely discarded when selector matching happens simultaneously. r=emilio
This reftest fails without the first patch.

This test generates animation-only restyle by anim.cancel() and selector
matching by classList.add().

MozReview-Commit-ID: 2EvOWRwr1o7

--HG--
extra : rebase_source : bfa2f94a5726142577f75074f28415caf87cd53a
2017-06-14 11:56:13 +09:00
Matt Brubeck
d8c5e6208c Bug 1363639 - stylo: Make interpolation of rect() match Gecko. r=emilio
MozReview-Commit-ID: GKLuA9JeOmz

--HG--
extra : rebase_source : 76b1ac38924088eb4b48c30b32ffa39bb311f5b0
2017-05-23 11:23:11 -07:00
Brian Birtles
60c808ad43 Bug 1353202 - Add support for iteration composite modes r=hiro
MozReview-Commit-ID: BlmR88fPF6J

--HG--
extra : rebase_source : d57cb6ca20e314374cc5a26caf3d03a1ac71cd26
2017-05-24 11:14:35 +09:00
Boris Chiou
031243e055 Bug 1346049 - Enable reftests for checking stacking context. r=hiro
After enabling animations running on compositor, it seems to me that we
can enable reftests in layout/reftests/web-animations without intermittents.

MozReview-Commit-ID: 5Whwm0UZ8nQ

--HG--
extra : rebase_source : a0db68e521ff3143bf8f52d3e31eaff115f35bb2
2017-05-15 17:05:36 +08:00
Shing Lyu
c46f5d5baf Bug 1351548 - Remove reftest-stylo.lists. r=bholley
MozReview-Commit-ID: 8LoQ9xNnDnj
2017-04-28 11:15:58 +08:00
Shing Lyu
435db45b79 Bug 1351548 - Add stylo-vs-gecko expectations to reftest.lists. r=bholley
MozReview-Commit-ID: GOUGBsd05cn
2017-04-28 11:15:50 +08:00
Mason Chang
3f9800f4d6 Bug 1337761. Mark tests as random-if for intermittent reftest failure. r=kats 2017-04-19 15:42:44 -07:00
Hiroyuki Ikezoe
ca2a9f3adb Bug 1350754 - Update reftest expectation. r=heycam
MozReview-Commit-ID: 6iXRpR5RATe

--HG--
extra : rebase_source : 14f35a2f3017d769b427ebe9066a1b42e72d6ece
2017-03-27 19:43:24 +09:00
Boris Zbarsky
daecf0ebce Reenable various stylo reftests that set preferences. No bug. r=bzbarsky
MozReview-Commit-ID: F57DNYfpRA5
2017-02-23 18:17:59 -05:00
Kartikaya Gupta
bf7599ac75 Merge m-c to graphics
MozReview-Commit-ID: 8BjfShvh5gp
2017-02-03 10:39:57 -05:00
Hiroyuki Ikezoe
b34254191f Bug 1332657 - Part 4: Adjust reftest expectations for transform animations. r=heycam
MozReview-Commit-ID: A3O4SONRXSu
2017-02-03 14:41:29 +09:00
Kartikaya Gupta
21e9123c56 Merge m-c to graphics
MozReview-Commit-ID: 3tWI3srj2uj
2017-02-01 08:48:31 -05:00
Kartikaya Gupta
1c269ab364 Merge m-c to graphics
MozReview-Commit-ID: 7PVyxahE0p6
2017-01-31 09:04:18 -05:00
Cameron McCormack
01afae2b4b Bug 1334768 - stylo: Test expectation adjustments for 2017-01-30 merge.
MozReview-Commit-ID: 5Uua9zyS9Db
2017-01-30 21:27:43 +08:00
Cameron McCormack
9c4ea5685f Bug 1334768 - stylo: Back out 800030115d2e and 404506488cfb for being completely wrong due to bug 1334938.
MozReview-Commit-ID: 8CGTqmtlguT
2017-01-30 16:49:54 +08:00
Cameron McCormack
35486c881a Bug 1334768 - stylo: More reftest expectation adjustments for 2017-01-29 merge.
MozReview-Commit-ID: 8TT4JzUIBZl
2017-01-30 10:53:58 +08:00
Ethan Lin
8788183d92 Bug 1330574 - Part2. Mask some reftests as passing after fix WebRenderContainerLayer overflow rect. r=kats 2017-01-13 17:28:00 +08:00
Cameron McCormack
8731638062 Bug 1334768 - stylo: Adjust a bunch of reftest expectations. r=me on a CLOSED TREE
MozReview-Commit-ID: 1qa08cspl7o
2017-01-31 17:38:24 +01:00
Sebastian Hengst
79a42c161e Backed out changeset e3687105be00 (bug 1334768) 2017-01-31 17:30:16 +01:00
Cameron McCormack
0333846acf Bug 1334768 - stylo: Adjust a bunch of reftest expectations. r=me
MozReview-Commit-ID: 1qa08cspl7o
2017-01-31 23:36:46 +08:00
Kartikaya Gupta
fe1bb32f1a Merge m-c to graphics
MozReview-Commit-ID: Oh14EA4ip9
2017-01-10 08:34:13 -05:00
Shing Lyu
11a1d3e940 Bug 1328825 - Update reftest-stylo.list and expectations. r=heycam
MozReview-Commit-ID: AMwdk5wvM0F
2017-01-10 15:50:59 +08:00
Kartikaya Gupta
33e6a345a0 Bug 1322817 - Mark reftests failing on WR builds as fails-if(webrender). r=gfx?
This patch was generated using a script and failure logs from a try push, so
whitespace formatting may not be the same as a human would do. The intent is to
fix many of these failures before merging back to m-c.

MozReview-Commit-ID: Etdx9LlWkLX
2016-12-14 16:41:20 -05:00
Hiroyuki Ikezoe
e65ab6898b Bug 1311588 - Use longer duration to avoid failure on Android. r=boris
MozReview-Commit-ID: L3fgbQIg4ca

--HG--
extra : rebase_source : afc89a932a008afa98f163ada84c628b8eeac7d4
2016-10-20 12:43:21 +09:00
Hiroyuki Ikezoe
1aadd2a502 Bug 1223658 - Part 7: Reftests for checking stacking context when changing keyframe and target directly in delay phase. r=birtles
MozReview-Commit-ID: 5skSGbo7qp2

--HG--
extra : rebase_source : 5285b94d1183851514667d2512a0a1e3021a1c97
2016-10-14 19:14:12 +09:00
Hiroyuki Ikezoe
f110687f15 Bug 1278136 - Part 4: Tests to check stacking context for correct effect in cascading rule. r=birtles, bz
These tests aim to confirm that part 5 does not cause any regressons.

MozReview-Commit-ID: BtZ1OGiilmQ

--HG--
rename : layout/reftests/css-animations/no-stacking-context-animation-ref.html => layout/reftests/css-transitions/no-stacking-context-transition-ref.html
rename : layout/reftests/css-animations/stacking-context-animation-ref.html => layout/reftests/css-transitions/stacking-context-transition-ref.html
2016-10-12 09:59:02 +09:00
Phil Ringnalda
6182caa3b9 Backed out 2 changesets (bug 1278136) for failures in no-stacking-context-opacity-removing-animation-in-delay.html
Backed out changeset 62cf4a7d6007 (bug 1278136)
Backed out changeset 5f2db29e67ca (bug 1278136)

MozReview-Commit-ID: K9WcZFjL2XB
2016-10-11 20:40:36 -07:00
Hiroyuki Ikezoe
5443b7cdf5 Bug 1278136 - Part 4: Tests to check stacking context for correct effect in cascading rule. r=birtles, bz
These tests aim to confirm that part 5 does not cause any regressons.
Adding this bunch of reftests makes a slight change in the result of
layout/reftests/bugs/395107-2.html on Android, so fuzzy-if was also
added for the test.

MozReview-Commit-ID: BtZ1OGiilmQ

--HG--
rename : layout/reftests/css-animations/no-stacking-context-animation-ref.html => layout/reftests/css-transitions/no-stacking-context-transition-ref.html
rename : layout/reftests/css-animations/stacking-context-animation-ref.html => layout/reftests/css-transitions/stacking-context-transition-ref.html
2016-10-12 09:59:02 +09:00
Hiroyuki Ikezoe
5f5f888c4b Bug 1216843 - Part 15: Update styles when current iteration changed. r=birtles
MozReview-Commit-ID: 33JtZplxiAz
2016-09-13 11:48:45 +09:00
Hiroyuki Ikezoe
141b4a3e62 Bug 1216843 - Part 14: Reftest for iterationComposite. r=birtles
MozReview-Commit-ID: 8215VmzlJpI
2016-09-13 11:48:45 +09:00
Shing Lyu
db11558e50 Bug 1288350 - Temporary reftest list for Stylo vs Gecko test r=heycam,manishearth
--HG--
extra : rebase_source : 4772418bd2813d4e79643a833eb09e47fe893d84
2016-09-05 11:45:39 +08:00
Boris Chiou
f736a7f384 Bug 1298742 - Part 2: Make sure UpdateRelevance() is called before NotifyAnimationTimingUpdated. r=hiro
MozReview-Commit-ID: Ki0Aqhgl1dO

--HG--
extra : rebase_source : 5dbfa13c63390364d581b649b18e25ceea8e7a15
2016-08-29 16:22:46 +08:00
Boris Chiou
76b7d2d3de Bug 1049975 - Part 13: Add reftests for stacking context when effects are changed. r=hiro
MozReview-Commit-ID: FaswbUx9aGW

--HG--
extra : rebase_source : ff418a8ba915913fda391a615eae71f0172198df
2016-07-18 17:44:24 +08:00
Hiroyuki Ikezoe
d20c596b42 Bug 1279403 - Part 2: Set NS_FRAME_MAY_BE_TRANSFORMED bit if the target nsIFrame has transform when setting target or keyframes. r=birtles
MozReview-Commit-ID: InQyXpENsSY

--HG--
extra : rebase_source : f8eb4c9ea0495d60c92a214ab692df79cf428e85
2016-07-11 08:29:14 +09:00
Hiroyuki Ikezoe
685a35fbc5 Bug 1279403 - Part 1: Force to apply corresponding change hint if there is no corresponding layer to generate display item even if animation's segment is transform:none or 100% opacity. r=birtles
To create a stacking context for animations on transform:none segment,
we need to set NS_FRAME_MAY_BE_TRANSFORMED.  The fix is comming in part 2.

Note that in case of animations which has properties preventing running on
the compositor, e.g., width or height, corresponding layer is not created
at all, but even in such cases, we normally set valid change hint for such
animations in each tick, i.e. restyles in each tick. For example:

div.animate([{ opacity: 1, width: '100px' }, { opacity: 0, width: '200px' }], 1000);

This animation causes restyles in every ticks without this patch, this patch
does not affect such animations at all. The only animations which will be
affected by this patch are animations which has opacity/transform but
did not have those properies. e.g,  setting transform by setKeyframes or
changing target element from other target which prevents running on the
compositor, etc.

MozReview-Commit-ID: 78fYqyX8uDX

--HG--
extra : rebase_source : c4a6ef244f26f3d808fd2c6a5f80c1a15478ae31
2016-07-11 08:27:02 +09:00
Hiroyuki Ikezoe
8f62183f96 Bug 1273042 - Part 3: Reftest for checking transform:none animations create a stacking context. r=birtles
This patch has two test cases one if for CSS animations and one is for web animations.

For CSS animations test cases:
@keyframes {
  from, to { transform: none; }
}

For web animtions test cases, the target element is appended after animate().

MozReview-Commit-ID: Gy1sY41jV7G
2016-06-01 16:24:34 +09:00
Brian Birtles
90fb66a530 Bug 1271904 - Rename KeyframeEffectReadOnly.getFrames() and KeyframeEffect.setFrames() to getKeyframes()/setKeyframes(); r=hiro, r=smaug
MozReview-Commit-ID: GwLLY39l1KE

--HG--
rename : dom/animation/test/css-animations/file_keyframeeffect-getframes.html => dom/animation/test/css-animations/file_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-animations/test_keyframeeffect-getframes.html => dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-transitions/file_keyframeeffect-getframes.html => dom/animation/test/css-transitions/file_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-transitions/test_keyframeeffect-getframes.html => dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes.html
rename : testing/web-platform/meta/web-animations/keyframe-effect/setFrames.html.ini => testing/web-platform/meta/web-animations/keyframe-effect/setKeyframes.html.ini
rename : testing/web-platform/tests/web-animations/keyframe-effect/setFrames.html => testing/web-platform/tests/web-animations/keyframe-effect/setKeyframes.html
2016-05-13 09:40:52 +09:00
Hiroyuki Ikezoe
28256ab21a Bug 1267937 - Part 2: A reftest which checks mProgressOnLastCompose is surely cleared in before phase. r=birtles
--HG--
extra : amend_source : f368a7e3b62c8ecae30b423cf5b87ce5516d6492
2016-04-30 07:08:14 +09:00