RESOLVED FIXED Bug 13174
line-height in font shorthand does not override a previously stated line-height property
https://bugs.webkit.org/show_bug.cgi?id=13174
Summary line-height in font shorthand does not override a previously stated line-heig...
Dan Richman
Reported 2007-03-23 15:15:44 PDT
If you set a line-height value for a block of text, and then later on in your style sheet you try to declare a font shorthand property that contains a line-height value, it will not override the previously stated line-height property. A workaround is to simple re-declare a regular line-height property in addition to the font shorthand property. Please compare the testcase in other browsers to see proper implementation.
Attachments
Testcase (872 bytes, text/html)
2007-03-23 15:16 PDT, Dan Richman
no flags
First attempt (28.60 KB, patch)
2007-05-21 01:19 PDT, Rob Buis
hyatt: review-
Different approach (228.27 KB, patch)
2007-05-22 02:09 PDT, Rob Buis
hyatt: review+
Dan Richman
Comment 1 2007-03-23 15:16:55 PDT
Created attachment 13787 [details] Testcase
Rob Buis
Comment 2 2007-05-21 01:19:01 PDT
Created attachment 14641 [details] First attempt This should do it. It can be cleaned up a bit more I think, but I hope the approach is right. Cheers, Rob.
Dave Hyatt
Comment 3 2007-05-21 01:33:31 PDT
Comment on attachment 14641 [details] First attempt Per conversation on IRC, I suggested just always making line-height be mapped in as one of the first properties like font. However instead of going into the RenderStyle in the switch statement it would just be cached as a member variable on the style selector. After the style has been determined (e.g., around the time adjustRenderStyle is going to get called), that line height value (if it exists) should be mapped in for real.
Rob Buis
Comment 4 2007-05-22 02:09:36 PDT
Created attachment 14650 [details] Different approach As discussed with Hyatt on IRC, this is probably a better approach. Cheers, Rob.
Dave Hyatt
Comment 5 2007-05-23 01:10:46 PDT
Comment on attachment 14650 [details] Different approach r=me
David Kilzer (:ddkilzer)
Comment 6 2007-05-23 17:21:14 PDT
Confirmed by existence of patches.
Sam Weinig
Comment 7 2007-05-24 17:39:56 PDT
Landed in r21667.
Note You need to log in before you can comment on or make changes to this bug.