RESOLVED FIXED 17101
CSS line-height should be inherited from the UL to the LI
https://bugs.webkit.org/show_bug.cgi?id=17101
Summary CSS line-height should be inherited from the UL to the LI
Anantha Keesara
Reported 2008-01-30 14:58:32 PST
I. Steps: Go to: http://www.linternaute.com/biographie II. Issue: Notice the spacing in between lines on left navigation. III. Other browsers: In Safari, Opera, there is less spacing compared to FF and IE. IV. Nightly tested: r29807
Attachments
Screenshot (228.25 KB, image/jpeg)
2008-01-30 14:59 PST, Anantha Keesara
no flags
Reduction (257 bytes, text/html)
2008-01-30 15:00 PST, Anantha Keesara
no flags
Patch that turns off the quirk for <li>'s line boxes. (1.80 KB, patch)
2008-01-31 12:30 PST, Dave Hyatt
eric: review+
Anantha Keesara
Comment 1 2008-01-30 14:59:51 PST
Created attachment 18801 [details] Screenshot
Anantha Keesara
Comment 2 2008-01-30 15:00:27 PST
Created attachment 18802 [details] Reduction
Dave Hyatt
Comment 3 2008-01-30 15:23:17 PST
This is our line-shrinking quirk to match WinIE. In strict mode, the line-height will be present. I'm surprised that Firefox has the spacing. Does WinIE also have the spacing? If so, maybe there is something wrong with our quirk.
Dave Hyatt
Comment 4 2008-01-30 15:24:02 PST
Could the reporter test WinIE?
Anantha Keesara
Comment 5 2008-01-30 15:32:27 PST
WinIE also has the spacing. checked with both IE6 and IE7.
Dave Hyatt
Comment 6 2008-01-30 15:38:29 PST
Interesting.
Dave Hyatt
Comment 7 2008-01-30 15:43:00 PST
I am baffled. I guess there is something about the text quirk that I don't understand. Maybe it doesn't apply to root line boxes if the line contains any text at all?
Dave Hyatt
Comment 8 2008-01-30 15:51:02 PST
This seems to be something unique about <li>. Even though list-style-type is none, I think there is a "phantom" bullet or list marker that is growing the height of the line. This is insane.
Dave Hyatt
Comment 9 2008-01-30 15:55:00 PST
The best solution I can come up with is for <li> to make sure to turn off the quirk just for its root line boxes.
Dave Hyatt
Comment 10 2008-01-31 12:30:20 PST
Created attachment 18828 [details] Patch that turns off the quirk for <li>'s line boxes.
Eric Seidel (no email)
Comment 11 2008-01-31 12:36:37 PST
Comment on attachment 18828 [details] Patch that turns off the quirk for <li>'s line boxes. Looks good. Changelog and results, obviously. Also, wrap your comment a bit shorter. :)
Dave Hyatt
Comment 12 2008-01-31 13:08:25 PST
Fixed.
Yuzhu Shen
Comment 13 2008-03-05 23:39:50 PST
It seems that r29892 for InlineFlowBox.h m_hasTextChildren = obj->style()->display() == LIST_ITEM; doesn't solve the problem perfectly. Consider this example in quirks mode, =================================================== <li style="float:left; list-style-type: none"> <img src="" height="99" width="186" alt="" style="border: 1px solid"/> </li> =================================================== Since the <li> has float:left in its style, it is displayed as block and m_hasTextChildren is set to false. As a result, the <li> doesn't have a gap under the <img>. While in IE and Firefox, the <li> still has a gap under the <img>. (Tested in IE7, Firefox2/3.)
Note You need to log in before you can comment on or make changes to this bug.