<?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>75638</bug_id>
          
          <creation_ts>2012-01-05 11:35:36 -0800</creation_ts>
          <short_desc>Unnecessary and incorrect invalidation about composited fixed-position layers</short_desc>
          <delta_ts>2012-02-09 12:04:22 -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>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>72078</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Xianzhu Wang">wangxianzhu</reporter>
          <assigned_to name="Xianzhu Wang">wangxianzhu</assigned_to>
          <cc>jamesr</cc>
    
    <cc>nduca</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>530477</commentid>
    <comment_count>0</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-01-05 11:35:36 -0800</bug_when>
    <thetext>Observed when a page containing composited fixed-position layers scrolls, the root layer is invalidated for the rects of the fixed-position layers. In addition, the coordinates of the invalidation rects are not properly offset to the actual scrolled position. This causes unnecessary repaint when scrolling near the top of the page, and incorrect (but no effect) invalidation when scrolling below.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530812</commentid>
    <comment_count>1</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-01-05 17:16:20 -0800</bug_when>
    <thetext>This bug is not Chromium-specific.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530864</commentid>
    <comment_count>2</comment_count>
      <attachid>121380</attachid>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-01-05 18:34:52 -0800</bug_when>
    <thetext>Created attachment 121380
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>531320</commentid>
    <comment_count>3</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-01-06 13:12:16 -0800</bug_when>
    <thetext>Example test page:

&lt;!DOCTYPE html&gt;
&lt;div style=&quot;top:30px; width:50px;height:50px;position:fixed;background-color:lightblue;-webkit-transform:translateZ(0)&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;height:2000px&quot;&gt;&lt;/div&gt;

data:url: data:text/html;charset=utf-8,%3C!DOCTYPE%20html%3E%0A%3Cdiv%20style%3D%22top%3A30px%3B%20width%3A50px%3Bheight%3A50px%3Bposition%3Afixed%3Bbackground-color%3Alightblue%3B-webkit-transform%3AtranslateZ(0)%22%3E%3C%2Fdiv%3E%0A%3Cdiv%20style%3D%22height%3A2000px%22%3E%3C%2Fdiv%3E

when I scroll this page up and down in a WebKit nightly with the Debug &quot;Show Composited Borders&quot; flag on I see the paint count on the root layer go up on every scroll.  This patch will fix that, right?

Any ideas about how to programatically test this, Simon?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>531336</commentid>
    <comment_count>4</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-01-06 13:28:05 -0800</bug_when>
    <thetext>Xianzhu - can you construct a repaint test (see LayoutTests/fast/repaint/fixed-scroll-simple.html as an example) that has a fixed position composited element? The expectations might look a little weird today in the chromium harness, but we can fix that later on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>533412</commentid>
    <comment_count>5</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-01-10 15:20:47 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Xianzhu - can you construct a repaint test (see LayoutTests/fast/repaint/fixed-scroll-simple.html as an example) that has a fixed position composited element? The expectations might look a little weird today in the chromium harness, but we can fix that later on.

fast/repaint/fixed-scroll-simple.html seems to ensure the view is correctly updated on scrolling. My change should not break it. However, when scrolling, the whole view should be updated, no matter if the layers are repainted or not. I&apos;m still wondering how to check if some area of a layer is repainted with the existing LayoutTestController API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>533526</commentid>
    <comment_count>6</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-01-10 17:38:39 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Xianzhu - can you construct a repaint test (see LayoutTests/fast/repaint/fixed-scroll-simple.html as an example) that has a fixed position composited element? The expectations might look a little weird today in the chromium harness, but we can fix that later on.
&gt; 
&gt; fast/repaint/fixed-scroll-simple.html seems to ensure the view is correctly updated on scrolling. My change should not break it. However, when scrolling, the whole view should be updated, no matter if the layers are repainted or not. I&apos;m still wondering how to check if some area of a layer is repainted with the existing LayoutTestController API.

That sounds like a known artifact of the chromium DumpRenderTree implementation - can you try in mac DRT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>552617</commentid>
    <comment_count>7</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-02-08 16:32:20 -0800</bug_when>
    <thetext>(In reply to comment #6) 
&gt; That sounds like a known artifact of the chromium DumpRenderTree implementation - can you try in mac DRT?

Sorry for no progress for a long time.

I&apos;m now confused with the expected pixel result of fixed-scroll-simple.html. On mac it&apos;s all covered with dark gray while on chromium it&apos;s not covered at all. To me the Chromium&apos;s seems more correct because the whole visible area of the window  should be repainted. Still have no idea about how to test updates of layers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553252</commentid>
    <comment_count>8</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-02-09 10:07:18 -0800</bug_when>
    <thetext>James, I think there is some fundamental issues about repaint tests, especially about scrolling. Do you agree to submit the patch first and add layout test later after the repaint test issue resolved?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553328</commentid>
    <comment_count>9</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-02-09 11:02:54 -0800</bug_when>
    <thetext>Yes, I think it&apos;s fine to land this bugfix.

I think the problems you&apos;re seeing with scrolling probably stem from using a non-windows chromium DRT. Repaint tests behavior oddly when scrolling in chromium platforms other than windows because we only support blit+backfill in DRT on windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553336</commentid>
    <comment_count>10</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-02-09 11:07:59 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Yes, I think it&apos;s fine to land this bugfix.
&gt; 
&gt; I think the problems you&apos;re seeing with scrolling probably stem from using a non-windows chromium DRT. Repaint tests behavior oddly when scrolling in chromium platforms other than windows because we only support blit+backfill in DRT on windows.

I also don&apos;t understand the expected result of fixed-scroll-simple.html on Mac (which is all masked with dark gray). I&apos;ve asked on webkit-dev, and I&apos;d like to work on the method proposed in the thread.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553394</commentid>
    <comment_count>11</comment_count>
      <attachid>121380</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-09 12:04:17 -0800</bug_when>
    <thetext>Comment on attachment 121380
patch

Clearing flags on attachment: 121380

Committed r107270: &lt;http://trac.webkit.org/changeset/107270&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553395</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-09 12:04:22 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>121380</attachid>
            <date>2012-01-05 18:34:52 -0800</date>
            <delta_ts>2012-02-09 12:04:17 -0800</delta_ts>
            <desc>patch</desc>
            <filename>75638</filename>
            <type>text/plain</type>
            <size>1587</size>
            <attacher name="Xianzhu Wang">wangxianzhu</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEwNDI2MCkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE4IEBACisyMDEyLTAxLTA1ICBYaWFuemh1
IFdhbmcgIDx3YW5neGlhbnpodUBjaHJvbWl1bS5vcmc+CisKKyAgICAgICAgVW5uZWNlc3Nhcnkg
YW5kIGluY29ycmVjdCBpbnZhbGlkYXRpb24gYWJvdXQgY29tcG9zaXRlZCBmaXhlZC1wb3NpdGlv
biBsYXllcnMKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lk
PTc1NjM4CisKKyAgICAgICAgV2hlbiBhIEZyYW1lVmlldyBzY3JvbGxzLCBjb21wb3NpdGVkIGZp
eGVkLXBvc2l0aW9uIGxheWVycyBzaG91bGQKKyAgICAgICAgbm90IGNvbnRyaWJ1dGUgdG8gdGhl
IGludmFsaWRhdGlvbiByZWN0IG9mIHRoZSByb290IGxheWVyLgorCisgICAgICAgIFJldmlld2Vk
IGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIE5vIG5ldyB0ZXN0cy4gSGF2ZW4ndCBmb3Vu
ZCBhIGdvb2Qgd2F5IHRvIHRlc3QgdGhpcyBwcm9ncmFtYXRpY2FsbH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Bjb250ZW50c1RvUm9vdFZpZXcodXBkYXRlUmVjdCk7CiAgICAgICAgIGlm
ICghaXNDb21wb3NpdGVkQ29udGVudExheWVyICYmIGNsaXBzUmVwYWludHMoKSkK
</data>

          </attachment>
      

    </bug>

</bugzilla>