Bug 18220
Summary: | XHTML MIME type breaks layouts | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kay Summers <ksosjq102> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | ap, mimisammarco |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 |
Kay Summers
If I send valid XHTML content as application/xhtml+xml rather than text/html, numerous things go horribly wrong with the layout, especially with the interpretation of the body tag.
A simple example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
</head>
<body style="margin: 0px; width: 100%; height: 100%; background-color: #bbb;">
Test
</body>
</html>
When sent as XHTML, WebKit refuses to paint the background color across the entire background. Additional content will evoke strange margin behavior all around and nothing will render as expected. When sent as HTML, it does the right thing.
The one and only reason I care about this is because sending documents as application/xhtml+xml is required in order to get inline SVG to work.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
The behavior seen on this test is correct: the body is only as high as its content is. See, for example, <http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html> and <http://www.mozilla.org/docs/web-developer/faq.html#xhtmldiff>.
The other differences that you are seeing might be bugs or expected behavior, no way to tell without a test case.
Matt Lilek
*** Bug 18503 has been marked as a duplicate of this bug. ***