Bug 1362914 - Drop initial values of properties other than font-size and font-family in serialization of canvas font attribute.
59 bytes, text/x-review-board-request
Gecko returns "10px sans-serif", whereas stylo returns "normal normal normal normal 10px sans-serif". Below test cases fail because of this bug: dom/canvas/test/test_canvas_font_setter.html dom/canvas/test/test_canvas.html
This is caused by the difference of serialization of font shorthand property.
Depends on: 1345218
From the canvas spec  For example, after the following statement: context.font = 'italic 400 12px/2 Unknown Font, sans-serif'; ...the expression context.font would evaluate to the string "italic 12px "Unknown Font", sans-serif". The "400" font-weight doesn't appear because that is the default value. The line-height doesn't appear because it is forced to "normal", the default value. As per this spec, we need another serialization function to drop default values for canvas.  https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-font
Comment on attachment 8869353 [details] Bug 1362914 - Factor out PropertyDeclaration only iterator. https://reviewboard.mozilla.org/r/140996/#review144664
Attachment #8869353 - Flags: review?(manishearth) → review+
Comment on attachment 8869354 [details] Bug 1362914 - Drop initial values of properties other than font-size and font-family in serialization of canvas font attribute. https://reviewboard.mozilla.org/r/140998/#review144668
Attachment #8869354 - Flags: review?(manishearth) → review+
Thank you! https://github.com/servo/servo/pull/16959
Attachment #8869353 - Attachment is obsolete: true
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/0db843910232 Drop initial values of properties other than font-size and font-family in serialization of canvas font attribute. r=manishearth
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.