Summary: | html { display:table; } renders incorrectly (and underpaints) | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Thomas Steinacher <eggdrop> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bugs-webkit, dev+webkit, eric, eroman, ian, mitz, simon.fraser, webkit | ||||
Priority: | P2 | Keywords: | HasReduction | ||||
Version: | 420+ | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
Attachments: |
|
Description
Thomas Steinacher
2006-04-16 05:42:40 PDT
We don't allow you to alter the display type of the root element, nor do we plan to, since the end results are too problematic to deal with. (In reply to comment #1) > We don't allow you to alter the display type of the root element, nor do we > plan to, since the end results are too problematic to deal with. I do not think this is enforced. The test case does lead to very broken rendering. Bug 17314 has another example (where the root element is not <html>). *** Bug 17314 has been marked as a duplicate of this bug. *** Created attachment 19233 [details]
test case
According to CSS2.1 'display' on the root element with any of the following values must be treated as 'block': inline, run-in, table-row-group, table-column, table-column-group, table-header-group, table-footer-group, table-row, table-cell, table-caption, inline-block. However, 'table', 'block', 'list-item', and 'none' must (according to the spec) be supported. (Also, 'inline-table' becomes 'table'.) See CSS2.1, 9.7 Relationships between 'display', 'position', and 'float'. Yeah we currently only allow the root element to be a block. (In reply to comment #6) > Yeah we currently only allow the root element to be a block. > See comment #2 Yeah, looks like we just require it to be a block-level element, so we're correct according to CSS2.1 (just with misrendering). This code in adjustRenderStyle enforces that: if (style->display() != BLOCK && style->display() != TABLE && style->display() != BOX && (style->position() == AbsolutePosition || style->position() == FixedPosition || style->floating() != FNONE || (e && e->document()->documentElement() == e))) { if (style->display() == INLINE_TABLE) style->setDisplay(TABLE); else if (style->display() == INLINE_BOX) style->setDisplay(BOX); else if (style->display() == LIST_ITEM) { // It is a WinIE bug that floated list items lose their bullets, so we'll emulate the quirk, // but only in quirks mode. if (!m_strictParsing && style->floating() != FNONE) style->setDisplay(BLOCK); } else style->setDisplay(BLOCK); } *** Bug 11577 has been marked as a duplicate of this bug. *** *** Bug 18524 has been marked as a duplicate of this bug. *** See also bug 36163. |