Closed Bug 125477 Opened 22 years ago Closed 21 years ago

css background image can overflow table when background-position is set to center center

Categories

(Core :: Layout, defect, P4)

x86
BeOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 157303
Future

People

(Reporter: stuart, Assigned: attinasi)

References

()

Details

(Keywords: css1, platform-parity, testcase, Whiteboard: [CSS1-5.3.6])

Attachments

(3 files, 1 obsolete file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8+)
Gecko/20020207
BuildID:    20020207

The submitted URL exhibits overflow of it's table header backround images.

This can be replicated with the following code.  To test requires a file bg.jpg
large enough to overflow the table 
http://www.scanlinez.org/skinz/ehazard/bg.jpg should suffice.
In the sample css this is stored at /common
--------------file style1.css---------------------

.news_th
	{ background-image: url(file:///common/bg.jpg); border: 1px #000000 solid; }

.brnews_th
{ background-image: url(file:///common/bg.jpg); background-position: center
center; border: 1px #000000 solid;  }


----------------file test.html-----------------------------

<html><head>
<link rel="stylesheet" href="style1.css"></head>

<H3> Broken css (may need to reload to show breakage as sometimes gets it right
on initial load)</H3>

<table width="40%">
<tbody><tr><th class="brnews_th">Recent news stories</th></tr>
</tbody></table>

<H3>Working css</31>

<table width="40%">
<tbody><tr><th class="news_th">Recent news stories</th></tr>
</tbody></table>
</html>


Reproducible: Always
Steps to Reproduce:
1.Copy bg.jpg to /common
2.save style1.css and test.html to a directory together
3.load test.html
4.hit reload

Actual Results:  The top table will have the image spilling out of the left and top.

Expected Results:  Both tables should look the same.
roc, would this be more of the transparent view breakage you found with the
"scrolling div" bug?
I don't think this is a view problem. It's more likely to be a layout/CSS
rendering problem. Someone should bugzillafy the test case...
zip containing files mentioned in the original bug report
Confirmed.  This happens on my build, which was updated earlier this week.
Status: UNCONFIRMED → NEW
Ever confirmed: true
There's a way of putting this in Bugzilla directly. First you attach the style
file, then you update the links in the HTML to refer to the bugzilla attachment
style file, then you attach the HTML.
Attachment #69619 - Attachment is obsolete: true
WFM using 2002021403 build on WinXP.
Target Milestone: --- → Future
This is a BeOS only bug!
Changing Priority
Priority: -- → P4
Attachment #69620 - Attachment mime type: application/octet-stream → text/css
Keywords: css1, pp, testcase
Whiteboard: [CSS1-5.3.6]
Original test case seems to work for me now in phoenix build available from
www.bebits.com (phoenix 5.5) not sure if earlier builds also fix this issue. 
Probably worth checking nightlys to see if it is specific updates in the
experimental gfx library that has fixed this or whether issue is fixed in main
source.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Stuart, it definitely needs testing on standard build.
Experimental gfx directly adresses among others two bugs reported here:
http://bugzilla.mozilla.org/show_bug.cgi?id=144112 - reason was wrong (exceeding
real by 1) dimensions of polysgons( used for border drawing)
and
http://bugzilla.mozilla.org/show_bug.cgi?id=157303 - reason was missing clipping
for DrawImage and DrawTile(used for background drawing) due to transition of
those methods (gfx2 issue) from nsRenderingContext to nsImage.
So if this works for Phoenix and don't for standard build, it must be marked as
dup of one of those two instead WORKSFORME
Simon, is this just that issue you tried to demonstrate me with Demo 3 and 4 in
tests?
Looking at the source for 3, there is no CSS for centre align (but this might be
in one of the default CSS files moz always uses?)

Anyway, both the testcase here and 3+4 WORKSFORME with your new gfx lib, so I
guess they were both related to the missing clipping functions in draw image.
This is Netserver nightly from 31 Jan, I just swapped back to the old gfx lib
and I can see the problem. With the new lib, it is fixed.

Very probably due to the clipping thing, therefore should be a dup of 157303, IMO
reopening to mark as DUP
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
resolved as dup of 157303

*** This bug has been marked as a duplicate of 157303 ***
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: