Bug 12729

Summary: box-shadow disappears when scrolling a div that it falls on/under
Product: WebKit Reporter: Alexander Kempgen <alex>
Component: Layout and RenderingAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, dev+webkit, info, jon, lucas, mitz, timothy, webkit-bugs
Priority: P2 Keywords: HasReduction, InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 12203    
Attachments:
Description Flags
testcase
none
Alternate testcase
none
First cut
none
Fixed :first-line and scrolling dimensions inconsistency
none
Fix most box-shadow repaint issues hyatt: review+

Description Alexander Kempgen 2007-02-10 17:56:47 PST
scrolling a div that has overlay: auto makes box-shadows that might be behind that div disappear
Comment 1 Alexander Kempgen 2007-02-10 17:57:33 PST
Created attachment 13114 [details]
testcase
Comment 2 David Kilzer (:ddkilzer) 2007-02-10 18:01:13 PST
Confirmed with local debug build of WebKit r19554 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).

Comment 3 mitz 2007-02-10 22:38:18 PST
box-shadow is currently completely unaccounted for in dirty rect calculation. This will be easier to change once WebCore's notion of "overflow" becomes strictly visual overflow. There's a patch attached to bug 12123 that does that.
Comment 4 Lucas Newman 2007-04-09 17:52:17 PDT
Created attachment 13995 [details]
Alternate testcase

I've added an attachment that animates a box with a shadow across the window, which leaves a visible trail because the dirty rect calculations do not include shadows as mentioned.
Comment 5 Lucas Newman 2007-04-09 18:36:12 PDT
<radr://problem/5122659> WebKit: -webkit-box-shadow does not clear shadow rect correctly when repainting
Comment 6 mitz 2007-04-10 08:27:11 PDT
*** Bug 12832 has been marked as a duplicate of this bug. ***
Comment 7 Jonathan del Strother 2007-04-30 03:14:31 PDT
*** Bug 13319 has been marked as a duplicate of this bug. ***
Comment 8 mitz 2007-05-08 22:48:36 PDT
*** Bug 13633 has been marked as a duplicate of this bug. ***
Comment 9 mitz 2007-05-16 11:24:00 PDT
*** Bug 13748 has been marked as a duplicate of this bug. ***
Comment 10 mitz 2007-05-18 09:25:31 PDT
Created attachment 14608 [details]
First cut

Still missing tests.

There is an inconsistency in how boxes with shadow affect scroll dimensions, since overflow is factored into {rightmost,leftmost,lowest}Position for normal boxes but not for overflow boxes.

The bigger issue, though, is that due to Core Graphics bugs, sometimes damage is not repaired even though the right rect was invalidated and all the painting code executed. Specifically, I verified using a standalone app that CG will not paint the the blurred part of the shadow if the non-blurred part and the object casting the shadow are entirely above or to the right of the damage rect.

Another CG bug is that sometimes that shadow is painted at a smaller offset than requested (bug 12943).
Comment 11 mitz 2007-05-18 09:37:58 PDT
Also failing a :first-line { -webkit-box-shadow: ... } test case.
Comment 12 mitz 2007-05-18 10:27:02 PDT
Created attachment 14609 [details]
Fixed :first-line and scrolling dimensions inconsistency
Comment 13 mitz 2007-05-18 13:08:20 PDT
Created attachment 14612 [details]
Fix most box-shadow repaint issues

Reviewable.

What's not included: (1) inline-flow layers (those are broken for outlines already); (2) in quirks mode if you have an inline flow with no text children, vertical overflow isn't updated correctly; (3) WebKit magic that fixes Core Graphics bugs.
Comment 14 Dave Hyatt 2007-05-18 15:33:08 PDT
Comment on attachment 14612 [details]
Fix most box-shadow repaint issues

r=me
Comment 15 Mark Rowe (bdash) 2007-05-19 17:40:07 PDT
Landed in r21605.