RESOLVED FIXED 40142
REGRESSION (r52839): Incomplete repaint of IMG with text-align:center
https://bugs.webkit.org/show_bug.cgi?id=40142
Summary REGRESSION (r52839): Incomplete repaint of IMG with text-align:center
Cory Mintz
Reported 2010-06-03 14:53:41 PDT
Created attachment 57817 [details] Correct vs Incorrect painting. We noticed IMGs in our web software were not repainting correctly in Chrome 5, but worked in Safari 4.0.4. We narrowed it down to revision 52839. I'm having trouble reducing it down, but I'm still working on it. Attached is a screen shot showing what it looks like before and after revision 52839. I created a small video clip to demonstrate at http://albums.phanfare.com/isolated/F5944fka/1/4697732 You will notice that if I click on an "album" the thumbnail grid is redrawn, but the images at the end of the row do repaint in their entirty. As soon as they are interacted with, the missing portions snap in.
Attachments
Correct vs Incorrect painting. (31.37 KB, image/jpeg)
2010-06-03 14:53 PDT, Cory Mintz
no flags
Reduction (875 bytes, text/html)
2010-06-04 08:12 PDT, Cory Mintz
no flags
Reduction (Revised) (875 bytes, text/html)
2010-06-04 08:22 PDT, Cory Mintz
no flags
Test cased reduced even further; showing example of text-align right hiding image completely (565 bytes, text/html)
2010-08-30 12:47 PDT, Pierre-Antoine LaFayette
no flags
This should fix it. (1.02 KB, patch)
2010-09-01 15:23 PDT, Dave Hyatt
no flags
Contains two new layout tests as well as the original patch by dhyatt (9.18 KB, patch)
2010-09-02 14:28 PDT, Pierre-Antoine LaFayette
no flags
Revised patch with added layout tests (8.69 KB, patch)
2010-09-03 08:11 PDT, Pierre-Antoine LaFayette
no flags
PNG for block-layout-inline-children-replaced.html test case (22.55 KB, image/png)
2010-09-03 08:13 PDT, Pierre-Antoine LaFayette
no flags
PNG for block-layout-inline-children-float-positioned.html test case (21.82 KB, image/png)
2010-09-03 08:14 PDT, Pierre-Antoine LaFayette
no flags
Patch (43.71 KB, patch)
2010-09-03 14:51 PDT, Pierre-Antoine LaFayette
no flags
Patch (43.96 KB, patch)
2010-09-03 15:06 PDT, Pierre-Antoine LaFayette
no flags
Patch (44.16 KB, patch)
2010-09-03 15:30 PDT, Pierre-Antoine LaFayette
no flags
Cory Mintz
Comment 1 2010-06-04 08:12:03 PDT
Created attachment 57878 [details] Reduction Reduction attached. The reduction shows an IMG inside of a DIV. The IMG has text-align:center. With the correct sequence of steps the region the IMG would be in if it wasn't centered is repainted, rather than where it actually this. This causes the IMG to be clipped in half. Note: It's possible that the test case will work on first load and you will need to refresh the page.
Cory Mintz
Comment 2 2010-06-04 08:22:20 PDT
Created attachment 57881 [details] Reduction (Revised) Made variable names more clear.
James Robinson
Comment 3 2010-08-30 11:23:10 PDT
Looks (from quartz debug) that the repaint invalidation is the right size/shape but at the wrong offset.
Pierre-Antoine LaFayette
Comment 4 2010-08-30 12:34:24 PDT
If text-align:right is used the image is completely hidden when you refresh, this indicates that the text-align property is not affecting the offset of the dirty rect at all.
Cory Mintz
Comment 5 2010-08-30 12:47:07 PDT
Also, it is not limited to text-align. This came up because we were using this guys method to vertically center an image: http://www.brunildo.org/test/img_center.html This will cause the image to get cut vertically as well so you just see the top-left quadrant.
Pierre-Antoine LaFayette
Comment 6 2010-08-30 12:47:33 PDT
Created attachment 65941 [details] Test cased reduced even further; showing example of text-align right hiding image completely On Chrome 7.0.503.0, loading this file always hides the image completely. Selecting the area around the region makes the image reappear as seen in the demo video.
Dave Hyatt
Comment 7 2010-09-01 15:23:56 PDT
Created attachment 66290 [details] This should fix it. This should fix the issue. James. R's fix didn't really deal with the inline replaced element case. This just generalizes to all inline content.
Pierre-Antoine LaFayette
Comment 8 2010-09-01 15:41:19 PDT
Will write up a new test and upload the patch soon. Thanks for your help!
Pierre-Antoine LaFayette
Comment 9 2010-09-02 14:28:38 PDT
Created attachment 66412 [details] Contains two new layout tests as well as the original patch by dhyatt Adding new layout tests to dhyatt's patch.
Pierre-Antoine LaFayette
Comment 10 2010-09-03 08:11:51 PDT
Created attachment 66494 [details] Revised patch with added layout tests Contains layout tests and the bug fix.
Pierre-Antoine LaFayette
Comment 11 2010-09-03 08:13:10 PDT
Created attachment 66496 [details] PNG for block-layout-inline-children-replaced.html test case
Pierre-Antoine LaFayette
Comment 12 2010-09-03 08:14:13 PDT
Created attachment 66497 [details] PNG for block-layout-inline-children-float-positioned.html test case
WebKit Review Bot
Comment 13 2010-09-03 12:40:01 PDT
Attachment 66496 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 Total errors found: 0 in 0 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 14 2010-09-03 12:40:31 PDT
Attachment 66497 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 Total errors found: 0 in 0 files If any of these errors are false positives, please file a bug against check-webkit-style.
Pierre-Antoine LaFayette
Comment 15 2010-09-03 14:51:21 PDT
WebKit Review Bot
Comment 16 2010-09-03 14:52:36 PDT
Attachment 66548 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 LayoutTests/ChangeLog:11: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:14: Line contains tab character. [whitespace/tab] [5] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
James Robinson
Comment 17 2010-09-03 14:54:03 PDT
LayoutTests/ChangeLog has some indentation issues. WebCore/ChangeLog needs to include a one-line description and link to a bug before the full description. Otherwise, this looks great.
Pierre-Antoine LaFayette
Comment 18 2010-09-03 15:06:34 PDT
Darin Adler
Comment 19 2010-09-03 15:17:23 PDT
Comment on attachment 66554 [details] Patch The ChangeLog entry needs to include a link to this bug report. The patch is otherwise good.
Pierre-Antoine LaFayette
Comment 20 2010-09-03 15:30:59 PDT
WebKit Commit Bot
Comment 21 2010-09-03 18:28:26 PDT
Comment on attachment 66557 [details] Patch Rejecting patch 66557 from commit-queue. Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Darin Adler', u'--force']" exit_code: 255 Last 500 characters of output: ositioned.html patching file LayoutTests/fast/repaint/block-layout-inline-children-replaced.html patching file LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.checksum literal is only avaliable with the XS version at /Library/Perl/5.8.8/Compress/Zlib.pm line 9 BEGIN failed--compilation aborted at /Library/Perl/5.8.8/Compress/Zlib.pm line 9. Compilation failed in require at /Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/VCSUtils.pm line 1670. Full output: http://queues.webkit.org/results/3917084
Eric Seidel (no email)
Comment 22 2010-09-06 16:53:09 PDT
There is a problem with the perl install on the cq machine, which we've not been able to figure out yet. It has trouble with git binary patches as a result. I'll see if I can troubleshoot it again.
Eric Seidel (no email)
Comment 23 2010-09-13 21:23:03 PDT
Comment on attachment 66557 [details] Patch Sorry about the noise. The CQ bot was sick: bug 45723.
WebKit Commit Bot
Comment 24 2010-09-13 22:49:37 PDT
Comment on attachment 66557 [details] Patch Rejecting patch 66557 from commit-queue. Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Darin Adler', u'--force']" exit_code: 255 Last 500 characters of output: ositioned.html patching file LayoutTests/fast/repaint/block-layout-inline-children-replaced.html patching file LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.checksum literal is only avaliable with the XS version at /Library/Perl/5.8.8/Compress/Zlib.pm line 9 BEGIN failed--compilation aborted at /Library/Perl/5.8.8/Compress/Zlib.pm line 9. Compilation failed in require at /Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/VCSUtils.pm line 1670. Full output: http://queues.webkit.org/results/4004006
Eric Seidel (no email)
Comment 25 2010-09-14 03:58:05 PDT
Comment on attachment 66557 [details] Patch I believe it's fixed for real this time.
WebKit Commit Bot
Comment 26 2010-09-14 06:25:30 PDT
Comment on attachment 66557 [details] Patch Clearing flags on attachment: 66557 Committed r67463: <http://trac.webkit.org/changeset/67463>
WebKit Commit Bot
Comment 27 2010-09-14 06:25:36 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 28 2010-09-14 08:30:29 PDT
http://trac.webkit.org/changeset/67463 might have broken GTK Linux 32-bit Debug The following changes are on the blame list: http://trac.webkit.org/changeset/67464 http://trac.webkit.org/changeset/67463
Eric Seidel (no email)
Comment 29 2012-08-01 00:00:18 PDT
fast/repaint/block-layout-inline-children-float-positioned.html no longer renders quite like it did when you landed it. (Note how the text overlaps now: http://trac.webkit.org/browser/trunk/LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.png It looks like the results changed in: http://trac.webkit.org/changeset/96005 Which doesn't make a whole lot of sense to me. Are we sure our rendering is still correct?
Eric Seidel (no email)
Comment 30 2012-08-10 13:02:58 PDT
(In reply to comment #29) > fast/repaint/block-layout-inline-children-float-positioned.html no longer renders quite like it did when you landed it. (Note how the text overlaps now: > http://trac.webkit.org/browser/trunk/LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-float-positioned-expected.png > > It looks like the results changed in: > http://trac.webkit.org/changeset/96005 > > Which doesn't make a whole lot of sense to me. > > Are we sure our rendering is still correct? The rendering is clearly wrong. When you resize the window the text jumps from between teh left and the middle. Someone was recently working on align: center iirc.
Eric Seidel (no email)
Comment 31 2012-08-10 13:06:12 PDT
Interesting. Our current rendering matches FF, however FF does not jump the text between two positions when you resize the window like we do.
Note You need to log in before you can comment on or make changes to this bug.