Safari doesn't display a website with html { display:table; } correctly. Try the following example and resize the window: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style> html { display:table; } </style> </head> <body> </body> </html>
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.
Fixed by http://trac.webkit.org/changeset/61215