Closed Bug 1598886 Opened 5 years ago Closed 5 years ago

[RTL] Mirror the new Picture-in-Picture icons

Categories

(Toolkit :: Video/Audio Controls, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla72
Tracking Status
firefox72 --- verified

People

(Reporter: itiel_yn8, Assigned: mconley)

References

Details

(Keywords: rtl)

Attachments

(1 file)

Blocks: 1532675
Priority: -- → P3
Assignee: nobody → mconley

In order to test this, I:

  1. Set intl.uidirection to 1
  2. Visited a YouTube video, and manually set the dir property on the <body> element to rtl.
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b967fa56b86e
Mirror the Picture-in-Picture icons for RTL locales. r=mstriemer
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

This is not 100% fixed on latest Nightly. Specifically, these two are not applied:
https://searchfox.org/mozilla-central/rev/cce8b90aece0f42e5025e45282de16066eeaa662/toolkit/themes/shared/media/videocontrols.css#472-473
Changing them to use -moz-locale-dir(rtl) doesn't work, but dir(ltr) and -moz-locale-dir(ltr) does. Not sure why :-(

(And regardless, shouldn't them both use -moz-locale-dir instead?)

Flags: needinfo?(mconley)

(In reply to Itiel from comment #5)

This is not 100% fixed on latest Nightly. Specifically, these two are not applied:
https://searchfox.org/mozilla-central/rev/cce8b90aece0f42e5025e45282de16066eeaa662/toolkit/themes/shared/media/videocontrols.css#472-473
Changing them to use -moz-locale-dir(rtl) doesn't work, but dir(ltr) and -moz-locale-dir(ltr) does. Not sure why :-(

What sites did you test them on? These selectors will only apply if the document itself is set to render in RTL.

(And regardless, shouldn't them both use -moz-locale-dir instead?)

I'm afraid that in content processes, -moz-locale-dir is unreliable - see https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-locale-dir(rtl) - specifically:

This selector does not work properly from HTML; it never matches, no matter whether the UI locale is left-to-right or right-to-left.
Flags: needinfo?(mconley) → needinfo?(itiel_yn8)

(In reply to Mike Conley (:mconley) (:⚙️) (Wayyyy behind on needinfos) from comment #6)

What sites did you test them on? These selectors will only apply if the document itself is set to render in RTL.

The RTL Hebrew version of YouTube, and 9gag.
But.. re-testing, this now works (on YouTube).

(And regardless, shouldn't them both use -moz-locale-dir instead?)

I'm afraid that in content processes, -moz-locale-dir is unreliable - see https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-locale-dir(rtl) - specifically:

This selector does not work properly from HTML; it never matches, no matter whether the UI locale is left-to-right or right-to-left.

Hmm I see.
The icons should still be mirrored regardless of the direction set on the document.
Is there a workaround for this, besides serving a pre-mirrored version of the SVG for RTL?

Flags: needinfo?(itiel_yn8) → needinfo?(mconley)

(In reply to Itiel from comment #7)

Is there a workaround for this, besides serving a pre-mirrored version of the SVG for RTL?

Not that I'm aware of, no.

Flags: needinfo?(mconley)

Build ID 20191202091209
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Verified as fixed on the latest version of Firefox Nightly (72.0a1) on Windows 10.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: