Closed
Bug 106602
Opened 24 years ago
Closed 23 years ago
object frame doesn't always deal with % width/height correctly
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: frz, Assigned: peterlubczynski-bugs)
References
()
Details
(Keywords: testcase, topembed+)
Attachments
(2 files, 1 obsolete file)
489 bytes,
text/html
|
Details | |
3.06 KB,
patch
|
srgchrpv
:
review+
attinasi
:
superreview+
roc
:
approval+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; de-AT; rv:0.9.5) Gecko/20011011
BuildID: 2001101117
when viewing the page http://gba-planet.gamesbyte.de/board/flashwrong.html
(actually taken from www.neopets.com batlledome but to make it simpler I just
uploaded the wrong looking stuff) in mozilla the flash animation is stretched
over the whole page but it should be limited in size due to the tables
Reproducible: Always
Steps to Reproduce:
1. View the page
Actual Results: The animation is stretched over the whole page
Expected Results: The animation should be limited in size due to the tables
html:
<table align=center width=425 border=0 cellpadding=0 cellspacing=0><tr><td
width=160 align=right> </td></tr><tr><td width=160 height=150 align=center
valign=bottom></td><td><table width='100%' height='100' border='0'><tr><td
width='100%' height='100%'><object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"
width="100%" height="100%"><param name=movie
value="http://images.neopets.com/battledome/ranged_attacks/objects/587_right.swf"><param
name=quality value=high><param name="scale" value="exactfit"><embed
src="http://images.neopets.com/battledome/ranged_attacks/objects/587_right.swf"
quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" width="100%"
height="100%"></embed></object></td></table>
The html code does not look perfect to me. Say, you have two opening <table>
tags and only one closing. The same with other tags. Can you please fix that and
maybe make it simpler? I don't think we need the whole <object> tag to exhibit
the problem, if any.
Reporter | ||
Comment 2•24 years ago
|
||
Ooops sorry about that I somehow forgot it when I copied it from the original
page...
I made a cleaned up version of it here:
http://gba-planet.gamesbyte.de/board/flashwrong2.html (I hope I got the stuff
with the flash right...)
the basic idea behind this is that size of the animation is specified in %
(width="100%" height="100%") and a empty table field is used to resize the
animation... I think this is used so that the animation takes rougly the same
amount of space on the screen in all resultions... but I'm not shure...
I'm not 100% shure if this is a bug or just a completely wrong way of using
tables/flash animations... if this isn't a bug please excuse my stupidness...
The problem is not limited to plugins, the following code will also show it:
<table width="200" height="200" border="1">
<tr><td>
<img src="test.gif" width="100%" height="100%">
</td></tr>
</table>
NS4.x does it incorrectly too, but in different manner. IE scales image up or
down to fit 200x200. I think this is a desired behaviour.
Reassigning to Layout for taking a look.
Assignee: av → attinasi
Component: Plug-ins → Layout
QA Contact: shrir → petersen
Summary: flash animation is stretched over whole page and should be limited by tables → Objects in a table cell stretch over the cell dimensions
Assignee | ||
Comment 6•24 years ago
|
||
..taking bug..
I think this is caused by the the call to GetContainingBlock() in the percent
section of nsObjectFrame::GetDesiredSize().
Assignee: attinasi → peterlubczynski
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows 98 → All
Priority: -- → P3
Summary: Objects in a table cell stretch over the cell dimensions → object frame doesn't always deal with % width/height correctly
Target Milestone: --- → mozilla0.9.7
Assignee | ||
Comment 7•24 years ago
|
||
*** Bug 106902 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 8•24 years ago
|
||
------- Additional Comments From Andrei Volkov (av) 2001-10-26 09:53 -------
It could be related. Very interesting. Here is the code which would cause the
problem.
<img src="..." width=1 height=1 align=right>
<embed src="..." type="..." width=100% height=100%>
Status: NEW → ASSIGNED
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Comment 9•24 years ago
|
||
Just wanted to add that this affects W3's CSS1 Test Suite too. See for example
http://www.w3.org/Style/CSS/Test/current/sec11.htm - both Opera 6 and IE6 show
this correctly. Test case seems to use OBJECT with 100% for width and height.
Comment 10•24 years ago
|
||
hm, I also encountered this in the CSS1 testsuite - you can see it all over the
way there (http://www.w3.org/Style/CSS/Test/CSS1/). Also noticed same behavior
with Java applets. Very annoying thing, since there's sometimes no way to use
them then (e.g. java-chat applets). think this deserves inceased priority.
Comment 11•24 years ago
|
||
W3's CSS1 Test suite seems to be working with build ID 2002012403/win32. Also
Linux build seems to display those correctly. I'm not sure if W3 has done some
workaround or if this bug is fixed. No mention in the comments though.
Comment 12•24 years ago
|
||
just installed the new nightly (2002012608) after this report. checked before
and after installing the new build. css1 testcases WORKSFORME now! -
nevertheless java applets still look very strangely. the testcase i checked
against is http://groups.yahoo.com/group/angel_dust/chat on yahoo! groups.
unfortunatly you'll have to register to use this chat. maybe there'll be another
group not requireing this. i don't know - if someone finds some, please give
this as testcase.
Assignee | ||
Comment 14•24 years ago
|
||
Looks like we were trying to do the computation for for size instead of using
the one passed in by layout (mComputed).
Andrei, Serge, if yo get a chance, can you try this patch out with plugins and
let me know if you see anything broken?
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 15•23 years ago
|
||
Comment on attachment 70141 [details] [diff] [review]
possible fix?
Doesn't deal with this case correctly:
<table width=50 height=50><tr><td>
<div width="100%" height="100%"
<object width="100%" height="100%"
data="http://www.macromedia.com/shockwave/download/triggerpages/flash.swf"
xdata="http://www.mozilla.org/images/mozilla-banner.gif"
>
</object>
</div>
</td></td></table>
I'm going to take a closer look at how nsImageFrame::GetDesiredSize works and
try to mimic it.
Attachment #70141 -
Flags: needs-work+
Comment 16•23 years ago
|
||
Nominating for EDT.
I was testing the CSS1 Test suite at W3.org. It appears that they have modified
their pages to utilize the OBJECT element tag (this problem was not previously
evident). Here is one example page:
http://www.w3.org/Style/CSS/Test/CSS1/current/sec5502.htm
The actual test is contained in an OBJECT element tag that has been given height
and width values of 100%.
Expected result: The content should span 100% of the page.
Actual result: % values are not working correctly which cause content to be
contained in a small box with scrollbars. IE displays correctly.
Peter has a patch is is working on for the trunk. Nominating for EDT for
consideration of fixing on branch due to high visibility on w3.org site.
Keywords: edt0.9.4
Updated•23 years ago
|
Comment 17•23 years ago
|
||
except for the case : "<object width="100%" height="100%"" that Peter and
Christine mentioned ...
this patch is working fine...it has not caused any regressions. I tested it and
things look good.
Assignee | ||
Comment 18•23 years ago
|
||
IE doesn't even get the double percent case correct so I think I'd like to open
a new bug specifically on that issue and try to get this into the tree to get
more eyes on it and make the W3C CSS testcases usable again.
This new patch also fixes a leaking nsAtom. Please review.
Attachment #70141 -
Attachment is obsolete: true
Comment 19•23 years ago
|
||
Comment on attachment 72482 [details] [diff] [review]
updated patch
the patch looks good for me, especially compare to old one, where was a risk to
get a negative values for
- w -= 2*rect.x;
- h -= 2*rect.y;
r=serge
Attachment #72482 -
Flags: review+
Comment 20•23 years ago
|
||
Comment on attachment 72482 [details] [diff] [review]
updated patch
sr=attinasi
Attachment #72482 -
Flags: superreview+
Comment on attachment 72482 [details] [diff] [review]
updated patch
Approved in bug.
Attachment #72482 -
Flags: approval+
Assignee | ||
Comment 22•23 years ago
|
||
patch in trunk, marking FIXED
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Target Milestone: mozilla0.9.9 → mozilla1.0
Comment 23•23 years ago
|
||
Under the OS X (2002-04-17-03) build, I wasn't getting the flash animation to
appear using (Shockwave Flash NP-PPC version 5.0 r58). After installing updated
plugin (Shockwave Flash NP-PPC version 6.0 r23) , the flash animation now
appears on page
Comment 24•23 years ago
|
||
Marking verified in OS X trunk (2002-04-17-03) and Windows ME trunk
(2002-04-17-11) builds.
Status: RESOLVED → VERIFIED
Comment 25•23 years ago
|
||
*** Bug 131770 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•