Closed Bug 1436031 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: jfkthame, Assigned: emilio)

Details

Attachments

(1 file)

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 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 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+
Actual fix in https://hg.mozilla.org/integration/autoland/rev/211f446b6a7b.
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7806af854343
Test the serialization of the font shorthand. r=xidorn
https://hg.mozilla.org/mozilla-central/rev/7806af854343
Status: NEW → RESOLVED
Closed: 7 years 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.

Attachment

General

Created:
Updated:
Size: