Bug 7697 - background-repeat in <a> tag not honored using negative background positioning (was: A problem with tables and images at imdb.com)
Summary: background-repeat in <a> tag not honored using negative background positionin...
Status: RESOLVED DUPLICATE of bug 5399
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P3 Normal
Assignee: Nobody
URL: http://imdb.com/nowplaying/
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2006-03-10 03:38 PST by Daniele Metilli
Modified: 2006-05-11 11:46 PDT (History)
1 user (show)

See Also:


Attachments
Reduction (802 bytes, text/html)
2006-03-10 03:39 PST, Daniele Metilli
no flags Details
Reduced test case (324 bytes, text/html)
2006-04-26 23:42 PDT, Alex Taylor
no flags Details
Reduced test case no. 3 (340 bytes, text/html)
2006-05-11 10:59 PDT, jonathanjohnsson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniele Metilli 2006-03-10 03:38:18 PST
The link is just for reference, see the reduction instead.

The center image renders incorrectly: there shouldn't be that yellow part inside the blue part.
The problem is related to the "no-repeat" in the "background" style attribute of the center image.

In Firefox it renders correctly if you don't remove the "no-repeat".
In WebKit it always renders incorrectly. Somehow, WebKit is ignoring that "no-repeat".

This bug could be related to 7691 since both have to do with "background".
Comment 1 Daniele Metilli 2006-03-10 03:39:30 PST
Created attachment 6983 [details]
Reduction

This is the best I could do. Probably it could be reduced more.
Comment 2 Daniele Metilli 2006-03-10 03:43:12 PST
I forgot to say that this happens in the latest nightly build (13244) and also in the last stable version of Safari (the one included in Mac OS X 10.4.5). I don't know about the previous versions.
Comment 3 Daniele Metilli 2006-03-26 06:29:05 PST
No one has confirmed this yet, so I'll explain the problem better:

1 - Go to http://imdb.com/nowplaying/
2 - Look at the yellow "search IMDb" on the upper left, just below the IMDb logo.
3 - Part of it goes over the blue image that says "now playing".

This happens in the latest nightly (r13482). It doesn't happen in Firefox.
Comment 4 Alexey Proskuryakov 2006-03-26 09:08:41 PST
I think that this could indeed benefit from further reduction, changing the keyword accordingly.
Comment 5 Alex Taylor 2006-04-26 23:42:20 PDT
Created attachment 7990 [details]
Reduced test case

Reduced test case, appears to be related to negative positioning and no-repeat as well as a height on the element.
Comment 6 jonathanjohnsson 2006-05-11 10:56:19 PDT
Nice reduction, Alex. I changed it a bit to make the problem more visible. The picture is now 80x80, and the pixel values have changed (maybe not better, but it's a nicer picture :) )

The problem seems to be that if the size of the <a> tag is the exact same, or smaller, than the picture size, *and* the positioning of the background image has a negative value, then the "no-repeat" value of the background isn't honored. 

The x and y directions are independent, i.e. if the above criteria only holds for the x direction, the "no-repeat" value will still be honored in the y direction.

I think picture with distinct, different colored, borders would make it easier to see exactly what happens when the positioning is changed.

Changing to P3 as this is just a cosmetic problem.
Comment 7 jonathanjohnsson 2006-05-11 10:59:13 PDT
Created attachment 8243 [details]
Reduced test case no. 3
Comment 8 jonathanjohnsson 2006-05-11 11:46:39 PDT
This is a duplicate of bug 5399.

*** This bug has been marked as a duplicate of 5399 ***