Bug 23947

Summary: Font size is not cascading (only if applied to body tag)
Product: WebKit Reporter: Jeff <jeff>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Test case
none
Full html/css/images to demonstrate bug none

Jeff
Reported 2009-02-13 06:51:22 PST
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>WebKit Cascade of font size failuer test</title> <style type="text/css"> /** */ /* If I un-comment this then they font-size is cascaded properly body { font-family : Arial, Helvetica, sans-serif; font-size: 12px; } */ .alerts_searchbox { font-family : Arial, Helvetica, sans-serif; font-size : 12px; color : #2D2D2D; } /** */ .alerts_searchbox .sb_left { background-color : goldenrod; float : left; height : 390px; width : 10px; } .alerts_searchbox .sb_middle { background-color : antiquewhite; float : left; height : 390px; width : 280px; z-index : 2; } .alerts_searchbox .sb_right { background-color : goldenrod; float : left; height : 390px; width : 10px; } .alerts_searchbox .searchbox_content { padding : 10px 5px; } .alerts_searchbox .h2 { font-size : 16px; font-weight : bold; color : #333333; padding : 10px 0 7px; } .alerts_searchbox .h3 { color : #A56900; padding : 1px 0; font-weight : bold; } .alerts_searchbox .h4 { padding : 7px 0 2px; font-weight : bold; color : #333333; } .alerts_searchbox .itn_box_pad { padding : 4px 6px; } .alerts_searchbox .itn_box { background : url(../images/itn_box.jpg) no-repeat center center; width : 271px; height : 77px; font-weight : bold; } .alerts_searchbox .col { float : left; width : 129px; } .alerts_searchbox .col .row2 { padding-top : 10px; } .alerts_searchbox .col .label { font-size : 11px; color : #fff; } .alerts_searchbox .col .value { color : #E9B559; } </style> </head> <body> <div class="alerts_searchbox"> <div class="sb_left"></div> <div class="sb_middle"> <div class="searchbox_content"> <div class="h2">Find a Flight - Compare Prices Fast</div> <div class="h3">The price for your trip has dropped by $XX</div> <div class="h4">Your Itinerary:</div> <div class="itn_box"> <div class="itn_box_pad"> <div class="col"> <div class="label">From:</div> <div class="value">Dallas, TX</div> <div class="label row2">To:</div> <div class="value">Fort Lauderdale, FL</div> </div> <div class="col"> <div class="label">Departing:</div> <div class="value">September 11, 2009</div> <div class="label row2">Returning:</div> <div class="value">September 19, 2009</div> </div> </div> </div> </div> </div> <div class="sb_right"></div> </div> </body> </html>
Attachments
Test case (4.52 KB, application/xhtml+xml)
2009-02-13 06:54 PST, Jeff
no flags
Full html/css/images to demonstrate bug (4.64 KB, application/zip)
2009-02-13 07:13 PST, Jeff
no flags
Jeff
Comment 1 2009-02-13 06:54:14 PST
Created attachment 27656 [details] Test case This is the simplest html file I could create that reproduces the bug.
Jeff
Comment 2 2009-02-13 07:13:16 PST
Created attachment 27659 [details] Full html/css/images to demonstrate bug
Jeff
Comment 3 2009-02-13 07:13:58 PST
Comment on attachment 27659 [details] Full html/css/images to demonstrate bug Must have something to do with background images because the original html I attached works without the images in it.
Alexey Proskuryakov
Comment 4 2009-04-08 02:28:22 PDT
The attached test works correctly for me once I fix its broken CSS - @charset must be the first bytes in the file, but there is a comment before it in the test. So, marking as a duplicate of a bug that tracks making our parser more tolerant in this case. Please note that cascading the font size from body is subject to quirks - it's possible that on your actual site, you use a DOCTYPE that triggers quirks mode in WebKit, but strict mode in Firefox, for example. *** This bug has been marked as a duplicate of 23744 ***
Note You need to log in before you can comment on or make changes to this bug.