RESOLVED FIXED246667
[WPE] checkbox and radio button aren't painted because ThemeAdwaita::m_accentColor is the invalid color
https://bugs.webkit.org/show_bug.cgi?id=246667
Summary [WPE] checkbox and radio button aren't painted because ThemeAdwaita::m_accent...
Fujii Hironori
Reported 2022-10-17 18:18:30 PDT
[WPE] checkbox and radio button aren't painted because ThemeAdwaita::m_accentColor is the invalid color
Attachments
Patch (1.80 KB, patch)
2022-10-17 18:24 PDT, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2022-10-17 18:24:10 PDT
Alice Mikhaylenko
Comment 2 2022-10-17 18:29:07 PDT
Comment on attachment 463046 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463046&action=review > Source/WebCore/platform/adwaita/ThemeAdwaita.cpp:-540 > - return m_accentColor.isValid() ? m_accentColor : SRGBA<uint8_t> { 52, 132, 228 }; Is this part needed given it's about the default color? Though really might be better to set it externally, like GTK port does.
Fujii Hironori
Comment 3 2022-10-17 18:40:35 PDT
Comment on attachment 463046 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463046&action=review >> Source/WebCore/platform/adwaita/ThemeAdwaita.cpp:-540 >> - return m_accentColor.isValid() ? m_accentColor : SRGBA<uint8_t> { 52, 132, 228 }; > > Is this part needed given it's about the default color? Though really might be better to set it externally, like GTK port does. Sorry, but I don't understand your suggestion. GTK port is using gtk_style_context_lookup_color to the system accent color. However, WPE can't do that. I think it's a good idea to have the default accent color here.
Alice Mikhaylenko
Comment 4 2022-10-17 18:43:46 PDT
I know it can't do that, but it can set the hardcoded default color from the same place. E.g. if WPE port adds API to set the accent color at some point, it would make it easier. Though that's not important, my main question is why do you need to both set the default color and check color validity later - shouldn't just one of those be enough here?
Fujii Hironori
Comment 5 2022-10-17 18:53:52 PDT
(In reply to Alexander Mikhaylenko from comment #4) > I know it can't do that, but it can set the hardcoded default color from the > same place. E.g. if WPE port adds API to set the accent color at some point, > it would make it easier. Yup, it seems a good idea to add a new API for WPE port. I'm going to use RenderThemeAdwaita for WinCairo port now (bug#246604). I think here is the good place to have the default accent color for ports without HAVE_APP_ACCENT_COLORS. > Though that's not important, my main question is why do you need to both set > the default color and check color validity later - shouldn't just one of > those be enough here? My patch actually removes the validity checking.
Fujii Hironori
Comment 6 2022-10-17 18:56:33 PDT
Alice Mikhaylenko
Comment 7 2022-10-17 19:28:13 PDT
Oh whoops, I shouldn't review patches at 6 AM. LGTM 😅️
Alice Mikhaylenko
Comment 8 2022-10-17 19:29:21 PDT
> I misunderstood your comment. No, you didn't. I indeed misread the patch as adding that check instead of removing it.
EWS
Comment 9 2022-10-18 01:37:34 PDT
Committed 255668@main (d03dce63e768): <https://commits.webkit.org/255668@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463046 [details].
Note You need to log in before you can comment on or make changes to this bug.