WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 8423
html { display:table; } renders incorrectly (and underpaints)
https://bugs.webkit.org/show_bug.cgi?id=8423
Summary
html { display:table; } renders incorrectly (and underpaints)
Thomas Steinacher
Reported
2006-04-16 05:42:40 PDT
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>
Attachments
test case
(101 bytes, text/html)
2008-02-20 12:21 PST
,
Robert Blaut
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Dave Hyatt
Comment 1
2006-09-12 23:36:42 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.
mitz
Comment 2
2008-02-20 12:10:14 PST
(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>).
mitz
Comment 3
2008-02-20 12:10:22 PST
***
Bug 17314
has been marked as a duplicate of this bug. ***
Robert Blaut
Comment 4
2008-02-20 12:21:38 PST
Created
attachment 19233
[details]
test case
Ian 'Hixie' Hickson
Comment 5
2008-03-20 12:26:28 PDT
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'.
Dave Hyatt
Comment 6
2008-03-20 14:40:04 PDT
Yeah we currently only allow the root element to be a block.
mitz
Comment 7
2008-03-20 14:45:24 PDT
(In reply to
comment #6
)
> Yeah we currently only allow the root element to be a block. >
See
comment #2
Dave Hyatt
Comment 8
2008-03-20 15:15:57 PDT
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); }
mitz
Comment 9
2008-04-16 00:13:42 PDT
***
Bug 11577
has been marked as a duplicate of this bug. ***
mitz
Comment 10
2008-04-16 00:13:49 PDT
***
Bug 18524
has been marked as a duplicate of this bug. ***
mitz
Comment 11
2010-03-16 07:40:59 PDT
See also
bug 36163
.
Simon Fraser (smfr)
Comment 12
2010-06-15 15:01:14 PDT
Fixed by
http://trac.webkit.org/changeset/61215
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug