Bug 3998

Summary: Absolutely positioned backgrounds tile incorrectly
Product: WebKit Reporter: John Whittet <john>
Component: CSSAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Minor CC: ian, mitz, mrowe
Priority: P2    
Version: 312.x   
Hardware: Mac   
OS: OS X 10.3   
URL: http://basseq.com/fun/safari/bgtestcase.html
Attachments:
Description Flags
Screenshot - Normal
none
Screenshot - Bug Manifested
none
Test Case - HTML + image
none
Test case to show both x- and y-axis behavior of bug
none
image file for test case
none
image file for test case
none
Modified test case to show various background bug scenarios
none
Update of attachment 10536
none
Update of attachment 10536 none

John Whittet
Reported 2005-07-14 10:02:57 PDT
The bug occurs when a background is positioned on the body element at absolute coordinates and given a background-repeat value of repeat-y or no-repeat. When the window's width is reduced to less than that of the background image, the image appears to tile using a different background-repeat value (repeat-x for no-repeat and repeat for repeat-y). Neither the x or y-coordinates seem to matter. The width of the background image appears to only affect the minimum width of the window before the bug will manifest itself. The height of the image does not seem to matter. This does not appear to occur in the y-direction (height of the background + height of the window + repeat-x/no-repeat).
Attachments
Screenshot - Normal (65.80 KB, application/pdf)
2005-07-14 10:03 PDT, John Whittet
no flags
Screenshot - Bug Manifested (44.40 KB, application/pdf)
2005-07-14 10:08 PDT, John Whittet
no flags
Test Case - HTML + image (19.70 KB, application/zip)
2005-07-14 10:09 PDT, John Whittet
no flags
Test case to show both x- and y-axis behavior of bug (12.21 KB, application/zip)
2006-05-17 16:39 PDT, John Lascurettes
no flags
image file for test case (401 bytes, image/gif)
2006-09-13 10:39 PDT, John Lascurettes
no flags
image file for test case (914 bytes, image/gif)
2006-09-13 10:39 PDT, John Lascurettes
no flags
Modified test case to show various background bug scenarios (3.50 KB, text/html)
2006-09-13 10:42 PDT, John Lascurettes
no flags
Update of attachment 10536 (1.97 KB, text/html)
2006-09-21 13:50 PDT, John Lascurettes
no flags
Update of attachment 10536 (1.92 KB, text/html)
2006-09-21 14:00 PDT, John Lascurettes
no flags
John Whittet
Comment 1 2005-07-14 10:03:59 PDT
Created attachment 2960 [details] Screenshot - Normal
John Whittet
Comment 2 2005-07-14 10:08:52 PDT
Created attachment 2962 [details] Screenshot - Bug Manifested
John Whittet
Comment 3 2005-07-14 10:09:56 PDT
Created attachment 2963 [details] Test Case - HTML + image
Stuart Morgan
Comment 4 2005-09-04 13:57:54 PDT
Confirmed in 9/2 ToT.
John Lascurettes
Comment 5 2006-05-17 16:38:04 PDT
Bug actually manifests itself on the y-axis as well when the background is applied to a DIV. Attaching a test case...
John Lascurettes
Comment 6 2006-05-17 16:39:06 PDT
Created attachment 8378 [details] Test case to show both x- and y-axis behavior of bug
John Lascurettes
Comment 7 2006-05-17 16:40:55 PDT
Comment on attachment 8378 [details] Test case to show both x- and y-axis behavior of bug The behavior seems to be fixed in later WebKit builds. Should be marked as fixed?
Alexey Proskuryakov
Comment 8 2006-05-17 21:47:56 PDT
The original test case (from bug URL) still fails for me in ToT. See also: bug 3237.
John Lascurettes
Comment 9 2006-05-19 10:10:32 PDT
Ah, yes. I see it happens on the BODY element still when the declaration is set to repeat-y; however, if I set it to no-repeat, it behaves as it should in ToT with the first attachment (id=2962). Experimenting a bit, the x-axis seems perfectly stable as well (setting the position such that it would reveal a bug in repeat-y if the body height was smaller than the height of background image). So it seems isolated to making a repeat-y declaration and not a declaration of no-repeat now.
John Lascurettes
Comment 10 2006-05-19 10:12:56 PDT
(In reply to comment #9) Sorry, I meant attachment 2963 [details].
John Lascurettes
Comment 11 2006-05-19 10:30:35 PDT
Further exploration shows the bug for the background declaration on the BODY behaves exactly the same if applied instead to the HTML or a DIV element as well. That is, if the background-repeat is set to repeat-y, the background can be made to repeat on the x-axis. If it is set to no-repeat, I do not see the bug manifest as originally described. There _is_ an additional behavior appearing on the y-axis that is evident if looked when the behavior is tested on a DIV element (see attachment 8378 [details]). If: - the background-repeat is set to no-repeat and - the height of the containing element is more than the height of the background image but - the height of the containing element is less than the height of the background image plus its vertical offset: - - then you will see that the overflow for the background of the containing element is visible (otherwise, if the element is taller or shorter than the dimensions shown above, it is hidden)
John Lascurettes
Comment 12 2006-09-13 10:39:02 PDT
Created attachment 10534 [details] image file for test case
John Lascurettes
Comment 13 2006-09-13 10:39:32 PDT
Created attachment 10535 [details] image file for test case
John Lascurettes
Comment 14 2006-09-13 10:42:34 PDT
Created attachment 10536 [details] Modified test case to show various background bug scenarios This modified test case shows various bugs depending on background position, including negative positioning.
John Lascurettes
Comment 15 2006-09-13 10:49:27 PDT
(In reply to comment #14) The test case attachment might require a window resizing in both Safari and Nightly Builds to properly reveal the bug in the far-upper-right table cell (+150%, large parent, small background-image).
Dave Hyatt
Comment 16 2006-09-19 03:34:19 PDT
I'm a bit overwhelmed by test cases here. Can you produce a minimal test case just illustrating precisely whatever bugs still occur in the nightlies?
John Lascurettes
Comment 17 2006-09-21 13:48:38 PDT
(In reply to comment #16) > I'm a bit overwhelmed by test cases here. Can you produce a minimal test case > just illustrating precisely whatever bugs still occur in the nightlies? Sorry about that. Attaching a new reduced test.
John Lascurettes
Comment 18 2006-09-21 13:50:23 PDT
John Lascurettes
Comment 19 2006-09-21 14:00:51 PDT
Created attachment 10693 [details] Update of attachment 10536 [details] Sorry, there were some errors in the content description of attachment 10692 [details]; the tests were still valid, now the descriptive text matches the actual markup.
mitz
Comment 20 2006-10-31 08:05:36 PST
*** Bug 11458 has been marked as a duplicate of this bug. ***
mitz
Comment 21 2007-02-02 06:52:25 PST
I think the patch for bug 5399 might address this. Need to check this bug again after that bug is fixed.
Mark Rowe (bdash)
Comment 22 2007-02-07 21:07:58 PST
Bug 5399 is fixed, so the status of this bug should be reevaluated.
John Lascurettes
Comment 23 2007-02-07 21:54:31 PST
(In reply to comment #22) > Bug 5399 is fixed, so the status of this bug should be reevaluated. > Is bug 5399 fixed? In the latest nightly downloaded 7 Feb 2007 the test case on that bug http://bugs.webkit.org/attachment.cgi?id=12355 still shows it broken. So does the test case I posted for this bug http://bugs.webkit.org/attachment.cgi?id=10693
Mark Rowe (bdash)
Comment 24 2007-02-07 21:56:09 PST
As per my comment in bug 5399: > The fix was landed less than an hour ago. The latest nightly build is older > than that which means it doesn't contain the fix. Please check again with the > next nightly build which should be available within the next half hour.
John Lascurettes
Comment 25 2007-02-07 23:13:36 PST
Yes, appears fixed.
Note You need to log in before you can comment on or make changes to this bug.