Bug 243540 - Stylesheets from other stylesheet sets should be disabled
Summary: Stylesheets from other stylesheet sets should be disabled
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-08-04 06:28 PDT by Ahmad Saleem
Modified: 2023-05-25 07:48 PDT (History)
8 users (show)

See Also:


Attachments
WIP (1.75 KB, patch)
2022-08-04 11:48 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Test (976 bytes, text/html)
2022-08-04 11:48 PDT, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-08-04 06:28:24 PDT
Hi Team,

Another test case from Chrome bugs, where Safari 15.6 is failing test case similar to Chrome and I think we should fix and align it with web-spec.

Test Case - https://bug1708045.bmoattachments.org/attachment.cgi?id=9220199

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

Web-Spec Reference (from Chrome Bug Report) - The sheet should be disabled, per https://drafts.csswg.org/cssom/#add-a-css-style-sheet

*** STEPS TO REPRODUCE ***

1) Run the test case and review dialog box

<> EXPECTED RESULT:

PASS (The red stylesheet's 'disabled' flag is true)

<> ACTUAL RESULT:

FAIL (The red stylesheet's 'disabled' flag is false)

____

NOTE - Safari 15.6 and Chrome Canary 106 both fail this test case.

If this has been fixed upstream, please mark this as DUPLICATE.

Thanks!
Comment 1 Ryosuke Niwa 2022-08-04 11:48:12 PDT
Created attachment 461403 [details]
WIP
Comment 2 Ryosuke Niwa 2022-08-04 11:48:22 PDT
Created attachment 461404 [details]
Test
Comment 3 Ryosuke Niwa 2022-08-07 18:47:00 PDT
Comment on attachment 461403 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=461403&action=review

> Source/WebCore/style/StyleScope.cpp:408
> +                sheet->setDisabled(title != m_preferredStylesheetSetName);

This isn't quite right. Firefox allows unpreferred / disabled script to be enabled again by script.
Comment 4 Radar WebKit Bug Importer 2022-08-11 06:29:15 PDT
<rdar://problem/98504974>
Comment 5 Ahmad Saleem 2023-05-25 07:48:33 PDT
Web-Spec: Setting the disabled flag in step 5 of https://drafts.csswg.org/cssom/#add-a-css-style-sheet

Source - Mozilla bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1708045)