Closed
Bug 1362914
Opened 8 years ago
Closed 8 years ago
stylo: Serialization of font for canvas is different from gecko
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
Details
Attachments
(1 file, 1 obsolete file)
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
Assignee | ||
Comment 1•8 years ago
|
||
This is caused by the difference of serialization of font shorthand property.
Depends on: 1345218
Updated•8 years ago
|
Assignee: nobody → hikezoe
Priority: -- → P2
Assignee | ||
Comment 2•8 years ago
|
||
From the canvas spec [1]
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.
[1] https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-font
Assignee | ||
Comment 3•8 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
mozreview-review |
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 7•8 years ago
|
||
mozreview-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+
Assignee | ||
Comment 8•8 years ago
|
||
Thank you!
https://github.com/servo/servo/pull/16959
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8869353 -
Attachment is obsolete: true
Comment 10•8 years ago
|
||
Pushed by hikezoe@mozilla.com:
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
Comment 11•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 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.
Description
•