Closed Bug 1734115 Opened 3 years ago Closed 3 years ago

Add basic support for dark widgets in the non-native theme.

Categories

(Core :: Widget, task)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox94 --- fixed
firefox95 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

No description provided.

For that:

  • Tweak the standin system colors to match the non-native theme.

  • Use system colors for button and field backgrounds.

  • Rename the "should use system colors" bit to "is high contrast",
    which is what it really is (specially now that we use system colors
    also in non-high-contrast).

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6d22ab00f313 Add basic support for dark form controls to nsNativeBasicTheme. r=mstange
Pushed by imoraru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/75280bd24454 Fix Windows-specific select popup test that was relying on -moz-Combobox to be exactly white. CLOSED TREE
Pushed by imoraru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/124d1c199d38 Annotate a test that's now passing. CLOSED TREE
Regressions: 1734723

https://hg.mozilla.org/mozilla-central/file/6d22ab00f3133b6760ebca3943dba097eff853c7/dom/canvas/test/test_bug1485266.html#l77
-moz-mac-AlternatePrimaryHighlight (with RFP or stand-ins) is coded as rgb(63, 63, 63) but returns rgb(0, 0, 0) in tests [1]

I does this on windows, mac, and my android nightlies. I couldn't test linux but assume it behaves the same. It is reading the previous value left by
-moz-html-cellhighlighttext which was dropped but still reports the same as -moz-cellhighlighttext

Is -moz-mac-AlternatePrimaryHighlight not defined and hooked up yet? TIA

[1] STR

Flags: needinfo?(emilio)
Regressions: 1735077

-moz-mac-AlternatePrimaryHighlight is not hooked up anywhere. It's not a color we support. I'd have to blame to know when it was removed, but we should probably remove it from the test.

Flags: needinfo?(emilio)

OK, cool. Do you want a bugzilla filed? Also, out of interest, why doesn't this get picked up and the test throw?

Sure. Probably because it's supposed to be the same color as -moz-mac-DisabledToolbarText which we do support, so the test just carries on.

which we do support, so the test just carries on

so the test is flawed, we should create a new element for each one :)

Comment on attachment 9244325 [details]
Bug 1734115 - Add basic support for dark form controls to nsNativeBasicTheme. r=mstange,dholbert

Beta/Release Uplift Approval Request

  • User impact if declined: Content doesn't use this just yet, but we need it for bug 1733968 to be effective when the OS theme is light and content wants to draw dark widgets.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: bug 1734723 and bug 1735077
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's a relatively straight-forward change to a well-tested codepath. Regressions like the two other bugs above are easy to spot and fix.
  • String changes made/needed: none
Attachment #9244325 - Flags: approval-mozilla-beta?

@emilio This needs a rebase patch for beta

Flags: needinfo?(emilio)
Attached file Beta patch

Ah, this patch depends on bug 1734009 landing first (checked that that one applies cleanly). Sent a request for that one too.

With that, it needs a minor conflict resolution to account for the Windows' ifdefs in beta, here's the rebased patch with that accounted for.

For convenience, here's a stack of all the 5 patches that have to land on top of current beta: https://treeherder.mozilla.org/jobs?repo=try&revision=0bd7926bac4e50460640c203401620d128b673ea

Flags: needinfo?(emilio)

Comment on attachment 9244325 [details]
Bug 1734115 - Add basic support for dark form controls to nsNativeBasicTheme. r=mstange,dholbert

Approved for 94.0b6

Attachment #9244325 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Regressions: 1735922
Regressions: 1735933
Regressions: 1790670
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: