Bug 272876 - Web Inspector: Computed CSS goto arrow doesn't work when "show independent Styles sidebar" is disabled
Summary: Web Inspector: Computed CSS goto arrow doesn't work when "show independent St...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari Technology Preview
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-04-17 19:20 PDT by novov
Modified: 2024-05-13 06:14 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description novov 2024-04-17 19:20:48 PDT
When using the Inspector, the sidebar of the Elements tab can be switched between a two-column view and a unified view using the "show independent Styles sidebar" setting. 

When the sidebar is unified (the setting is disabled), the button to jump to the source of a rule in "Computed" tab does not work. It either switches to the Styles tab and does nothing, or if the user clicks the goto arrow for multiple rules, sometimes it will jump to a previous rule.

This occurs with both Safari 17.4 and the latest STP.
Comment 1 novov 2024-04-18 19:29:51 PDT
When the sidebar is unified, SpreadsheetCSSStyleDeclarationEditor.selectProperties() is called multiple times, for previous highlighted properties and then the current properties. 

This is because the previous highlighted properties are preserved when re-opening the Styles tab, which is usually our desired behaviour, but causes problems when the user asks for a new property to be highlighted. This does not cause issues with the two-column view since the Styles tab is already open there, so the behaviour wrt remembering previous properties is not triggered.
Comment 2 novov 2024-04-18 21:43:18 PDT
It appears that the problem is in unrelated to the above - the property is highlighted, but is just not scrolled to.
Comment 3 novov 2024-04-19 02:07:36 PDT
Pull request: https://github.com/WebKit/WebKit/pull/27503
Comment 4 Radar WebKit Bug Importer 2024-04-24 19:21:17 PDT
<rdar://problem/127025520>
Comment 5 EWS 2024-05-13 06:14:31 PDT
Committed 278686@main (b8288eb0b2ed): <https://commits.webkit.org/278686@main>

Reviewed commits have been landed. Closing PR #27503 and removing active labels.