WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 247769
CSSOM fails to serialize some shorthands set to 'initial' (or any css-wide keyword)
https://bugs.webkit.org/show_bug.cgi?id=247769
Summary
CSSOM fails to serialize some shorthands set to 'initial' (or any css-wide ke...
Oriol Brufau
Reported
2022-11-10 15:41:47 PST
Run this code: var allCSSProps = new Set(); for (let obj = document.createElement("div").style; obj; obj = Reflect.getPrototypeOf(obj)) { for (let name of Object.getOwnPropertyNames(obj)) { let prop = name.replace(/[A-Z]/g, c => "-" + c.toLowerCase()); if (CSS.supports(prop, "initial")) { allCSSProps.add(prop); } } } var style = document.createElement("div").style; var bad = new Map(); for (let prop of allCSSProps) { style.cssText = ""; style.setProperty(prop, "initial"); let result = style.getPropertyValue(prop); if (result !== "initial") { bad.set(prop, result); } } bad; Expected: empty map Actual: a map with some failures: Map { "-webkit-border-radius" => "", "-webkit-column-break-after" => "", "-webkit-column-break-before" => "", "-webkit-column-break-inside" => "", "-webkit-perspective" => "", "grid" => "", "grid-area" => "initial / initial / initial / initial" "grid-column" => "initial / initial" "grid-row" => "initial / initial" "offset" => "", }
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-11-17 15:42:17 PST
<
rdar://problem/102489409
>
Oriol Brufau
Comment 2
2022-12-21 07:30:08 PST
Improved in
bug 247988
, then fixed by
bug 242775
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug