Bug 248113 - Serialization of computed -webkit-border-image doesn't round-trip for border-image-slice
Summary: Serialization of computed -webkit-border-image doesn't round-trip for border-...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-18 17:37 PST by Oriol Brufau
Modified: 2022-11-25 17:38 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oriol Brufau 2022-11-18 17:37:43 PST
-webkit-border-image automatically adds 'fill' to border-image-slice, except if the value is omitted.

Then, run this:

var s = document.body.style;
var cs = getComputedStyle(document.body);
s.borderImage = "url()";
cs.webkitBorderImage; // "url(\"\") 100% / 1 / 0 stretch"
s.webkitBorderImage = cs.webkitBorderImage;
cs.webkitBorderImage; // "url(\"\") 100% fill / 1 / 0 stretch"

No round-tripping!

So when serializing the computed -webkit-border-image,
 - If border-image-slice has fill, serialize normally (no change).
 - Else, if border-image-slice is 100%, serialize omitting the slice.
 - Else, serialize as empty string.
Comment 1 Radar WebKit Bug Importer 2022-11-25 17:38:15 PST
<rdar://problem/102674869>