Add support for CSS prefers-reduced-motion media feature for Android

RESOLVED FIXED in Firefox 64

Status

()

enhancement
P3
normal
RESOLVED FIXED
9 months ago
4 months ago

People

(Reporter: hiro, Assigned: hiro)

Tracking

(Blocks 1 bug, {dev-doc-complete})

Trunk
mozilla64
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(3 attachments)

(Assignee)

Description

9 months ago
I think ANIMATOR_DURATION_SCALE is the corresponding setting.

https://developer.android.com/reference/android/provider/Settings.Global#ANIMATOR_DURATION_SCALE
(Assignee)

Comment 1

9 months ago
CCing Android forks.

Note that this bug was filed in 'CSS Parsing and Computation', but all works for this should be done in widget/android and mobile/android.
(Assignee)

Updated

8 months ago
Assignee: nobody → hikezoe
Status: NEW → ASSIGNED
(Assignee)

Comment 2

8 months ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=796186ff46875c271ac9cb4035381433019e64e3

Detecting ANIMATOR_DURATION_SCALE changes depends on the machinery will be introduced in a patch for bug 1035774.

And an automation test for this will be introduced in bug 1486971.
Depends on: 1035774, 1486971
(Assignee)

Comment 4

8 months ago
Hey jchen,  there are two other settings relevant with animations on Android (in Developer options on my phone).

https://developer.android.com/reference/android/provider/Settings.Global.html#TRANSITION_ANIMATION_SCALE
https://developer.android.com/reference/android/provider/Settings.Global.html#WINDOW_ANIMATION_SCALE

It seems to me that those two settings are only for application windows, such as animation effects during switching applications, and not for the contents inside applications, right?  Or should we check all three settings' values are 0?
Flags: needinfo?(nchen)
Right, I think it makes more sense to only check ANIMATOR_DURATION_SCALE.
Flags: needinfo?(nchen)
(Assignee)

Comment 6

7 months ago
Great, thanks jchen.  Though dependent bugs haven't landed yet, but those shouldn't affect this bug basically, so I will put patches for this bug on review now.
(Assignee)

Comment 7

7 months ago
Because we are going to use it for prefers-reduced-motion media feature which
is tied to a system setting.
(Assignee)

Comment 9

7 months ago
To make the test work properly, there needs two functions.  One is just setting
a value for testing and sending the notificaiton for the value changes, the
other one is to reset the state for testing.

The test itself will be introduced in bug 1486971, especially in
https://phabricator.services.mozilla.com/D5004

Depends on D5503
Comment on attachment 9007969 [details]
Bug 1478505 - Rename GeckoInputDeviceListener to GeckoSystemStateListener. r=jchen

Jim Chen [:jchen] [:darchons] has approved the revision.
Attachment #9007969 - Flags: review+
Comment on attachment 9007970 [details]
Bug 1478505 - Implement prefers-reduced-motion on Android. r=jchen

Jim Chen [:jchen] [:darchons] has approved the revision.
Attachment #9007970 - Flags: review+
Comment on attachment 9007971 [details]
Bug 1478505 - Run test_mq_prefers_reduced_motion_dynamic.html on Android. r=jchen

Jim Chen [:jchen] [:darchons] has approved the revision.
Attachment #9007971 - Flags: review+

Comment 13

7 months ago
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/239fb18de868
Rename GeckoInputDeviceListener to GeckoSystemStateListener. r=jchen
https://hg.mozilla.org/integration/autoland/rev/aea09f709ef6
Implement prefers-reduced-motion on Android. r=jchen
https://hg.mozilla.org/integration/autoland/rev/759d828c5c2d
Run test_mq_prefers_reduced_motion_dynamic.html on Android. r=jchen

Comment 14

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/239fb18de868
https://hg.mozilla.org/mozilla-central/rev/aea09f709ef6
https://hg.mozilla.org/mozilla-central/rev/759d828c5c2d
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
(Assignee)

Updated

7 months ago
Depends on: 1492284
Depends on: 1512037
You need to log in before you can comment on or make changes to this bug.