Summary: | Text shadow does not repaint correctly | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||
Status: | VERIFIED FIXED | ||||||||||||||||
Severity: | Normal | ||||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 420+ | ||||||||||||||||
Hardware: | Mac | ||||||||||||||||
OS: | OS X 10.4 | ||||||||||||||||
Attachments: |
|
Description
mitz
2006-02-16 07:29:22 PST
Created attachment 6541 [details]
Testcase
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.
The patch breaks the appearance of the "segmented control" in the Web Inspector: the selected segment's label is scrolled up. Created attachment 7215 [details]
Patch w/o test and change log
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.
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. 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. Created attachment 7334 [details]
Patch including tests and change log
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
Verified in r13675 nightly. |