<?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>188891</bug_id>
          
          <creation_ts>2018-08-23 10:38:27 -0700</creation_ts>
          <short_desc>REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent</short_desc>
          <delta_ts>2018-12-19 17:28:14 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Timothy Hatcher">timothy</reporter>
          <assigned_to name="Timothy Hatcher">timothy</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1453115</commentid>
    <comment_count>0</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2018-08-23 10:38:27 -0700</bug_when>
    <thetext>&lt;rdar://problem/42344352&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1453117</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-08-23 10:38:45 -0700</bug_when>
    <thetext>&lt;rdar://problem/43648659&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1453118</commentid>
    <comment_count>2</comment_count>
      <attachid>347934</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2018-08-23 10:41:00 -0700</bug_when>
    <thetext>Created attachment 347934
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1453120</commentid>
    <comment_count>3</comment_count>
      <attachid>347934</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-08-23 10:41:47 -0700</bug_when>
    <thetext>Comment on attachment 347934
Patch

Needs a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460645</commentid>
    <comment_count>4</comment_count>
      <attachid>347934</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2018-09-18 10:41:10 -0700</bug_when>
    <thetext>Comment on attachment 347934
Patch

Yesterday and this morning I tried to write an API test for this. I was not able to recreate the bug in the test harness -- only in Mail. 

In the test runner, rootBackgroundColorOrTransparencyChanged() ends upon getting called with extendedBackgroundColorChanged as true and then false in short succession. So the bad early return was blocking updateRootLayerConfiguration() first, but then ends up getting it scheduled soon after then the color does not change.

Maybe you have a suggestion on how to write a test for this, but I&apos;m at a loss.

Can we just get this landed? Reverting the bad part of r232991 and returning us to the old behavior of no early return.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460646</commentid>
    <comment_count>5</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2018-09-18 10:42:11 -0700</bug_when>
    <thetext>Typo fix: &quot;...scheduled soon after when the color does not change.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460655</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-09-18 11:11:42 -0700</bug_when>
    <thetext>You should be able to change view transparency in a layout test, then dump the graphics layer tree to show the &quot;contentsOpaque&quot; on the page tile layers (assuming we can dump them. if not, make a way to dump them!).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460673</commentid>
    <comment_count>7</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2018-09-18 11:48:50 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #6)
&gt; You should be able to change view transparency in a layout test, then dump
&gt; the graphics layer tree to show the &quot;contentsOpaque&quot; on the page tile layers
&gt; (assuming we can dump them. if not, make a way to dump them!).

That is what I was doing, but with an API test. And it wasn&apos;t triggering the problem observed in Mail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1461086</commentid>
    <comment_count>8</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2018-09-19 12:46:50 -0700</bug_when>
    <thetext>I get the same results in a layout test as I did with the API test -- I can&apos;t reproduce  the bug. The contentsOpaque flag always get cleared.

Before:
(GraphicsLayer
  (anchor 0.00 0.00)
  (bounds 785.00 1024.00)
  (children 1
    (GraphicsLayer
      (bounds 785.00 1024.00)
      (contentsOpaque 1)
      (tile cache coverage 0, 0 785 x 1024)
      (tile size 785 x 512)
      (top left tile 0, 0 tiles grid 1 x 2)
      (in window 1)
    )
  )
)

After setDrawsBackground(false):
(GraphicsLayer
  (anchor 0.00 0.00)
  (bounds 785.00 1024.00)
  (children 1
    (GraphicsLayer
      (bounds 785.00 1024.00)
      (tile cache coverage 0, 0 785 x 1024)
      (tile size 785 x 512)
      (top left tile 0, 0 tiles grid 1 x 2)
      (in window 1)
    )
  )
)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1461087</commentid>
    <comment_count>9</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2018-09-19 12:49:40 -0700</bug_when>
    <thetext>My test used an internals.setDrawsBackground(false) that triggers the same code path Mail is using.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489628</commentid>
    <comment_count>10</comment_count>
      <attachid>347934</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-12-19 17:28:12 -0800</bug_when>
    <thetext>Comment on attachment 347934
Patch

Clearing flags on attachment: 347934

Committed r239414: &lt;https://trac.webkit.org/changeset/239414&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489629</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-12-19 17:28:14 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>347934</attachid>
            <date>2018-08-23 10:41:00 -0700</date>
            <delta_ts>2018-12-19 17:28:12 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-188891-20180823104100.patch</filename>
            <type>text/plain</type>
            <size>2239</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM1MjI5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMDVmMmFlMjBjNDY1ZTQ4
ZDBhNTEzYzU1Zjc2YTQyY2UwNzY3ODc2OC4uNmUyNTZmMWZiNzQzODllMDRkOTliMmY5ZjgwOTk3
MGYwMzI4NjQzNiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDE4LTA4LTIzICBUaW1v
dGh5IEhhdGNoZXIgIDx0aW1vdGh5QGFwcGxlLmNvbT4KKworICAgICAgICBSRUdSRVNTSU9OIChy
MjMyOTkxKTogU3dpdGNoaW5nIHRvIGRhcmsgbW9kZSBpbiBNYWlsIGRvZXMgbm90IHVwZGF0ZSB0
aGUgbWVzc2FnZSB2aWV3IHRvIGJlIHRyYW5zcGFyZW50CisgICAgICAgIGh0dHBzOi8vYnVncy53
ZW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ZEJhY2tncm91bmRDb2xvci5pc1ZhbGlkKCkpCisgICAgICAgICAgICAgICAg
bV9sYXllckZvck92ZXJoYW5nQXJlYXMtPnNldEN1c3RvbUFwcGVhcmFuY2UoR3JhcGhpY3NMYXll
cjo6Q3VzdG9tQXBwZWFyYW5jZTo6U2Nyb2xsaW5nT3ZlcmhhbmcpOworICAgICAgICB9CiAjZW5k
aWYKICAgICB9CiAgICAgCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>