Bug 21482
Summary: | HTML OBJECT given height:150px and width:300px by default? | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jon@Chromium <jon> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 | ||
URL: | http://www.winserver.com/public/aup/default.htm |
Jon@Chromium
This is blocking Chromium see http://code.google.com/p/chromium/issues/detail?id=2210
For some reason this object which has no visible representation is given a default height and width. This results in the rest of the content of the page being substantially lower than expected on the page. Unfortunately, a popular documentation tool generates these pages. Using CSS to explicitly set a width and height resolves the problem.
URLs (if applicable) : http://www.winserver.com/aupinfo
Other browsers tested:
Safari 3: Not Tested
Firefox 3: Not Tested
IE 7: Not Tested
IE 6: OK
Firefox 1.5: OK
Opera 9.27: OK
K-meleon 1.2: OK
o What steps will reproduce the problem?
Create a simple web page and add <object> tag to after the <BODY> tag and
before some viewable display you EXPECT to be at the top of the page.
Example:
<html>
<head>
<style>body {margin: 5px; border: 2px solid black;}</style>
</head>
<body>
<object></object>
<H2>Welcome to whatever...............</H2>
</body>
</html>
Open the page with Chrome.
o What is the expected result?
The <H2> tag is rendered at the top of the page.
o What happens instead?
It appears CHROME is given <OBJECT> some (random?) width and height and is
rendering the <H2> at some location other than the top.
The workaround was to get the object a default style height and width.
OBJECT {
width: 0px; height: 0px;
}
Attached is the screen shot for the above example.
NOTE: THIS IS IMPORTANT.
Many people use HTMLHELP to create Windows CHM Help files for their
products and they may also copy the *.HTM source file to their WEB SITE for
online viewing. Just like we do at the http://www.winserver.com/aupinfo
url. I suggest only Safari and Chrome will have this problem.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Sam Weinig
Replaced elements without a given width or hight are defined to be 300px x 150px. I believe this is works as expected.
Mark Rowe (bdash)
*** This bug has been marked as a duplicate of 16841 ***