scrolling a div that has overlay: auto makes box-shadows that might be behind that div disappear
Created attachment 13114 [details] testcase
Confirmed with local debug build of WebKit r19554 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).
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.
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.
<radr://problem/5122659> WebKit: -webkit-box-shadow does not clear shadow rect correctly when repainting
*** Bug 12832 has been marked as a duplicate of this bug. ***
*** Bug 13319 has been marked as a duplicate of this bug. ***
*** Bug 13633 has been marked as a duplicate of this bug. ***
*** Bug 13748 has been marked as a duplicate of this bug. ***
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).
Also failing a :first-line { -webkit-box-shadow: ... } test case.
Created attachment 14609 [details] Fixed :first-line and scrolling dimensions inconsistency
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 on attachment 14612 [details] Fix most box-shadow repaint issues r=me
Landed in r21605.