<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>246667</bug_id>
          
          <creation_ts>2022-10-17 18:18:30 -0700</creation_ts>
          <short_desc>[WPE] checkbox and radio button aren&apos;t painted because ThemeAdwaita::m_accentColor is the invalid color</short_desc>
          <delta_ts>2022-10-18 01:37:39 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WPE WebKit</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=238398</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>alicem</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1906337</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-10-17 18:18:30 -0700</bug_when>
    <thetext>[WPE] checkbox and radio button aren&apos;t painted because ThemeAdwaita::m_accentColor is the invalid color</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906338</commentid>
    <comment_count>1</comment_count>
      <attachid>463046</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-10-17 18:24:10 -0700</bug_when>
    <thetext>Created attachment 463046
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906339</commentid>
    <comment_count>2</comment_count>
      <attachid>463046</attachid>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-10-17 18:29:07 -0700</bug_when>
    <thetext>Comment on attachment 463046
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=463046&amp;action=review

&gt; Source/WebCore/platform/adwaita/ThemeAdwaita.cpp:-540
&gt; -    return m_accentColor.isValid() ? m_accentColor : SRGBA&lt;uint8_t&gt; { 52, 132, 228 };

Is this part needed given it&apos;s about the default color? Though really might be better to set it externally, like GTK port does.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906340</commentid>
    <comment_count>3</comment_count>
      <attachid>463046</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-10-17 18:40:35 -0700</bug_when>
    <thetext>Comment on attachment 463046
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=463046&amp;action=review

&gt;&gt; Source/WebCore/platform/adwaita/ThemeAdwaita.cpp:-540
&gt;&gt; -    return m_accentColor.isValid() ? m_accentColor : SRGBA&lt;uint8_t&gt; { 52, 132, 228 };
&gt; 
&gt; Is this part needed given it&apos;s about the default color? Though really might be better to set it externally, like GTK port does.

Sorry, but I don&apos;t understand your suggestion.
GTK port is using gtk_style_context_lookup_color to the system accent color.
However, WPE can&apos;t do that.
I think it&apos;s a good idea to have the default accent color here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906343</commentid>
    <comment_count>4</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-10-17 18:43:46 -0700</bug_when>
    <thetext>I know it can&apos;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&apos;s not important, my main question is why do you need to both set the default color and check color validity later - shouldn&apos;t just one of those be enough here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906345</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-10-17 18:53:52 -0700</bug_when>
    <thetext>(In reply to Alexander Mikhaylenko from comment #4)
&gt; I know it can&apos;t do that, but it can set the hardcoded default color from the
&gt; same place. E.g. if WPE port adds API to set the accent color at some point,
&gt; it would make it easier.

Yup, it seems a good idea to add a new API for WPE port.
I&apos;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.

&gt; Though that&apos;s not important, my main question is why do you need to both set
&gt; the default color and check color validity later - shouldn&apos;t just one of
&gt; those be enough here?

My patch actually removes the validity checking.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906346</commentid>
    <comment_count>6</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-10-17 18:56:33 -0700</bug_when>
    <thetext>I misunderstood your comment.
paintCheckbox doesn&apos;t check the validity. 
https://github.com/WebKit/WebKit/blob/d9124122cd00f55a24eb658fe1e12b4a47ff9513/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp#L262</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906349</commentid>
    <comment_count>7</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-10-17 19:28:13 -0700</bug_when>
    <thetext>Oh whoops, I shouldn&apos;t review patches at 6 AM.

LGTM 😅️</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906351</commentid>
    <comment_count>8</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-10-17 19:29:21 -0700</bug_when>
    <thetext>&gt; I misunderstood your comment.

No, you didn&apos;t. I indeed misread the patch as adding that check instead of removing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906412</commentid>
    <comment_count>9</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-10-18 01:37:34 -0700</bug_when>
    <thetext>Committed 255668@main (d03dce63e768): &lt;https://commits.webkit.org/255668@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 463046.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>463046</attachid>
            <date>2022-10-17 18:24:10 -0700</date>
            <delta_ts>2022-10-18 01:37:36 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-246667-20221018102409.patch</filename>
            <type>text/plain</type>
            <size>1844</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">RnJvbSAxNWRlYjU0MjkzNmM3NzZlMDEyNmI1MzY0NmRiNWNkZTQxZDU0MjY1IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBGdWppaSBIaXJvbm9yaSA8SGlyb25vcmkuRnVqaWlAc29ueS5j
b20+CkRhdGU6IFR1ZSwgMTggT2N0IDIwMjIgMTA6MTk6MDIgKzA5MDAKU3ViamVjdDogW1BBVENI
XSBbV1BFXSBjaGVja2JveCBhbmQgcmFkaW8gYnV0dG9uIGFyZW4ndCBwYWludGVkIGJlY2F1c2UK
IFRoZW1lQWR3YWl0YTo6bV9hY2NlbnRDb2xvciBpcyB0aGUgaW52YWxpZCBjb2xvcgogaHR0cHM6
Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTI0NjY2NwoKUmV2aWV3ZWQgYnkgTk9C
T0RZIChPT1BTISkuCgpUaGVtZUFkd2FpdGEgaXMgcGFpbnRpbmcgY2hlY2tib3ggYW5kIHJhZGlv
IGJ1dHRvbiB3aXRoIHRoZSBhY2NlbnQKY29sb3IuIEdUSyBwb3J0IHN1cHBvcnRzIGFjY2VudCBj
b2xvciwgYnV0IFdQRSBkb2Vzbid0LgpUaGVtZUFkd2FpdGE6Om1fYWNjZW50Q29sb3Igd2FzIGlu
aXRpYWxpemVkIGFzIHRoZSBpbnZhbGlkIGNvbG9yIHRoYXQKd2FzIHRyYW5zcGFyZW50LgoKKiBT
b3VyY2Uv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