Closed
Bug 585718
Opened 14 years ago
Closed 14 years ago
nsCSSFontFaceStyleDecl::GetPropertyValue needs to handle -moz-font-feature-settings and -moz-font-language-override
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: zwol, Assigned: jfkthame)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
dbaron
:
review+
dbaron
:
approval2.0+
|
Details | Diff | Splinter Review |
nsCSSFontFaceStyleDecl::GetPropertyValue needs serialization code for the new -moz-font-feature-settings and -moz-font-language-override properties.
nsCSSRules.cpp: In member function ‘nsresult nsCSSFontFaceStyleDecl::GetPropertyValue(nsCSSFontDesc, nsAString_internal&) const’:
nsCSSRules.cpp:1613: warning: enumeration value ‘eCSSFontDesc_FontFeatureSettings’ not handled in switch
nsCSSRules.cpp:1613: warning: enumeration value ‘eCSSFontDesc_FontLanguageOverride’ not handled in switch
Reporter | ||
Updated•14 years ago
|
Assignee: nobody → jfkthame
Assignee | ||
Comment 1•14 years ago
|
||
It looks like we can handle these exactly like the font-family descriptor here, I think.
I've also added some basic tests to test_font_face_parser.html to verify that these descriptors are supported.
Attachment #465613 -
Flags: review?
Assignee | ||
Updated•14 years ago
|
Attachment #465613 -
Flags: review? → review?(dbaron)
Comment 2•14 years ago
|
||
Comment on attachment 465613 [details] [diff] [review]
patch, v1 - add serialization support for new @font-face descriptors
Close, but not quite; these two properties can also be eCSSUnit_Normal. That would trigger the assertion in this case.
That said, I think the ideal thing to do here would be to have an array of properties somewhere that lines up with the enum values in nsCSSFontDesc (with eCSSProperty_UNKNOWN for src), and then use the code that's used here for _style, _weight, etc. for all descriptors except Src. That code is nice because it's reasonably general and should handle future changes, etc., without people noticing the issue here.
Attachment #465613 -
Flags: review?(dbaron) → review-
Comment 3•14 years ago
|
||
(And you should add a test of 'normal' to your tests, too.)
Comment 4•14 years ago
|
||
I think both family and src need to be an exception, actually; family has a eCSSUnit_String vs. eCSSUnit_Families issue.
Comment 5•14 years ago
|
||
Or it's ok if you just add two more cases like the existing Style/Weight/Stretch cases.
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #465613 -
Attachment is obsolete: true
Attachment #467401 -
Flags: review?(dbaron)
Comment 7•14 years ago
|
||
Comment on attachment 467401 [details] [diff] [review]
patch, v2 - updated as per comment 5
r=dbaron
Attachment #467401 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 8•14 years ago
|
||
Comment on attachment 467401 [details] [diff] [review]
patch, v2 - updated as per comment 5
Requesting approval to land this on trunk. It's basically a missing piece of the CSS font feature support that already landed in bug 511339. There should be no risk to any other aspect of functionality.
Attachment #467401 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #467401 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 9•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•