Bug 264148

Summary: adoptedStyleSheets incorrectly displayed as locked User Agent Style Sheet
Product: WebKit Reporter: Steve Orvell <steveorvell>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, contact, inspector-bugzilla-changes, opendarwin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Apple Silicon)   
OS: macOS 14   

Description Steve Orvell 2023-11-03 04:50:12 PDT
When inspecting an element with a style applied from an `adoptedStyleSheet`, the inspector displays the style as originating from a locked `User Agent Style Sheet`. This makes it impossible to use the inspector to alter the style or know from where it's originating.

See https://jsbin.com/juhucaw/2/edit?html,output.

Steps to reproduce:
1. Inspect the blue div
2. Look at it's styles.

Expected:
1. styles are editable in the inspector
2. styles are reported as coming from an adoptedStyleSheet

Actual:
1. styles are locked in the inspector
2. styles are reporeted as coming from `User Agent Style Sheet`.
Comment 1 Steve Orvell 2023-11-03 04:51:21 PDT
This behavior occurs on Safari 17.1 as well as Safari Technology Preview release 182.
Comment 2 Ben Frain 2023-11-03 05:04:44 PDT
Also occurred on Safari 17.0
Comment 3 Alexey Proskuryakov 2023-11-06 10:32:20 PST
Thank you for the report! Do you happen to know if this reproduced on any versions prior to 17.x?
Comment 4 Radar WebKit Bug Importer 2023-11-10 03:51:12 PST
<rdar://problem/118229432>