Bug 12729 - box-shadow disappears when scrolling a div that it falls on/under
Summary: box-shadow disappears when scrolling a div that it falls on/under
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: mitz
URL:
Keywords: HasReduction, InRadar
: 12832 13319 13633 13748 (view as bug list)
Depends on:
Blocks: 12203
  Show dependency treegraph
 
Reported: 2007-02-10 17:56 PST by Alexander Kempgen
Modified: 2007-05-19 17:40 PDT (History)
8 users (show)

See Also:


Attachments
testcase (626 bytes, text/html)
2007-02-10 17:57 PST, Alexander Kempgen
no flags Details
Alternate testcase (1.33 KB, text/html)
2007-04-09 17:52 PDT, Lucas Newman
no flags Details
First cut (12.15 KB, patch)
2007-05-18 09:25 PDT, mitz
no flags Details | Formatted Diff | Diff
Fixed :first-line and scrolling dimensions inconsistency (14.41 KB, patch)
2007-05-18 10:27 PDT, mitz
no flags Details | Formatted Diff | Diff
Fix most box-shadow repaint issues (151.31 KB, patch)
2007-05-18 13:08 PDT, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.