Closed Bug 1501261 Opened 6 years ago Closed 6 years ago

serialization of border-image-repeat and background-size doesn't match other browsers

Categories

(Core :: DOM: CSS Object Model, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: ericwilligers, Assigned: heycam)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36

Steps to reproduce:

Set background-size and border-image-repeat to "initial"
Read computed style
http://jsfiddle.net/ericwilligers/8pmvLant/



Actual results:

Property background-size has initial value "auto auto"
Property border-image-repeat has initial value "stretch stretch"




Expected results:

Property background-size has initial value "auto"
Property border-image-repeat has initial value "stretch"

These are the results that spec and Blink/Edge/Safari give.
https://drafts.csswg.org/css-backgrounds/#background-size
https://drafts.csswg.org/css-backgrounds/#border-image-repeat
Hi Eric,

The issue can be reproduced on the latest Nightly 65.0a1 (2018-10-25), Firefox Beta 64.0b3 and Firefox Release 63.0 on Windows 10 x64 as well. Not sure if the component is the best one but feel free to move it if it is not.

Thanks for the report!
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: CSS Object Model
Ever confirmed: true
Product: Firefox → Core
Assignee: nobody → cam
Status: NEW → ASSIGNED
Priority: -- → P3
Looks like the repeated value should be omitted only if it's auto.
The repeated value for these two properties should be omitted if it is a keyword, not if it is a <length-percentage>.

Blink/Edge/Safari give the same results for
http://jsfiddle.net/ericwilligers/mo6ftn95/


> Looks like the repeated value should be omitted only if it's auto.

Correct for background-size.
Summary: repeated keywords in initial value → serialization of background-image-repeat and background-size doesn't match other browsers
With this change, all of Chrome, Edge, Firefox, and Safari serialize
border-image-repeat by omitting a repeated keyword, so we update a WPT
that was expecting duplicated keywords.
With this change, all of Chrome, Edge, Firefox, and Safari serialize
background-size by omitting the second "auto" if the value is "auto
auto".  Other keywords are still repeated.

Depends on D10445
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4a37e18c3d3c
Part 1: Use Servo to serialize border-image-repeat r=firefox-style-system-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/e63ddbf2a290
Part 2: Serialize `background-size: auto auto` as "auto" r=firefox-style-system-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/13944 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
https://hg.mozilla.org/mozilla-central/rev/4a37e18c3d3c
https://hg.mozilla.org/mozilla-central/rev/e63ddbf2a290
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Summary: serialization of background-image-repeat and background-size doesn't match other browsers → serialization of border-image-repeat and background-size doesn't match other browsers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: