RESOLVED FIXED Bug 6278
REGRESSION: Incomplete repaint when table cell width changes during layout
https://bugs.webkit.org/show_bug.cgi?id=6278
Summary REGRESSION: Incomplete repaint when table cell width changes during layout
Rosyna
Reported 2005-12-28 14:45:40 PST
I'm getting significant relayout glitches on some webpages. At first I thought this was related to bug 5699 but I still get it (mostly at cnn.com) even when running ToT. It *seems* to be related to an image loading after a the page is first laid out, but one that changes the size of the surrounding area (such as one with no size being loaded and forcing a relayout). You can see what it produces at http://www.unsanity.org/ rosyna/imgs/repaint.png which I do not believe is the correct rendering (but I could very well be wrong). I also get this at http://blogs.msdn.com/ericgu/archive/2005/12/28/507854.aspx in which a piece of the blue stripe at the bottom appears about 40px above the stripe on the bottom.
Attachments
Fitness Experts pic (117.39 KB, image/png)
2005-12-28 16:18 PST, Geoffrey Garen
no flags
Reduction (1.39 KB, text/html)
2006-01-21 07:44 PST, mitz
no flags
Make the cell repaintObjectsBeforeLayout (3.27 KB, patch)
2006-01-25 09:59 PST, mitz
darin: review+
Eric Seidel (no email)
Comment 1 2005-12-28 14:48:11 PST
Rosyna
Comment 2 2005-12-28 14:58:05 PST
Does not look to be, as this error I am seeing gets "corrected" if I do a select all (which forces a repaint). The image one doesn't look like that would be fixed that way. And this seems to never happen with images. Plus, this error is always vertical in nature from my experience, never a horizontal or "splitting" error.
Geoffrey Garen
Comment 3 2005-12-28 16:18:13 PST
I see this @ http://www.cnn.com/2005/HEALTH/diet.fitness/12/28/winter.activekids.ap/index.html (pic attached). When the medpagetoday graphic loads, it smushes the "Fitness experts..." title, causing the title to re- layout and break into two lines. This pushes all the text below it down, but it looks like the original text doesn't get deleted before the new text draws.
Geoffrey Garen
Comment 4 2005-12-28 16:18:39 PST
Created attachment 5346 [details] Fitness Experts pic
David Kilzer (:ddkilzer)
Comment 5 2006-01-08 09:46:43 PST
This is a duplicate of Bug 3509. I can't seem to reproduce the glitches on unsanity.org or the MSDN blog today, but the CNN link in Comment 3 behaves exactly like Bug 3509. You may "fix" the rendering by doing a "Select All" operation on the web page, or by hiding Safari then switching back to it. *** This bug has been marked as a duplicate of 3509 ***
mitz
Comment 6 2006-01-21 03:00:03 PST
My fix for bug 3509 (which I am going to post soon) doesn't fix this bug (nor the remaining issue with the page from bug 6276), so I'm re-separating it.
mitz
Comment 7 2006-01-21 07:44:56 PST
Created attachment 5808 [details] Reduction
mitz
Comment 8 2006-01-21 07:46:06 PST
P1 since it's a regression.
mitz
Comment 9 2006-01-21 09:54:27 PST
In the reduced testcase, the left cell doesn't get invalidated before layout, since it is not marked as needing layout at that point (only the right cell is). If you initiate the change on the left cell (e.g. by doing document.getElementById('col1').style.width='500px'), then the left cell is marked as needing layout early on and therefore gets repainted before layout, and you don't get the buggy behavior. I have an ugly fix for this specific case but I think the problem may be more general (whenever an object gets marked as needing layout during relayout and its parent wasn't marked as needing layout for itself before), so I'm still trying to figure out a general solution.
mitz
Comment 10 2006-01-25 09:59:06 PST
Created attachment 5949 [details] Make the cell repaintObjectsBeforeLayout
Darin Adler
Comment 11 2006-01-25 18:34:38 PST
Comment on attachment 5949 [details] Make the cell repaintObjectsBeforeLayout I studied the checkForRepaintDuringLayout function and how it's called, and as far as I can see, this looks good. r=me
Alexey Proskuryakov
Comment 12 2006-01-26 02:56:29 PST
Landed, r12390.
Alexey Proskuryakov
Comment 13 2006-01-26 03:28:59 PST
BuildBot says three tests started to fail with this checkin: http://build.webkit.org/post-commit-powerpc-mac-os-x/builds/328/step-layout-test/0 Which is rather strange, because I did run layout tests before landing the patch.
Alexey Proskuryakov
Comment 14 2006-01-26 03:52:52 PST
False alarm - either the next update or a clean rebuild (I did both) has resolved this.
Eric Seidel (no email)
Comment 15 2006-01-31 21:20:40 PST
Removing Regression keyword from bugs already fixed.
Note You need to log in before you can comment on or make changes to this bug.