[stylo] unexpected serialization of the 'font' shorthand when stylo is enabled

RESOLVED FIXED in Firefox 60

Status

()

defect
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: jfkthame, Assigned: emilio)

Tracking

Trunk
mozilla60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

a year ago
Testcase:
    data:text/html,<div style="font:bold medium serif">hello

With stylo disabled:
    document.getElementsByTagName('div')[0].style.font
    -> "bold medium serif"

With stylo enabled:
    document.getElementsByTagName('div')[0].style.font
    -> "normal normal bold normal medium serif"

which seems unexpectedly verbose, and inconsistent with how other shorthands are serialized.

FWIW, Chrome agrees with the non-stylo (old Gecko) serialization here.
Yeah... This doesn't make much sense.
Assignee: nobody → emilio
Comment hidden (mozreview-request)
Comment on attachment 8948741 [details]
Bug 1436031: Test the serialization of the font shorthand.

I submitted this directly to Github, since there's no Gecko code at all.
Attachment #8948741 - Flags: review?(xidorn+moz)
We probably should have a test, preferably web-platform test for this case.

jfkthame, mind submitting one (here or to wpt directly)?
Flags: needinfo?(jfkthame)
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #4)
> We probably should have a test, preferably web-platform test for this case.
> 
> jfkthame, mind submitting one (here or to wpt directly)?

I didn't include one because shorthand serialization is a mess and not really properly specified... But on hindsight I guess we should, per https://github.com/w3c/csswg-drafts/issues/1564.
I can write it I guess.
Flags: needinfo?(jfkthame)
Comment hidden (mozreview-request)

Comment 8

a year ago
mozreview-review
Comment on attachment 8948741 [details]
Bug 1436031: Test the serialization of the font shorthand.

https://reviewboard.mozilla.org/r/218134/#review224016
Attachment #8948741 - Flags: review?(xidorn+moz) → review+

Comment 10

a year ago
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7806af854343
Test the serialization of the font shorthand. r=xidorn

Comment 11

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7806af854343
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/9462 for changes under testing/web-platform/tests
Can't merge web-platform-tests PR due to failing upstream tests
Can't merge web-platform-tests PR due to failing upstream tests
Can't merge web-platform-tests PR due to failing upstream tests
Can't merge web-platform-tests PR due to failing upstream tests
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.