[Webkit-unassigned] [Bug 247810] border shorthand serialization doesn't round-trip
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 11 11:35:04 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=247810
--- Comment #1 from Oriol Brufau <obrufau at igalia.com> ---
This also affects other properties, as can be easily shown by the fact that WebKit doesn't even ensure that all longhands are present.
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;
document.documentElement.style.cssText = "all: initial; direction: initial; unicode-bidi: initial";
var cs = getComputedStyle(document.documentElement);
var bad = {};
for (let prop of allCSSProps) {
const value = cs.getPropertyValue(prop);
style.cssText = "";
style.setProperty(prop, value);
if (style.length > 1) {
let longhands = [...style];
for (let longhand of longhands) {
style.cssText = "";
style.setProperty(prop, value);
style.removeProperty(longhand);
if (style.getPropertyValue(prop) !== "") {
bad[prop] ||= [];
bad[prop].push(longhand);
}
}
}
}
bad;
{
border: ["border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat"],
font: ["font-style", "font-variant-caps", "font-weight", "font-stretch", "line-height", "font-size-adjust", "font-kerning", "font-variant-alternates", "font-variant-ligatures", "font-variant-numeric", "font-variant-east-asian", "font-variant-position", "font-feature-settings", "font-optical-sizing", "font-variation-settings", "font-palette"],
font-synthesis: ["font-synthesis-weight", "font-synthesis-style", "font-synthesis-small-caps"],
font-variant: ["font-variant-numeric", "font-variant-caps", "font-variant-alternates", "font-variant-east-asian", "font-variant-position"],
offset: ["offset-path", "offset-distance", "offset-position", "offset-anchor", "offset-rotate"],
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221111/af947c10/attachment.htm>
More information about the webkit-unassigned
mailing list