| Summary: | cssText serialization in inline style for "padding" | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | obrufau |
| Priority: | P2 | ||
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Ahmad Saleem
2022-11-28 16:16:44 PST
I think we already fixed the !important issue, but CSS-wide keywords may still need extra work? Oriol, is there a bug on file for this? I don't have Trunk build locally so in STP158, we do fail "padding" test case from JSFiddle in Comment 0 w while the browsers (Chrome Canary 110 & Firefox Nightly 109) pass all of them. Yeah, !important was fixed in bug 247771, you can test with e.g. 'inherit': var {style} = document.createElement("div"); style.cssText = "padding: inherit; padding-top: inherit !important"; style.cssText; // "padding-right: inherit; padding-bottom: inherit; padding-left: inherit; padding-top: inherit !important;" The problem with 'initial' is bug 185953, caused by this piece of code: https://github.com/WebKit/WebKit/blob/b9824fc290ac9247e8a04f38632a8fdd4b9ec02d/Source/WebCore/css/StyleProperties.cpp#L1759-L1760 It was a workaround for some other problem that I don't remember, probably that the serialization of several shorthands does not properly handle CSS-wide keywords (https://github.com/WebKit/WebKit/blob/b9824fc290ac9247e8a04f38632a8fdd4b9ec02d/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssom-getPropertyValue-common-checks-expected.txt) or that during parsing a shorthand can set omitted longhands to literally 'initial' instead of the actual initial value. *** This bug has been marked as a duplicate of bug 185953 *** |