WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 185953
Bug 248442
cssText serialization in inline style for "padding"
https://bugs.webkit.org/show_bug.cgi?id=248442
Summary
cssText serialization in inline style for "padding"
Ahmad Saleem
Reported
2022-11-28 16:16:44 PST
Hi Team, While going through Blink commit's, which can be merged or where we are failing some test cases, I came across another one: Failing Test Case (not taken from patch but updated from source.chromium.org) -
https://jsfiddle.net/r5u0c9wh/show
Blink Commit -
https://chromium.googlesource.com/chromium/blink/+/1b84d2a68d373efab9a6e571274ffefdeefe6c58
Webkit GitHub Source -
https://github.com/WebKit/WebKit/blob/b9824fc290ac9247e8a04f38632a8fdd4b9ec02d/Source/WebCore/css/StyleProperties.cpp#L704
Just wanted to raise a bug, where this can be tracked for future fix purposes. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Tim Nguyen (:ntim)
Comment 1
2022-11-28 17:07:07 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?
Ahmad Saleem
Comment 2
2022-11-28 17:10:37 PST
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.
Oriol Brufau
Comment 3
2022-11-28 17:27:41 PST
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
***
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