Closed Bug 280370 Opened 20 years ago Closed 19 years ago

{inc} Width of table varies when containing image and list

Categories

(Core :: Layout, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bugzillas+padREMOVETHISdu, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(5 files, 4 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I have an account in http://en.wikipedia.org/ where I've chosen the skin called
"standard". In the given URL, there is a picture of an insect within a table in
the right-side of the page.

With the standard skin, there is at times a 32-pixel gap between the left edges
of the table and the image and a 33-pixel gap between the right edges of the
image and table. At times the image fits neatly in the table with no intervening
gap, i.e. the behaviour is RANDOM.

If you don't have a login, a different skin "monobook" is used by the site, with
which firefox behaviour seems to be consistent (always a fixed padding of 6px
for the image).

Hence I will upload the HTML I get with "standard" skin with all relevant
relative URLs (mainly css and js) converted to absolute URLs.

Reproducible: Sometimes

Steps to Reproduce:
1. Open the HTML attachment I would be uploading.
2. Scroll down to the image.
3. Shift+reload and goto step 2 about 20 times.
Actual Results:  
At times the image has padding of 32/33 pixels, at times it doesn't.

Expected Results:  
Padding should be consistent between reloads.

Since the behaviour is random, I guessed this should be a bug in firefox rather
than the site.

My mozilla 1.3 with user-agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3)
Gecko/20030313 always shows the 32-px 33-px paddings.

I feel the behaviour depends on when the table is drawn and when the image
starts getting downloaded. If the table is drawn before the image sizes are
known, it ends up being smaller than the image width + 32 px + 33 px. Now after
the image is drawn the table is not expanded.

If instead the image is downloaded quickly (e.g. if it is in the cache), the
table is drawn with enough width allcated beforehand.
I tried to reproduce the problem after removing surrounding HTML code, but that
didn't work so I am attaching the entire HTML.
With the https:// used in bugzilla, there seems to be more chances of hitting
the no-padding case than with file://, which reinforces my belief that the
rendering depends on how quickly the image is downloaded.
I've stripped down the page a bit, and the "not padded image" shows here
something like 1 time every 20 reloads, a little too rare.

I've tried to build a testcase but with no luck.

I think that this bug should be moved to Core -> Layout: Tables

Tested on:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050125 Firefox/1.0+
Assignee: firefox → nobody
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression, testcase
OS: Linux → All
Summary: padding of image within table varies randomly on reload → {inc} Width of table varies when containing image and list
Attached file testcase
Attachment #172837 - Attachment is obsolete: true
Attachment #172877 - Attachment is obsolete: true
Seems to work now in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2)
Gecko/20050621 Firefox/1.0+. Can someone confirm?
worksforme too with linux suite trunk 2005062505
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Attached image Image for next attachment (obsolete) —
The previous attachments don't show properly since the image they referred to
in http://upload.wikimedia.org/ has since been moved
Bug is seen with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10)
Gecko/20050716 Firefox/1.0.6.

I think the earlier worksforme's were because all the testcases attached to this
bug referred to an image that no longer exists. The image is very important part
of the situation in which this bug occurs.

Reopening...
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Attachment #190232 - Attachment is obsolete: true
Comment on attachment 190233 [details]
update Jason's testcase with image on b.m.o server

><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
><HTML lang="en"><HEAD><TITLE>Insect - Wikipedia, the free encyclopedia</TITLE></HEAD>
>
><BODY>
>
><P>With Hyatt's trick just before the image</P>
><TABLE border="1">
>	<TBODY><TR>
>		<TD>
>			<SCRIPT type="text/javascript">var v = document.body.offsetHeight;</SCRIPT>
>			<IMG alt="" src="https://bugzilla.mozilla.org/attachment.cgi?id=190236"/>
>			<UL>
>				<LI>blah blah blah blah blah blah blah blah blah blah blah blah blah</LI>
>			</UL>
>		</TD>
>	</TR>
></TBODY></TABLE>
>
><P>Without Hyatt's trick</P>
><TABLE border="1">
>	<TBODY><TR>
>		<TD>
>			<IMG alt="" src="https://bugzilla.mozilla.org/attachment.cgi?id=190236"/>
>			<UL>
>				<LI>blah blah blah blah blah blah blah blah blah blah blah blah blah</LI>
>			</UL>
>		</TD>
>	</TR>
></TBODY></TABLE>
>
></BODY></HTML>
Comment on attachment 190233 [details]
update Jason's testcase with image on b.m.o server

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML lang="en"><HEAD><TITLE>Insect - Wikipedia, the free
encyclopedia</TITLE></HEAD>

<BODY>

<P>With Hyatt's trick just before the image</P>
<TABLE border="1">
	<TBODY><TR>
		<TD>
			<SCRIPT type="text/javascript">var v =
document.body.offsetHeight;</SCRIPT>
			<IMG alt=""
src="https://bugzilla.mozilla.org/attachment.cgi?id=190236"/>
			<UL>
				<LI>blah blah blah blah blah blah blah blah
blah blah blah blah blah</LI>
			</UL>
		</TD>
	</TR>
</TBODY></TABLE>

<P>Without Hyatt's trick</P>
<TABLE border="1">
	<TBODY><TR>
		<TD>
			<IMG alt=""
src="https://bugzilla.mozilla.org/attachment.cgi?id=190236"/>
			<UL>
				<LI>blah blah blah blah blah blah blah blah
blah blah blah blah blah</LI>
			</UL>
		</TD>
	</TR>
</TBODY></TABLE>

</BODY></HTML>
This one unlike Jason's attachment has to be shift+reloaded 20+ times. At times
the image has some padding and at times it doesn't (the latter is very very
rare).

What is interesting is in this more stripped down version of Angelo's testcase
whenever the image has padding the table border is gone! I'm not sure if that
is a separate bug though.

In short 19/20 of the time the table border is gone and 1/20 of the time the
padding to the image is gone.

BTW sorry for the earlier bugspam due to my not comprehending some of the more
unintuitive portions of the bugzilla UI.
Attachment #190237 - Attachment mime type: image/png → text/html
Last bugspam from me!

BTW can someone mark attachment #176680 [details] as obsoleted by attachment #190233 [details].
Attachment #190233 - Attachment is obsolete: true
> Bug is seen with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10)
> Gecko/20050716 Firefox/1.0.6.

Yes, but it works fine with current trunk builds, which is why I resolved it
worksforme.  I see the bug in your testcase with Mozilla 1.7.x, but not current
trunk (tested build 2005072205).  The gecko code in Mozilla 1.7.x (and Firefox
1.0.x) is ~1.5 years old, so it's best to test with trunk builds.
Status: REOPENED → RESOLVED
Closed: 20 years ago19 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: