<?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>56767</bug_id>
          
          <creation_ts>2011-03-21 13:44:13 -0700</creation_ts>
          <short_desc>Differentiate scrollbar invalidations from page invalidations</short_desc>
          <delta_ts>2013-04-08 11:38:07 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>
          <dependson>57202</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrienne Walker">enne</reporter>
          <assigned_to name="Adrienne Walker">enne</assigned_to>
          <cc>bdakin</cc>
    
    <cc>enne</cc>
    
    <cc>jamesr</cc>
    
    <cc>nduca</cc>
    
    <cc>sam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>vangelis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>370874</commentid>
    <comment_count>0</comment_count>
    <who name="Adrienne Walker">enne</who>
    <bug_when>2011-03-21 13:44:13 -0700</bug_when>
    <thetext>Scrollbar invalidations are currently not explicitly differentiated from normal page invalidations.  FrameView::invalidateScrollbarRect calls FrameView::invalidateRect which then follows the normal invalidation path.  Because scrollbar invalidates get conflated with other invalidations, the root layer page/tiles (at least in Chromium) get needlessly redrawn under the scrollbar on scroll.  My general opinion is that scrollbars should be handled specially and should not be considered on the page.

These invalidations can be differentiated implicitly by looking at the position of the scrollbar and seeing if the invalidation is wholly contained with the scrollbar.  However, this approach hacky and short-sighted to me.  I&apos;d like not to have to guess whether an invalidation is intended for a scrollbar or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>372385</commentid>
    <comment_count>1</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-03-23 13:09:58 -0700</bug_when>
    <thetext>It seems like the best way to handle this would be to put scrollbars on their own composited layers and to route the invalidations there.  Currently invalidations sent to a ScrollableArea are differentiated (invalidateScrollbarRect() vs invalidateRect()) but the FrameView sends both types of invalidations to the FrameView&apos;s backing (host window or owningRenderer).

I&apos;ll try adding a new class to render the scrollbars that implements GraphicsLayerClient and can get inserted into the proper location in the composited layer tree, then teach the FrameView to route scrollbar invalidations to this object if it exists instead of the FrameView&apos;s backing.  This should help both for the current Chromium tiling implementation as well for Lion-style scrollbars that overlay the visual content area since it avoids unnecessarily invalidating parts of the content that may be expensive to re-render.  Does this approach seem sane?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>372430</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2011-03-23 14:18:48 -0700</bug_when>
    <thetext>I believe Simon Fraser was going to work on this pretty soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>372536</commentid>
    <comment_count>3</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-03-23 16:45:50 -0700</bug_when>
    <thetext>Awesome!  I&apos;ll start looking at this since I want to understand this area of the code better, but I don&apos;t want to slow you down, Simon, so lemme know if you want get this done quickly and know how.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>374157</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-03-27 09:30:14 -0700</bug_when>
    <thetext>Go ahead and take this.

Having ScrollableArea be a GraphicsLayerClient and making GraphicsLayers for scrollbars sounds like the right approach.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>