Closed
Bug 127654
Opened 24 years ago
Closed 23 years ago
Bad calculation of height using tag "<object>"
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
RESOLVED
WORKSFORME
Future
People
(Reporter: sarbona, Assigned: attinasi)
Details
Attachments
(1 file)
|
1007 bytes,
text/html
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)
BuildID: 2002021303
When loading a html page the browser reserves 4 additional pixels for a
tag "<object>".
After loading the page, even after executing onload event (sometimes), it
recalcs the height of "<object>" and takes out this 4 additional pixels.
This causes me a big problem, because I can't know the correct position of
relative objects while loading a page, even in the onload event.
Reproducible: Always
Steps to Reproduce:
Load a page with the following code:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<script language="javascript">
function calc()
{
alert (
"offsetLeft = " +
document.getElementById("sample").offsetLeft + "\n" +
"offsetTop = " + document.getElementById
("sample").offsetTop + "\n"
);
}
</script>
</head>
<body onload="calc()">
<table border="1">
<tr><td>Sample of how "object" tag modifies relative offsets</td></tr>
<tr>
<td>
<table border="1">
<tr>
<td><img width="350" height="76"></td>
<td>
<object width="350" height="76"
border="0" id="object1" VIEWASTEXT>
<embed
type="application/x-shockwave-flash" width="350" height="76"></embed>
</object>
</td>
</tr>
</table>
</td>
</tr>
<tr><td><div id="sample" style="position:relative;">Sample
DIV</div></td></tr>
</table>
<script language="javascript">
calc();
</script>
<br><br>
<a href="javascript:calc()">Calc</a>
</body>
</html>
Actual Results: You will see the following:
- First alert always tells you: 13,134
- Second alert tells you: 13,134 (normally) and 13,130 (sometimes)
- If you click "calc" always tells you: 13,130
I supose that the data shown in the 2nd alert depends on how fast is your PC,
but I am not sure.
Expected Results: 1st alert, 2nd alert and "calc" alert must show all the same
data:
13,130
If not, I am not able to calc the position of the objects while loading pages
or even when loaded, and the position of dynamic objects will be unexpected.
Comment 1•24 years ago
|
||
->Layout
Assignee: asa → attinasi
Component: Browser-General → Layout
QA Contact: doronr → petersen
Comment 2•24 years ago
|
||
bug 106602 looks alike.
Comment 3•24 years ago
|
||
Umm bug 106602 has to do with percentages.. this one was defined without them.
Confirmed with build ID 20020227 on XP.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•24 years ago
|
Priority: -- → P3
Target Milestone: --- → Future
Comment 6•23 years ago
|
||
Comment 7•23 years ago
|
||
I get 13,128 for all three alerts with a current Linux build.
Marking worksforme, but please reopen if this is still a problem.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•