Closed Bug 1794628 Opened 2 years ago Closed 1 year ago

Implement the `inverted-colors` media feature

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
114 Branch
Accessibility Severity s4
Tracking Status
firefox114 --- fixed

People

(Reporter: morgan, Assigned: canadahonk)

References

(Blocks 4 open bugs)

Details

(Keywords: access, dev-doc-complete, Whiteboard: , [wptsync upstream])

Attachments

(1 file, 1 obsolete file)

See the media query spec for more information.

This isn't a priority right now, but filing for the record.

Keywords: dev-doc-needed
Blocks: 1790541
See Also: 1790541
Blocks: mediaqueries-5
No longer blocks: 1790541
Type: task → enhancement
Component: Layout → CSS Parsing and Computation
Summary: Support the `inverted-colors` media query → Implement the `inverted-colors` media feature
Blocks: 1790541
Assignee: nobody → oj
Status: NEW → ASSIGNED

@emilio would you mind trying to look at the Android linting issues in the patch? Thanks!

Flags: needinfo?(emilio)
diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
index 891e1a37cfd72..1050dbd12816e 100644
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
@@ -111,7 +111,8 @@ public class GeckoSystemStateListener implements InputManager.InputDeviceListene
   /**
    * For inverted-colors queries feature.
    *
-   * <p>Uses `Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED` which was introduced in API version 21.
+   * <p>Uses `Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED` which was introduced in API
+   * version 21.
    */
   private static boolean isInvertedColors() {
     if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
@@ -120,7 +121,8 @@ public class GeckoSystemStateListener implements InputManager.InputDeviceListene
 
     final ContentResolver contentResolver = sApplicationContext.getContentResolver();
 
-    return Settings.Secure.getInt(contentResolver, Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, 0)
+    return Settings.Secure.getInt(
+            contentResolver, Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, 0)
         == 1;
   }
 

Should fix it!

Flags: needinfo?(emilio)
Attachment #9324275 - Attachment description: WIP: Bug 1794628 - Implement inverted-colors media feature → Bug 1794628 - Implement inverted-colors media feature
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/50e64fb58150
Implement inverted-colors media feature r=geckoview-reviewers,morgan,emilio,m_kato,cmartin
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39478 for changes under testing/web-platform/tests
Whiteboard: [access-s4] → [access-s4], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1827605
Depends on: 1827675

MDN doc updates for this bug fix can be tracked here: https://github.com/mdn/content/issues/26691

Accessibility Severity: --- → s4
Whiteboard: [access-s4], [wptsync upstream] → , [wptsync upstream]

Now correctly matches classic invert instead of smart invert.

Comment on attachment 9346559 [details]
WIP: Bug 1794628 - Fix inverted-colors media query on macOS

Revision D184982 was moved to bug 1827675. Setting attachment 9346559 [details] to obsolete.

Attachment #9346559 - Attachment is obsolete: true
Blocks: 1846473
See Also: → 1858708
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: