<?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>112454</bug_id>
          
          <creation_ts>2013-03-15 10:32:25 -0700</creation_ts>
          <short_desc>RenderBox::backgroundIsKnownToBeOpaqueInRect is wrong for &lt;body&gt; element under certain conditions</short_desc>
          <delta_ts>2013-03-22 10:15:41 -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>Layout and Rendering</component>
          <version>528+ (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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>70634</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Alok Priyadarshi">alokp</reporter>
          <assigned_to name="Alok Priyadarshi">alokp</assigned_to>
          <cc>jamesr</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>vangelis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>856084</commentid>
    <comment_count>0</comment_count>
      <attachid>193334</attachid>
    <who name="Alok Priyadarshi">alokp</who>
    <bug_when>2013-03-15 10:32:25 -0700</bug_when>
    <thetext>Created attachment 193334
Test case

RenderBox::backgroundIsKnownToBeOpaqueInRect looks at the CSS background to determine if the RenderBox is opaque. This works for all elements except the &lt;body&gt; element if:
1. The &lt;body&gt; element is composited
2. The &lt;html&gt; element does not have a background

In this case &lt;body&gt; background is not painted and you can see through any elements under the &lt;body&gt;.

In the attached example &lt;body&gt; border is painted over the underlying &lt;div&gt;, but the background is not. In this case &lt;body&gt; element is not opaque. As soon as you add a background to the &lt;html&gt; element, the body background gets painted and becomes opaque.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>858820</commentid>
    <comment_count>1</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2013-03-19 15:47:53 -0700</bug_when>
    <thetext>I don&apos;t see any regression with the test case. Are there some additional steps to reproduce?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>858873</commentid>
    <comment_count>2</comment_count>
    <who name="Alok Priyadarshi">alokp</who>
    <bug_when>2013-03-19 16:52:02 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; I don&apos;t see any regression with the test case. Are there some additional steps to reproduce?

I did not find it straightforward to create a &quot;repaint&quot; test case. The attached html page is not really a test case, but rather an example where &lt;body&gt; render-box should not be considered opaque.

Please see the latest patch for https://bugs.webkit.org/show_bug.cgi?id=70634. In particular the function skipBodyBackground() and two test cases - body-background-painted and body-background-skipped. Without skipBodyBackground() logic, body-background-skipped will fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>861618</commentid>
    <comment_count>3</comment_count>
    <who name="Alok Priyadarshi">alokp</who>
    <bug_when>2013-03-22 10:15:41 -0700</bug_when>
    <thetext>This was fixed in r146531.
http://trac.webkit.org/changeset/146531</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>193334</attachid>
            <date>2013-03-15 10:32:25 -0700</date>
            <delta_ts>2013-03-15 10:32:25 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>underbody.html</filename>
            <type>text/html</type>
            <size>354</size>
            <attacher name="Alok Priyadarshi">alokp</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KICBib2R5IHsNCiAgICBi
YWNrZ3JvdW5kLWNvbG9yOiBibHVlOw0KICAgIHdpZHRoOiA0MDBweDsNCiAgICBoZWlnaHQ6IDQw
MHB4Ow0KICAgIGJvcmRlcjogc29saWQgNXB4IHJlZDsNCiAgfQ0KICAjdW5kZXJib2R5IHsNCiAg
ICBwb3NpdGlvbjogZml4ZWQ7DQogICAgei1pbmRleDogLTE7DQogICAgd2lkdGg6IDUwMHB4Ow0K
ICAgIGhlaWdodDogNTAwcHg7DQogICAgYmFja2dyb3VuZC1jb2xvcjogZ3JlZW47DQogIH0NCjwv
c3R5bGU+DQo8L2hlYWQ+DQo8Ym9keT4NCjxkaXYgaWQ9InVuZGVyYm9keSI+PC9kaXY+DQo8L2Jv
ZHk+DQo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>