Bug 21673

Summary: help text left aligned instead of right
Product: WebKit Reporter: jasneet <jasneet>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: jasneet, macpherson, robert
Priority: P2    
Version: 525.x (Safari 3.1)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
testcase none

jasneet
Reported 2008-10-16 14:37:16 PDT
I Steps: Go to the attached testcase II Issue: "text-align: right" makes text "Help" right aligned in IE and "float: right" makes text "Help" right aligned in FF. Chrome/Safari don't apply either of them. III Other Browsers: IE7: ok FF3: ok IV Nightly tested: 37604
Attachments
testcase (386 bytes, text/html)
2008-10-16 14:37 PDT, jasneet
no flags
jasneet
Comment 1 2008-10-16 14:37:38 PDT
Created attachment 24426 [details] testcase
Luke Macpherson
Comment 2 2011-10-11 17:45:36 PDT
The test case needs further reduction in my opinion. The bug appears to be that when a table cell has style="float: right;" it should have a computed style of "display: block; float: right;" according to http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo . Instead webkit is showing a computed style of "display: table-cell; float: none;". I believe that this is a legitimate bug, so marking it new.
Robert Hogan
Comment 3 2012-10-02 11:00:57 PDT
This is a WebKit quirk, see Source/WebCore/css/StyleResolver.cpp: void StyleResolver::adjustRenderStyle(RenderStyle* style, RenderStyle* parentStyle, Element *e) { ASSERT(parentStyle); // Cache our original display. style->setOriginalDisplay(style->display()); if (style->display() != NONE) { // If we have a <td> that specifies a float property, in quirks mode we just drop the float // property. // Sites also commonly use display:inline/block on <td>s and <table>s. In quirks mode we force // these tags to retain their display types. if (!m_checker.strictParsing() && e) { if (e->hasTagName(tdTag)) { style->setDisplay(TABLE_CELL); style->setFloating(NoFloat); } else if (e->hasTagName(tableTag)) style->setDisplay(style->isDisplayInlineType() ? INLINE_TABLE : TABLE); } The problem goes away if you add: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> to the test. So I believe this bug is invalid - WebKit is conformant if the site requires it.
Note You need to log in before you can comment on or make changes to this bug.