<?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>197947</bug_id>
          
          <creation_ts>2019-05-16 06:56:04 -0700</creation_ts>
          <short_desc>[GTK] Should use light theme unless website declares support for dark themes in color-schemes property</short_desc>
          <delta_ts>2024-04-12 03:42:12 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=126907</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=165072</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=118234</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=186146</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=196685</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=186219</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=202194</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=206953</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=197276</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=209385</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=208204</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="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annulen</cc>
    
    <cc>aperez</cc>
    
    <cc>benjamin</cc>
    
    <cc>berto</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cassidy</cc>
    
    <cc>cdumez</cc>
    
    <cc>cgarcia</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>contact+bugs.webkit.org</cc>
    
    <cc>dbates</cc>
    
    <cc>emilio</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>glenn</cc>
    
    <cc>gustavo</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>ie2kl43y</cc>
    
    <cc>kangil.han</cc>
    
    <cc>kondapallykalyan</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>otte</cc>
    
    <cc>pdr</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>sergio</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1536789</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-16 06:56:04 -0700</bug_when>
    <thetext>Currently the web breaks pretty badly when users use a dark GTK theme. We should follow macOS in restricting dark theme usage to websites that have declared support for it using the color-scheme CSS property, as documented in https://webkit.org/blog/8840/dark-mode-support-in-webkit/.

This is not possible to do perfectly because GTK does not have any concept of dark vs. light themes, so we&apos;ll have to use heuristics. We can attempt to switch from a dark theme to light theme by default, e.g. by pruning -dark or :dark off the name of the GTK theme and hoping for the best. Then we can switch back to the dark theme variant only if used on websites that really support dark mode.

If we cannot switch like this due to performance considerations, then it&apos;s better to always try to prune the -dark portion of the theme name and use a light theme, because dark themes will never be web-compatible except for websites that opt-in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536792</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-05-16 07:16:05 -0700</bug_when>
    <thetext>This is indeed not so easy. Our theming code always uses the values from current theme, and the only way to use a different theme is by actually changing the theme. That&apos;s indeed what mac does, but in GTK loading a new theme takes some time, and we would need to do that for every single call to RenderTheme API. I implemented it, and it was unusable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536796</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-16 07:38:38 -0700</bug_when>
    <thetext>OK.

(In reply to Carlos Garcia Campos from comment #1)
&gt; and we would need to do that for every single call to RenderTheme API.

Naively, we&apos;d like to change the theme just once per webpage.

Nowadays we&apos;re guaranteed to have a separate process per web view, except for related views. The problem becomes related views and frames. The page displayed in a parent frame might opt-in to dark theme, but not the page in a child frame, even if both frames share the same security origin (and therefore the same process, under PSON).

So at a minimum, we would need to change the theme at least as often as we switch between rendering related views or different frames in the same process, but only to the extent the pages rendered in those views/frames want different themes.

An alternative approach would be to attempt to force light theme in GTK 3, punt dark theme to GTK 4, and see if we can convince Company to support multiple themes in the same process. It could be doable if GTK were to grow a library context object so that multiple instances of GTK could run in the same process. That might be nuts, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574350</commentid>
    <comment_count>3</comment_count>
    <who name="Cassidy James Blaede">cassidy</who>
    <bug_when>2019-09-25 21:03:39 -0700</bug_when>
    <thetext>Something that might simplify this: it looks like almost* all other engines on other OSes use the light styles always, regardless of the site declaring support in CSS. I presume this is because browsers have largely had light-styled defaults for so long that it&apos;s less breaking to keep the light defaults, and assume that developers adopting the *new* feature of `prefers-color-scheme` are going to provide styles that work in the majority of browsers shipping today.

I&apos;ve put together a little demo site to show the current behaviors of Gecko, Blink, WebKit, and WebKitGTK across OSes: 

https://cassidyjames.com/dark-demo/
https://cassidyjames.com/dark-demo/mixed.html
https://cassidyjames.com/dark-demo/dark.html

It looks like the two outliers are Firefox on Linux (due to using the dark GTK theme for inputs) and WebKitGTK due to using a dark default stylesheet *and* dark styled inputs. I think WebKit GTK could safely always use the light GTK variant and be more in line with the other browsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574451</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-26 08:13:28 -0700</bug_when>
    <thetext>(In reply to Cassidy James Blaede from comment #3)
&gt; It looks like the two outliers are Firefox on Linux (due to using the dark
&gt; GTK theme for inputs) and WebKitGTK due to using a dark default stylesheet
&gt; *and* dark styled inputs. I think WebKit GTK could safely always use the
&gt; light GTK variant and be more in line with the other browsers.

It is not technically possible to do with GTK, per Carlos&apos;s comments above.

We seem to have reached a consensus that we need to remove support for GTK themes in order to fix this bug, because the GTK developers are not interested in changing GTK to make this solvable. Fixing this bug is more important than keeping GTK theme support, and GTK developers don&apos;t want us using GTK theme on the web anyway. A large number of other dark mode bugs will disappear as soon as we remove the GTK support.

But that requires writing a cross-platform theme to replace the GTK theme. Safari might be doing this soon too, to get away from macOS platform theme, so we will wait and see what happens there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574478</commentid>
    <comment_count>5</comment_count>
    <who name="Cassidy James Blaede">cassidy</who>
    <bug_when>2019-09-26 09:35:40 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; We seem to have reached a consensus that we need to remove support for GTK
&gt; themes in order to fix this bug, because the GTK developers are not
&gt; interested in changing GTK to make this solvable. Fixing this bug is more
&gt; important than keeping GTK theme support, and GTK developers don&apos;t want us
&gt; using GTK theme on the web anyway. A large number of other dark mode bugs
&gt; will disappear as soon as we remove the GTK support.

That does sound reasonable for a long-term goal, and is in line with what Chrome has done across platforms as far as I can tell.

&gt; But that requires writing a cross-platform theme to replace the GTK theme.
&gt; Safari might be doing this soon too, to get away from macOS platform theme,
&gt; so we will wait and see what happens there.

The one major issue I see with waiting is that the behavior in WebKitGTK changed recently, and is badly breaking websites. See specifically the case where a developer defines a foreground color but not a background color, which is not uncommon: https://cassidyjames.com/dark-demo/mixed.html

A real-world example of this is Startpage.com search results and the GNOME Wiki (https://wiki.gnome.org/Apps/Web). Websites are completely broken with the new dark default stylesheet when using a dark GTK theme. If that&apos;s a standalone bug, I am fine to file it, but it&apos;s my biggest concern right now with WebKitGTK and will make WebKitGTK unusable for elementary OS in its current state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574482</commentid>
    <comment_count>6</comment_count>
    <who name="Cassidy James Blaede">cassidy</who>
    <bug_when>2019-09-26 09:40:45 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; But that requires writing a cross-platform theme to replace the GTK theme.
&gt; Safari might be doing this soon too, to get away from macOS platform theme,
&gt; so we will wait and see what happens there.

Would it be unreasonable to bundle a light-only Adwaita with WebKitGTK, at least in the meantime? Adwaita is a very neutral style and removing its dark variant would not be difficult.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574483</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-26 09:41:33 -0700</bug_when>
    <thetext>Sadly dark themes have *never* been well-supported by WebKitGTK (as evidenced by many, many bugs in this bugtracker) so I strongly recommend you ensure it doesn&apos;t get used until this changes... somehow. If it&apos;s possible to change theme using environment variables (not sure), then you could run Epiphany with an envvar to force light theme, for instance.

If there&apos;s some particular commit that has made the situation worse recently, and you could identify it, then we could consider reverting.

(In reply to Cassidy James Blaede from comment #6)
&gt; Would it be unreasonable to bundle a light-only Adwaita with WebKitGTK, at
&gt; least in the meantime? Adwaita is a very neutral style and removing its dark
&gt; variant would not be difficult.

Maybe?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574486</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-26 09:46:36 -0700</bug_when>
    <thetext>(In reply to Cassidy James Blaede from comment #3)
&gt; I&apos;ve put together a little demo site to show the current behaviors of Gecko,
&gt; Blink, WebKit, and WebKitGTK across OSes: 
&gt; 
&gt; https://cassidyjames.com/dark-demo/
&gt; https://cassidyjames.com/dark-demo/mixed.html
&gt; https://cassidyjames.com/dark-demo/dark.html
&gt; 
&gt; It looks like the two outliers are Firefox on Linux (due to using the dark
&gt; GTK theme for inputs) and WebKitGTK due to using a dark default stylesheet
&gt; *and* dark styled inputs. I think WebKit GTK could safely always use the
&gt; light GTK variant and be more in line with the other browsers.

This is a really helpful demo BTW. I agree the WebKitGTK behavior is clearly broken.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574495</commentid>
    <comment_count>9</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2019-09-26 09:53:31 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #7)
&gt; Sadly dark themes have *never* been well-supported by WebKitGTK (as
&gt; evidenced by many, many bugs in this bugtracker) so I strongly recommend you
&gt; ensure it doesn&apos;t get used until this changes... somehow. If it&apos;s possible
&gt; to change theme using environment variables (not sure), then you could run
&gt; Epiphany with an envvar to force light theme, for instance.

The GTK_THEME environment variable works for all GTK+ applications:

  % GTK_THEME=Adwaita epiphany

It should also be possible to use the GtkSettings::theme-name property
to set a theme programatically. That being said, forcing its value for
any application that uses WebKitGTK would be to blatantly ignore the
user&apos;s settings: instead, I would only do it for the Web process, where
we do handling of the widgets *from Web pages*, so only those would be
affected, and the chrome of the applications using WebKitGTK (like
Epiphany) would still follow the user settings.

&gt; If there&apos;s some particular commit that has made the situation worse
&gt; recently, and you could identify it, then we could consider reverting.
&gt; 
&gt; (In reply to Cassidy James Blaede from comment #6)
&gt; &gt; Would it be unreasonable to bundle a light-only Adwaita with WebKitGTK, at
&gt; &gt; least in the meantime? Adwaita is a very neutral style and removing its dark
&gt; &gt; variant would not be difficult.
&gt; 
&gt; Maybe?

If that is the way we want things to go (forcing a non-dark theme)
there is no need to bundle it. We can use GtkSettings::theme-name
or GTK_THEME (as outlined above) to force using Adwaita in the Web
process as soon as it starts.

I would rather not bundle a GTK theme with WebKit which is expected
to be installed anyway — if we do, it will soon get desynced from
upstream Adwaita.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574498</commentid>
    <comment_count>10</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2019-09-26 09:59:19 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #9)
&gt;
&gt; [...]
&gt; 
&gt; If that is the way we want things to go (forcing a non-dark theme)
&gt; there is no need to bundle it. We can use GtkSettings::theme-name
&gt; or GTK_THEME (as outlined above) to force using Adwaita in the Web
&gt; process as soon as it starts.

Actually, I would try and be more fine grained here: if the current
value of GtkSettings::theme-name ends in “-dark”, remove the suffix;
in any other case set it to “Adwaita”. If the theme name resulting
from removing the “-dark” suffix is not installed, GTK will default
to Adwaita anyway.

Rationaly: If I have installed themes “Arc” and “Arc-dark”, and my
settings have “Arc-dark” configured, I would rather have controls
rendered in Web pages using “Arc” than “Adwaita”.

(Yes, I am one of those people in the intersection of “subjects who
don&apos;t like Adwaita much” and “subjects who have the slight amount
of OCD to care that widgets in Web pages get rendered at least in a
somewhat coherent way with the rest of the system theme”).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574503</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-26 10:05:31 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #10)
&gt; Actually, I would try and be more fine grained here: if the current
&gt; value of GtkSettings::theme-name ends in “-dark”, remove the suffix;

+1, let&apos;s do this for now, and close all the dark theme bugs. Themes named &quot;midnight&quot; will just stay broken for now.

In the long term, after removing support for GTK themes, then we can have some proper dark mode support. But until then, forcing light is the way to go.

&gt; in any other case set it to “Adwaita”.

This must be a typo, because then we&apos;d change &quot;Arc&quot; to &quot;Adwaita&quot; and you don&apos;t want that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1574516</commentid>
    <comment_count>12</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2019-09-26 10:19:48 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #11)
&gt; (In reply to Adrian Perez from comment #10)
&gt; &gt; Actually, I would try and be more fine grained here: if the current
&gt; &gt; value of GtkSettings::theme-name ends in “-dark”, remove the suffix;
&gt; 
&gt; +1, let&apos;s do this for now, and close all the dark theme bugs. Themes named
&gt; &quot;midnight&quot; will just stay broken for now.
&gt; 
&gt; In the long term, after removing support for GTK themes, then we can have
&gt; some proper dark mode support. But until then, forcing light is the way to
&gt; go.

I can try to have a patch ready in the next days.

&gt; &gt; in any other case set it to “Adwaita”.
&gt; 
&gt; This must be a typo, because then we&apos;d change &quot;Arc&quot; to &quot;Adwaita&quot; and you
&gt; don&apos;t want that.

True, I wrote too fast. Let&apos;s try again, this time writing down
things properly:

 * If the theme name is “&lt;name&gt;-dark”:
    - Remove the “-dark” suffix, use “&lt;name&gt;” as the theme.
    - If the theme “&lt;name&gt;” does not exist, GTK automatically
      fall-back to Adwaita.
 * Otherwise:
    - Keep the current theme name, assuming that it is light.

This matches the on-going discussion about the proposal started around
the last GUADEC where dark themes should be required to have a “-dark”
suffix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1585093</commentid>
    <comment_count>13</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-10-29 14:18:00 -0700</bug_when>
    <thetext>(In reply to Cassidy James Blaede from comment #3)
&gt; I&apos;ve put together a little demo site to show the current behaviors of Gecko,
&gt; Blink, WebKit, and WebKitGTK across OSes: 
&gt; 
&gt; https://cassidyjames.com/dark-demo/
&gt; https://cassidyjames.com/dark-demo/mixed.html
&gt; https://cassidyjames.com/dark-demo/dark.html
&gt; 
&gt; It looks like the two outliers are Firefox on Linux (due to using the dark
&gt; GTK theme for inputs) and WebKitGTK due to using a dark default stylesheet
&gt; *and* dark styled inputs. I think WebKit GTK could safely always use the
&gt; light GTK variant and be more in line with the other browsers.

BTW Emilio: this is what I had mentioned to you a couple weeks ago. You can see in https://cassidyjames.com/dark-demo/ or https://cassidyjames.com/dark-demo/mixed.html that Firefox on Linux displays a clearly undesirable result. With https://cassidyjames.com/dark-demo/dark.html the page content looks OK but is still different than all the other browsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1585825</commentid>
    <comment_count>14</comment_count>
    <who name="Emilio Cobos Álvarez (:emilio)">emilio</who>
    <bug_when>2019-10-31 01:21:09 -0700</bug_when>
    <thetext>I can see that in Firefox 67 (just a build that I had handy), but seems fixed in Firefox 70 (this is the &quot;force light theme&quot; hack that I mentioned at the hackfest)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1592785</commentid>
    <comment_count>15</comment_count>
    <who name="Haelwenn (lanodan) Monnier">contact+bugs.webkit.org</who>
    <bug_when>2019-11-22 07:27:13 -0800</bug_when>
    <thetext>Is there any update on fixing this quite critical bug?

For now the only way for users is to launch WebKitGTK applications with a light variant of the theme, which breaks integration for the whole application (rather than just web, which is doomed to not be) and usage for non-advanced users which would still prefer a dark variant for their desktop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1599418</commentid>
    <comment_count>16</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-12-17 07:46:19 -0800</bug_when>
    <thetext>I agree with Adrian that this is a good idea:

(In reply to Adrian Perez from comment #12)
&gt;  * If the theme name is “&lt;name&gt;-dark”:
&gt;     - Remove the “-dark” suffix, use “&lt;name&gt;” as the theme.
&gt;     - If the theme “&lt;name&gt;” does not exist, GTK automatically
&gt;       fall-back to Adwaita.
&gt;  * Otherwise:
&gt;     - Keep the current theme name, assuming that it is light.
&gt; 
&gt; This matches the on-going discussion about the proposal started around
&gt; the last GUADEC where dark themes should be required to have a “-dark”
&gt; suffix.

Then we need to revert the change from bug #196685 and have PageClientImpl::effectiveAppearanceIsDark always return false. And then we can close this bug, and all related dark mode bugs.

In the future, it would be nice to actually support dark mode, but it&apos;s clear at this point we can&apos;t do that in GTK, so it must be preconditioned on removal of GTK theme support and implementation of a cross-platform theme that doesn&apos;t use GTK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611693</commentid>
    <comment_count>17</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-27 16:35:15 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #16)
&gt; Then we need to revert the change from bug #196685 and have
&gt; PageClientImpl::effectiveAppearanceIsDark always return false. And then we
&gt; can close this bug, and all related dark mode bugs.

Carlos, are you OK with this proposal? It requires rolling out r244766.

(In reply to Adrian Perez from comment #12)
&gt;  * If the theme name is “&lt;name&gt;-dark”:
&gt;     - Remove the “-dark” suffix, use “&lt;name&gt;” as the theme.
&gt;     - If the theme “&lt;name&gt;” does not exist, GTK automatically
&gt;       fall-back to Adwaita.
&gt;  * Otherwise:
&gt;     - Keep the current theme name, assuming that it is light.

Let&apos;s do this too. I guess the RenderTheme::singleton() constructor in RenderThemeGtk.cpp would be a good place. Only other place I can think of that might be appropriate would be WebProcessMainGtk.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611941</commentid>
    <comment_count>18</comment_count>
      <attachid>389004</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-01-28 08:41:32 -0800</bug_when>
    <thetext>Created attachment 389004
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611943</commentid>
    <comment_count>19</comment_count>
    <who name="EWS Watchlist">ews-watchlist</who>
    <bug_when>2020-01-28 08:42:52 -0800</bug_when>
    <thetext>Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611989</commentid>
    <comment_count>20</comment_count>
      <attachid>389004</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-28 09:27:39 -0800</bug_when>
    <thetext>Comment on attachment 389004
Patch

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

Thanks Carlos, this was a huge help. I&apos;ll test it soon to verify it fixes older unpatched Evolution, and to check out its behavior in Cassidy&apos;s test cases.

&gt; LayoutTests/platform/gtk/css-dark-mode/default-colors-expected.txt:9
&gt; -PASS Body text color is white 
&gt; -FAIL View base background color is a dark grey assert_equals: expected &quot;rgb(30, 30, 30)&quot; but got &quot;rgb(51, 57, 59)&quot;
&gt; +FAIL Body text color is white assert_equals: expected &quot;rgb(255, 255, 255)&quot; but got &quot;rgb(0, 0, 0)&quot;
&gt; +FAIL View base background color is a dark grey assert_equals: expected &quot;rgb(30, 30, 30)&quot; but got &quot;rgb(255, 255, 255)&quot;

I have a dream that one day, we can make this pass. One day....

&gt; Source/WebCore/ChangeLog:10
&gt; +        guads should be enough.

guards

&gt; Source/WebKit/ChangeLog:11
&gt; +        Handle the theme changes in the UI process, converting dark variant to the light one before sending the theme
&gt; +        name to the web process. The web process is still notified when a dark theme is in use, so that if website
&gt; +        prefers a dark color scheme it will be used, but the gtk theme that will be used for controls styling will
&gt; +        always be light.

I wrote a very long comment on why you should not do this, but checking Cassidy&apos;s example, maybe you&apos;re right and this is actually safe and amazing. I had failed to realize that other browser&apos;s dark modes are actually using light form controls (except Firefox on Linux, at least in Cassidy&apos;s old screenshots; I think Emilio mentioned that needs to be fixed). So maybe this is perfect. I will test.

&gt; Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:598
&gt; +    if (name.endsWith(&quot;-dark&quot;))

Why aren&apos;t you also checking for &quot;:dark&quot; here? Mistake?

&gt; Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:601
&gt; +String PageClientImpl::themeName() const
&gt; +{
&gt; +    if (auto* themeNameEnv = g_getenv(&quot;GTK_THEME&quot;)) {
&gt; +        String name = String::fromUTF8(themeNameEnv);
&gt; +        if (name.endsWith(&quot;-dark&quot;) || name.endsWith(&quot;:dark&quot;))
&gt; +            return name.substring(0, name.length() - 5);
&gt; +        return name;
&gt; +    }
&gt; +
&gt; +    GUniqueOutPtr&lt;char&gt; themeNameSetting;
&gt; +    g_object_get(gtk_widget_get_settings(m_viewWidget), &quot;gtk-theme-name&quot;, &amp;themeNameSetting.outPtr(), nullptr);
&gt; +    String name = String::fromUTF8(themeNameSetting.get());
&gt; +    if (name.endsWith(&quot;-dark&quot;))
&gt; +        return name.substring(0, name.length() - 5);
&gt; +    return name;
&gt; +}

Why does this have to be done in UI process instead of the web process? I was thinking we would do it in the RenderThemeGtk singleton function, so it takes effect exactly once per process, before rendering anything. Then you wouldn&apos;t have to remove the web process theme monitor. Is there a problem with that?

I&apos;m OK with removing the web process theme monitor if this really needs to move to the UI process, I just don&apos;t see why it does.

&gt; Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:58
&gt; +        // Ignore the GTK_THEME environment variable, the theme is always set by the UI process now.
&gt; +        g_unsetenv(&quot;GTK_THEME&quot;);

You can&apos;t mutate the environment after XInitThreads(). It&apos;s not safe.

Prior to this point, we have the g_usleep() -- which probably doesn&apos;t initialize threads, but we don&apos;t know for sure that will never change -- and the AuxiliaryProcessMainBase constructor, and libgcrypt initialization in Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp. I would move this to the top of WebProcessMain.cpp. Even if doing it at the top of this constructor is totally safe -- I think it is, because our platformInitialize() is currently called before InitializeWebKit2(), putting it there would be dangerous because any of that could change in the future. Mutating the environment is so exceptionally dangerous that it&apos;s just not worth messing around with this. The top of main() in WebProcessMain.cpp is always going to be safe, so definitely makes sense to do it there.

&gt; Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:60
&gt;          gtk_init(nullptr, nullptr);

GTK actually uses a library constructor to unset environment variables, to avoid crashes that could occur if it were to do so in gtk_init(). On Windows, where library constructors aren&apos;t available, it risks crashing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612194</commentid>
    <comment_count>21</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-28 14:48:12 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #20)
&gt; Thanks Carlos, this was a huge help. I&apos;ll test it soon to verify it fixes
&gt; older unpatched Evolution, and to check out its behavior in Cassidy&apos;s test
&gt; cases.

OK, it fixes the Evolution/Geary regression as expected. Great!

It also fixes Cassidy&apos;s third test in comment #3, dark style, which was previously broken.

It badly fails Cassidy&apos;s first two tests though (neither of which passed before). Test #1 (no style) is now worse than before because it now uses black text (as desired) instead of light text (not desired) on a dark background (not desired). Test #2 (some style) is a little better than before, but still pretty bad. We need to pass these tests to be web-compatible. The problem is that you&apos;ve now fixed the text color and all the form controls, but the background color is still wrong because the web process background is transparent, so the web content is displayed over the UI process&apos;s dark background instead of the light web process background. That is, everything is now perfect except for the background, and the background is only wrong because it is still drawn using the UI process theme!

I&apos;m going to give r+ because your patch moves us far in the desired direction. Everything except the background now works as desired, which is much better than before. We&apos;ll probably get new bug reports from users once this lands though, because dark mode users are going to see more dark text on dark background than they did before this patch. So after this patch lands, then a full, complete fix for all our dark mode problems would simply require rendering a default web view background in the web process, instead of allowing the UI process background color to peek through. So I plan to close all existing dark mode bugs and open one new bug for the background. Do you agree? And: is the background something you&apos;d have time to work on?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612348</commentid>
    <comment_count>22</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-01-29 00:55:36 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #20)
&gt; Comment on attachment 389004 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=389004&amp;action=review
&gt; 
&gt; Thanks Carlos, this was a huge help. I&apos;ll test it soon to verify it fixes
&gt; older unpatched Evolution, and to check out its behavior in Cassidy&apos;s test
&gt; cases.
&gt; 
&gt; &gt; LayoutTests/platform/gtk/css-dark-mode/default-colors-expected.txt:9
&gt; &gt; -PASS Body text color is white 
&gt; &gt; -FAIL View base background color is a dark grey assert_equals: expected &quot;rgb(30, 30, 30)&quot; but got &quot;rgb(51, 57, 59)&quot;
&gt; &gt; +FAIL Body text color is white assert_equals: expected &quot;rgb(255, 255, 255)&quot; but got &quot;rgb(0, 0, 0)&quot;
&gt; &gt; +FAIL View base background color is a dark grey assert_equals: expected &quot;rgb(30, 30, 30)&quot; but got &quot;rgb(255, 255, 255)&quot;
&gt; 
&gt; I have a dream that one day, we can make this pass. One day....

Once we stop using GTK theme, I guess.

&gt; &gt; Source/WebCore/ChangeLog:10
&gt; &gt; +        guads should be enough.
&gt; 
&gt; guards

Ooops.

&gt; &gt; Source/WebKit/ChangeLog:11
&gt; &gt; +        Handle the theme changes in the UI process, converting dark variant to the light one before sending the theme
&gt; &gt; +        name to the web process. The web process is still notified when a dark theme is in use, so that if website
&gt; &gt; +        prefers a dark color scheme it will be used, but the gtk theme that will be used for controls styling will
&gt; &gt; +        always be light.
&gt; 
&gt; I wrote a very long comment on why you should not do this, but checking
&gt; Cassidy&apos;s example, maybe you&apos;re right and this is actually safe and amazing.

This seems to be what other browsers do, according to the screenshots in the demos. When it&apos;s properly implemented it looks great, like the web inspector in dark mode.

&gt; I had failed to realize that other browser&apos;s dark modes are actually using
&gt; light form controls (except Firefox on Linux, at least in Cassidy&apos;s old
&gt; screenshots; I think Emilio mentioned that needs to be fixed). So maybe this
&gt; is perfect. I will test.

Looks consistent and fixes the problem of unreadable form controls.

&gt; &gt; Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:598
&gt; &gt; +    if (name.endsWith(&quot;-dark&quot;))
&gt; 
&gt; Why aren&apos;t you also checking for &quot;:dark&quot; here? Mistake?

That&apos;s what we currently do, I think :dark is only used in the env var, but not in theme name settings.

&gt; &gt; Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:601
&gt; &gt; +String PageClientImpl::themeName() const
&gt; &gt; +{
&gt; &gt; +    if (auto* themeNameEnv = g_getenv(&quot;GTK_THEME&quot;)) {
&gt; &gt; +        String name = String::fromUTF8(themeNameEnv);
&gt; &gt; +        if (name.endsWith(&quot;-dark&quot;) || name.endsWith(&quot;:dark&quot;))
&gt; &gt; +            return name.substring(0, name.length() - 5);
&gt; &gt; +        return name;
&gt; &gt; +    }
&gt; &gt; +
&gt; &gt; +    GUniqueOutPtr&lt;char&gt; themeNameSetting;
&gt; &gt; +    g_object_get(gtk_widget_get_settings(m_viewWidget), &quot;gtk-theme-name&quot;, &amp;themeNameSetting.outPtr(), nullptr);
&gt; &gt; +    String name = String::fromUTF8(themeNameSetting.get());
&gt; &gt; +    if (name.endsWith(&quot;-dark&quot;))
&gt; &gt; +        return name.substring(0, name.length() - 5);
&gt; &gt; +    return name;
&gt; &gt; +}
&gt; 
&gt; Why does this have to be done in UI process instead of the web process?

We need to override the theme to force a light variant in the web process. Once you have overriden the theme by setting the gtk-theme-name setting, you don&apos;t get notifications when the theme is changed in the system. So, the theme monitor in the web process does nothing.

&gt; I
&gt; was thinking we would do it in the RenderThemeGtk singleton function, so it
&gt; takes effect exactly once per process, before rendering anything. Then you
&gt; wouldn&apos;t have to remove the web process theme monitor. Is there a problem
&gt; with that?

Yes, it doesn&apos;t work after setting the theme manually.

&gt; I&apos;m OK with removing the web process theme monitor if this really needs to
&gt; move to the UI process, I just don&apos;t see why it does.
&gt; 
&gt; &gt; Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:58
&gt; &gt; +        // Ignore the GTK_THEME environment variable, the theme is always set by the UI process now.
&gt; &gt; +        g_unsetenv(&quot;GTK_THEME&quot;);
&gt; 
&gt; You can&apos;t mutate the environment after XInitThreads(). It&apos;s not safe.
&gt; 
&gt; Prior to this point, we have the g_usleep() -- which probably doesn&apos;t
&gt; initialize threads, but we don&apos;t know for sure that will never change -- and
&gt; the AuxiliaryProcessMainBase constructor, and libgcrypt initialization in
&gt; Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp. I would move
&gt; this to the top of WebProcessMain.cpp. Even if doing it at the top of this
&gt; constructor is totally safe -- I think it is, because our
&gt; platformInitialize() is currently called before InitializeWebKit2(), putting
&gt; it there would be dangerous because any of that could change in the future.
&gt; Mutating the environment is so exceptionally dangerous that it&apos;s just not
&gt; worth messing around with this. The top of main() in WebProcessMain.cpp is
&gt; always going to be safe, so definitely makes sense to do it there.

I&apos;ll move it.

&gt; &gt; Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:60
&gt; &gt;          gtk_init(nullptr, nullptr);
&gt; 
&gt; GTK actually uses a library constructor to unset environment variables, to
&gt; avoid crashes that could occur if it were to do so in gtk_init(). On
&gt; Windows, where library constructors aren&apos;t available, it risks crashing.

I don&apos;t understand this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612350</commentid>
    <comment_count>23</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-01-29 01:08:04 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #21)
&gt; (In reply to Michael Catanzaro from comment #20)
&gt; &gt; Thanks Carlos, this was a huge help. I&apos;ll test it soon to verify it fixes
&gt; &gt; older unpatched Evolution, and to check out its behavior in Cassidy&apos;s test
&gt; &gt; cases.
&gt; 
&gt; OK, it fixes the Evolution/Geary regression as expected. Great!

\o/

&gt; It also fixes Cassidy&apos;s third test in comment #3, dark style, which was
&gt; previously broken.
&gt; 
&gt; It badly fails Cassidy&apos;s first two tests though (neither of which passed
&gt; before).

They work fine here, I&apos;m getting the same results than the screenshots (expect the WebKitGTK and Firefox on Linux, of course).

&gt; Test #1 (no style) is now worse than before because it now uses
&gt; black text (as desired) instead of light text (not desired) on a dark
&gt; background (not desired).

Background shouldn&apos;t be dark, it&apos;s white here.

&gt; Test #2 (some style) is a little better than
&gt; before, but still pretty bad. We need to pass these tests to be
&gt; web-compatible. The problem is that you&apos;ve now fixed the text color and all
&gt; the form controls, but the background color is still wrong because the web
&gt; process background is transparent, so the web content is displayed over the
&gt; UI process&apos;s dark background instead of the light web process background.
&gt; That is, everything is now perfect except for the background, and the
&gt; background is only wrong because it is still drawn using the UI process
&gt; theme!

 #if HAVE(OS_DARK_MODE_SUPPORT)
-#if PLATFORM(COCOA)
-    static const auto cssValueControlBackground = CSSValueAppleSystemControlBackground;
-#else
-    static const auto cssValueControlBackground = CSSValueWindow;
-#endif
-    Color baseBackgroundColor = backgroundColor.valueOr(RenderTheme::singleton().systemColor(cssValueControlBackground, styleColorOptions()));
+    Color baseBackgroundColor = backgroundColor.valueOr(RenderTheme::singleton().systemColor(CSSValueAppleSystemControlBackground, styleColorOptions()));
 #else
     Color baseBackgroundColor = backgroundColor.valueOr(Color::white);
 #endif

This reverts changes made in r244635, so now we always use white. Please, check OS_DARK_MODE_SUPPORT is not defined in your build.

&gt; I&apos;m going to give r+ because your patch moves us far in the desired
&gt; direction. Everything except the background now works as desired, which is
&gt; much better than before. We&apos;ll probably get new bug reports from users once
&gt; this lands though, because dark mode users are going to see more dark text
&gt; on dark background than they did before this patch. So after this patch
&gt; lands, then a full, complete fix for all our dark mode problems would simply
&gt; require rendering a default web view background in the web process, instead
&gt; of allowing the UI process background color to peek through. So I plan to
&gt; close all existing dark mode bugs and open one new bug for the background.
&gt; Do you agree? And: is the background something you&apos;d have time to work on?

Yes, I can work on it if I can reproduce it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612355</commentid>
    <comment_count>24</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-01-29 01:49:41 -0800</bug_when>
    <thetext>Committed r255342: &lt;https://trac.webkit.org/changeset/255342&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612426</commentid>
    <comment_count>25</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-29 06:54:49 -0800</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #22)
&gt; &gt; &gt; Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:60
&gt; &gt; &gt;          gtk_init(nullptr, nullptr);
&gt; &gt; 
&gt; &gt; GTK actually uses a library constructor to unset environment variables, to
&gt; &gt; avoid crashes that could occur if it were to do so in gtk_init(). On
&gt; &gt; Windows, where library constructors aren&apos;t available, it risks crashing.
&gt; 
&gt; I don&apos;t understand this.

It&apos;s simple! gtk_init() is a library call, so it has no way to guarantee that it will be called before the application creates a secondary thread. And you know that you cannot mutate the environment after threads are created, because setenv() and unsetenv() are &quot;MT-Unsafe const:env&quot; (meaning: cannot be used in multithreaded programs unless you guarantee no other threads ever use getenv(), which is wildly unrealistic and never possible for a library to guarantee). I&apos;m sure you&apos;re well aware of that, because we discussed it many times in the past. :) So by using a library constructor, GTK guarantees it can call unsetenv() before application code ever runs. The only way this fails is if another library uses a library constructor that decides to initialize threads.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612432</commentid>
    <comment_count>26</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-29 07:23:05 -0800</bug_when>
    <thetext>It occurs to me that there is one thing Cassidy&apos;s examples don&apos;t check: the color-scheme CSS property (formerly supported-color-schemes). Now, we can&apos;t support that until the distant future arrives, once we have an HTML theme that doesn&apos;t depend on GTK.

If that is set by the website, then we should draw form controls using the OS&apos;s dark theme. I think. Cassidy, any chance you have time to investigate this further, in a new bug report? It would be helpful to have a fourth test case that makes use of color-schemes and does not use prefers-color-scheme at all, and maybe a fifth that uses both. Does that make sense?

(In reply to Carlos Garcia Campos from comment #23)
&gt; This reverts changes made in r244635, so now we always use white. Please,
&gt; check OS_DARK_MODE_SUPPORT is not defined in your build.

I will check. It doesn&apos;t seem likely, but I don&apos;t know how else to explain hte difference in behavior we are seeing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612435</commentid>
    <comment_count>27</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-29 07:34:19 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #26)
&gt; It occurs to me that there is one thing Cassidy&apos;s examples don&apos;t check: the
&gt; color-scheme CSS property (formerly supported-color-schemes). Now, we can&apos;t
&gt; support that until the distant future arrives, once we have an HTML theme
&gt; that doesn&apos;t depend on GTK.

BTW, it&apos;s currently only implemented by Safari: https://caniuse.com/#search=color-scheme. Other browsers only have prefers-color-scheme. So it&apos;s not a big deal that it will be a long time before we can make it work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612562</commentid>
    <comment_count>28</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-29 11:14:23 -0800</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #23)
&gt;  #if HAVE(OS_DARK_MODE_SUPPORT)
&gt; -#if PLATFORM(COCOA)
&gt; -    static const auto cssValueControlBackground =
&gt; CSSValueAppleSystemControlBackground;
&gt; -#else
&gt; -    static const auto cssValueControlBackground = CSSValueWindow;
&gt; -#endif
&gt; -    Color baseBackgroundColor =
&gt; backgroundColor.valueOr(RenderTheme::singleton().
&gt; systemColor(cssValueControlBackground, styleColorOptions()));
&gt; +    Color baseBackgroundColor =
&gt; backgroundColor.valueOr(RenderTheme::singleton().
&gt; systemColor(CSSValueAppleSystemControlBackground, styleColorOptions()));
&gt;  #else
&gt;      Color baseBackgroundColor = backgroundColor.valueOr(Color::white);
&gt;  #endif
&gt; 
&gt; This reverts changes made in r244635, so now we always use white. Please,
&gt; check OS_DARK_MODE_SUPPORT is not defined in your build.

Just to confirm, you are testing Cassidy&apos;s example https://cassidyjames.com/dark-demo/ with Adwaita Dark and you and you are seeing a white background on that page? Testing again with a clean build, it&apos;s definitely dark here. It doesn&apos;t make any sense why we would see different behavior in a basic test like this.

And it doesn&apos;t matter whether my build defines OS_DARK_MODE_SUPPORT because after your change, that is only ever used in *.mm files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612595</commentid>
    <comment_count>29</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-29 11:50:38 -0800</bug_when>
    <thetext>I decided not to report a new bug for the color-schemes property. We can deal with it later if desired, or not.

(In reply to Michael Catanzaro from comment #28)
&gt; And it doesn&apos;t matter whether my build defines OS_DARK_MODE_SUPPORT because
&gt; after your change, that is only ever used in *.mm files.

So I write, immediately after quoting a code example that uses it in FrameView.cpp. I&apos;m hopeless. I was grepping under Source/WebKit instead of toplevel Source/. Whoops. I did a rebuild using #error to be 100% certain it&apos;s not somehow defined. It&apos;s not. Let&apos;s continue in bug #206953.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612690</commentid>
    <comment_count>30</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-29 14:37:44 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #29)
&gt; Let&apos;s continue in bug #206953.

It was caused by Ephy calling webkit_web_view_set_background_color(). :)

Seems we are done here. Carlos, you fixed a huge number of longstanding bugs all at once. Awesome!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612703</commentid>
    <comment_count>31</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-29 14:53:49 -0800</bug_when>
    <thetext>BTW, at the risk of leaving seven Bugzilla comments in a row, we should have retitled the bug before landing. We landed this as:

[GTK] Should use light theme unless website declares support for dark themes in color-schemes property

But, in fact, we do not support color-schemes at all. Oh well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1776240</commentid>
    <comment_count>32</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-11 17:04:43 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #29)
&gt; I decided not to report a new bug for the color-schemes property. We can
&gt; deal with it later if desired, or not.

Bug #208204</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>389004</attachid>
            <date>2020-01-28 08:41:32 -0800</date>
            <delta_ts>2020-01-28 14:48:19 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>wk2-dark-mode.diff</filename>
            <type>text/plain</type>
            <size>26868</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0NoYW5nZUxvZyBiL0No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9BTkRfRVhQT1NFX1RPX0JVSUxEKEhBVkVf
T1NfREFSS19NT0RFX1NVUFBPUlQgMSkKIAogaWYgKFVTRV9XUEVfUkVOREVSRVIpCiAgICAgZmlu
ZF9wYWNrYWdlKFdQRSAxLjMuMCkK
</data>
<flag name="review"
          id="404689"
          type_id="1"
          status="+"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>