VERIFIED FIXED 7301
Text shadow does not repaint correctly
https://bugs.webkit.org/show_bug.cgi?id=7301
Summary Text shadow does not repaint correctly
mitz
Reported 2006-02-16 07:29:22 PST
Text shadow is not accounted for in repaint. In the attached testcase, press Test to move the gray div and note how the part of the (blue) shadow that overflows the div is not erased from the old position nor painted in the new position.
Attachments
Testcase (172 bytes, text/html)
2006-02-16 07:30 PST, mitz
no flags
Patch w/o test and change log (3.07 KB, patch)
2006-03-20 12:43 PST, mitz
no flags
Patch w/o test and change log (3.11 KB, patch)
2006-03-21 09:57 PST, mitz
no flags
Incomplete patch (3.78 KB, patch)
2006-03-22 08:22 PST, mitz
no flags
Separate vertical overflow from vertical selection bounds and handle horizontal shadow overflow (14.20 KB, patch)
2006-03-25 11:38 PST, mitz
no flags
Patch including tests and change log (28.89 KB, patch)
2006-03-27 08:50 PST, mitz
darin: review+
mitz
Comment 1 2006-02-16 07:30:54 PST
Created attachment 6541 [details] Testcase
mitz
Comment 2 2006-03-20 12:43:28 PST
Created attachment 7193 [details] Patch w/o test and change log This patch fixes the repaint issues by treating the shadows as overflow. This has the side effect that the selection highlight also grows to cover the shadow, but on the other hand, it eats into the next line's highlighting.
mitz
Comment 3 2006-03-20 22:51:12 PST
The patch breaks the appearance of the "segmented control" in the Web Inspector: the selected segment's label is scrolled up.
mitz
Comment 4 2006-03-21 09:57:24 PST
Created attachment 7215 [details] Patch w/o test and change log
mitz
Comment 5 2006-03-22 08:22:34 PST
Created attachment 7231 [details] Incomplete patch This patch takes care of vertical overflow (with the side-effect on selection highlighting) and of horizontal overflow for InlineFlowBox (and blocks), but not for InlineTextBox itself. This means that if only the shadow is in the damage rect, it still won't be painted (e.g. if you highlight only "bar" in "<span style="text-shadow: green 10px 5px;">foo</span>bar"). A possible solution that won't involve adding data to InlineTextBox is to cache the max horizontal overflow per InlineFlowBox.
mitz
Comment 6 2006-03-25 11:38:17 PST
Created attachment 7295 [details] Separate vertical overflow from vertical selection bounds and handle horizontal shadow overflow This version addresses horizontal overflow and also separates vertical painting overflow from vertical selection bounds, so the selection highlight is not affected by shadows. As a bonus, it makes inline blocks with overflow repaint correctly. I removed parts of the previous patch that are now part of bug 7916, so this patch alone doesn't even fix this bug's test case. I also didn't make a test because I want to make an automated one once DumpRenderTree supports repaint tests.
mitz
Comment 7 2006-03-25 11:40:50 PST
Forgot to add that I think this mechanism could be used to fix bug 6274 once you figure out how to tell how far a given font can really paint.
mitz
Comment 8 2006-03-27 08:50:24 PST
Created attachment 7334 [details] Patch including tests and change log
Darin Adler
Comment 9 2006-03-30 08:42:41 PST
Comment on attachment 7334 [details] Patch including tests and change log It's sad that we have to add all these fields, but I think it's justified. r=me
mitz
Comment 10 2006-04-04 01:48:45 PDT
Verified in r13675 nightly.
Note You need to log in before you can comment on or make changes to this bug.