<?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>51435</bug_id>
          
          <creation_ts>2010-12-21 17:22:50 -0800</creation_ts>
          <short_desc>Issues with ContextShadow</short_desc>
          <delta_ts>2010-12-21 21:32:37 -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>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alex</cc>
    
    <cc>helder</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>325284</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-12-21 17:22:50 -0800</bug_when>
    <thetext>I see some issues with ContextShadow:

1. Code cleanup:
 * Rename drawRectShadowWithoutTiling to drawUntiledRectShadow
 * Move tiled drawing code into drawRectShadowWithTiling
 * drawRectShadow() just calls one or the other

2. layer area calculation
  * the code that inflates the shadow rect by the radius happens in both drawRectShadow, and again down in calculateLayerBoundingRect. 
  * when drawRectShadow() calls calculateLayerBoundingRect, it passes the already-inflated rect, leading to double inflation, I think. This does not happen in the drawRectShadowWithoutTiling code path.

3. Clipping causes double inflation
  * the &quot;intersect with the clip&quot; code in calculateLayerBoundingRect can cause double inflation on sides of the shadow that are not clipped. I think you want to intersect with an inflated clip.

4. The comment for m_sourceRect is wrong. m_sourceRect can end up larger than the layer buffer when clipped. There is no member var that tracks the rect in the layer buffer to which blurring should be applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>