WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
19085
font-family: initial sets font-family differently than font: initial
https://bugs.webkit.org/show_bug.cgi?id=19085
Summary
font-family: initial sets font-family differently than font: initial
David Kilzer (:ddkilzer)
Reported
2008-05-15 12:59:52 PDT
* SUMMARY When using "font-family: initial" to style text, the font-family computed style differs from both using "font: initial" to style text and completely unstyled text. * STEPS TO REPRODUCE 1. Launch Safari/WebKit. 2. Open attached test case. * EXPECTED RESULTS font-family: initial should have a computed font-family property value of "Times" (assuming the default Safari settings). * ACTUAL RESULTS font-family: initial has a computed font-family property value of "''" (that's two single quotes). * REGRESSION This is not a regression. Safari 2.0.4 with original WebKit on Mac OS X 10.4.11 return the null value.
Attachments
Test case
(1.01 KB, text/html)
2008-05-15 13:00 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Patch v1
(4.68 KB, patch)
2008-05-15 13:23 PDT
,
David Kilzer (:ddkilzer)
hyatt
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2008-05-15 13:00:17 PDT
Created
attachment 21173
[details]
Test case
David Kilzer (:ddkilzer)
Comment 2
2008-05-15 13:05:19 PDT
<
rdar://problem/5939391
>
David Kilzer (:ddkilzer)
Comment 3
2008-05-15 13:23:52 PDT
Created
attachment 21175
[details]
Patch v1 Proposed patch and test case. Instead of checking !initialDesc.firstFamily().familyIsEmpty() (which is always true for a new FontDescription()), the line that sets the family could just be removed. I figured this was slightly safer in case the FontDescription default constructor changed in the future.
David Kilzer (:ddkilzer)
Comment 4
2008-05-15 13:28:13 PDT
(In reply to
comment #3
)
> Instead of checking !initialDesc.firstFamily().familyIsEmpty() (which is always > true for a new FontDescription()), the line that sets the family could just be > removed. I figured this was slightly safer in case the FontDescription default > constructor changed in the future.
I should say initialDesc.firstFamily().familyIsEmpty() is always true (meaning the first family is always empty for a new FontDescription()).
Dave Hyatt
Comment 5
2008-05-15 13:59:31 PDT
Comment on
attachment 21175
[details]
Patch v1 r=me
David Kilzer (:ddkilzer)
Comment 6
2008-05-15 14:09:51 PDT
Committed revision 33496.
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