Bug 245104

Summary: Stylesheet rule.cssText is incorrect for a property setting 'background: none'
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, bfulgham, karlcow, obrufau, rniwa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: macOS 12   
See Also: https://bugs.webkit.org/show_bug.cgi?id=245105
Bug Depends on: 190496    
Bug Blocks:    
Attachments:
Description Flags
testcase
none
rendering in safari, firefox, chrome none

Description Ahmad Saleem 2022-09-12 16:41:50 PDT
Hi Team,

I was going through Chrome Monorail and came across another test case, which is broken in Safari 16 on macOS 12.6.

Link (Modified from Original to only keep failing tests) - https://jsfiddle.net/8myk0dvb/

Chrome Bug - https://bugs.chromium.org/p/chromium/issues/detail?id=251510

Patch - https://src.chromium.org/viewvc/blink?view=revision&revision=168002

*** STEPS TO REPRODUCE ***

1) Open JSFiddle

<< ACTUAL RESULT >>

Both lines are red in Safari (EVEN in Safari Technology Preview 153 as well)

<< EXPECTED RESULT >>

Both should not be red

____

OTHER BROWSERS:

-- Firefox Nightly 107 & Chrome Canary 107 does not show both as "Red".

________

I think fixing this would allow Webkit to be more awesome.

Thanks!
Comment 1 Radar WebKit Bug Importer 2022-09-19 16:42:17 PDT
<rdar://problem/100146682>
Comment 2 Karl Dubost 2022-09-26 19:33:42 PDT
I wonder if fixing Bug 245105 would also fix this.
Comment 3 Karl Dubost 2022-09-26 19:48:07 PDT
Created attachment 462643 [details]
testcase

Safari TP 154

[Log] input – ".test1 {background: none; }" (test-csstext-roundtrip-background.html, line 21)
[Log] output – ".test1 { background-image: none; }" (test-csstext-roundtrip-background.html, line 22)
[Log] input – ".test2 {background-image: none; background-color: initial; background-position: initial initial; background-repeat: initial initial;}" (test-csstext-roundtrip-background.html, line 21)
[Log] output – ".test2 { background-image: none; }" (test-csstext-roundtrip-background.html, line 22)


Firefox Nightly 107
11:40:35.025 input .test1 {background: none; } test-csstext-roundtrip-background.html:21:17
11:40:35.026 output .test1 { background: none; } test-csstext-roundtrip-background.html:22:17
11:40:35.026 input .test2 {background-image: none; background-color: initial; background-position: initial initial; background-repeat: initial initial;} test-csstext-roundtrip-background.html:21:17
11:40:35.026 output .test2 { background-image: none; background-color: initial; }

Chrome Canary 108
input .test1 {background: none; }
test-csstext-roundtrip-background.html:22 output .test1 { background: none; }
test-csstext-roundtrip-background.html:21 input .test2 {background-image: none; background-color: initial; background-position: initial initial; background-repeat: initial initial;}
test-csstext-roundtrip-background.html:22 output .test2 { background-image: none; background-color: initial; }
Comment 4 Karl Dubost 2022-09-26 19:49:08 PDT
Created attachment 462644 [details]
rendering in safari, firefox, chrome
Comment 5 Karl Dubost 2022-09-26 19:50:02 PDT
Ahmad, thanks for the test case, I uploaded it here. 
The one you provided as a typo for the test2 rule.
Comment 6 Ahmad Saleem 2022-09-27 09:24:48 PDT
(In reply to Karl Dubost from comment #5)
> Ahmad, thanks for the test case, I uploaded it here. 
> The one you provided as a typo for the test2 rule.

Cool.. Thanks!
Comment 7 Ahmad Saleem 2023-01-22 01:56:21 PST
Attached test case works fine in WebKit trunk based off 259178@main and matches Chrome Canary 111 and Firefox Nightly 111. I only have "Selection API" enabled explicitly.
Comment 8 Oriol Brufau 2023-02-09 12:42:22 PST

*** This bug has been marked as a duplicate of bug 185953 ***