Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Inspector: When selecting timeline records from a coalesced record bar, select the record nearest the cursor, not the first record in the group #3900

Conversation

patrickangle
Copy link
Contributor

@patrickangle patrickangle commented Sep 1, 2022

e9a80fb

Web Inspector: When selecting timeline records from a coalesced record bar, select the record nearest the cursor, not the first record in the group
https://bugs.webkit.org/show_bug.cgi?id=236050
rdar://78629845

Reviewed by Devin Rousso.

We now attempt to find the closest possible record to the location on the timeline the record bar was clicked. If we can
provide a record that starts before and end after the point that was clicked we return that record, otherwise falling
back to the record the either started or ended closest to the point that was clicked. This should make it easier to jump
to records the represent a larger portion of time, like a slow paint, without having to zoom all the way in on the
timeline.

Records with children are not considered since the children records will be the next records checked, and we want to
have selection be as targeted as possible.

* Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js:
(WI.TimelineOverviewGraph.prototype.timelineRecordBarClicked):
* Source/WebInspectorUI/UserInterface/Views/TimelineRecordBar.js:
(WI.TimelineRecordBar):
(WI.TimelineRecordBar.prototype.refresh):
(WI.TimelineRecordBar.prototype._handleClick):

Canonical link: https://commits.webkit.org/254056@main

2ff2092

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios   πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@patrickangle patrickangle self-assigned this Sep 1, 2022
@patrickangle patrickangle added Web Inspector Bugs related to the WebKit Web Inspector. WebKit Nightly Build labels Sep 1, 2022
@patrickangle patrickangle added the merge-queue Applied to send a pull request to merge-queue label Sep 1, 2022
…d bar, select the record nearest the cursor, not the first record in the group

https://bugs.webkit.org/show_bug.cgi?id=236050
rdar://78629845

Reviewed by Devin Rousso.

We now attempt to find the closest possible record to the location on the timeline the record bar was clicked. If we can
provide a record that starts before and end after the point that was clicked we return that record, otherwise falling
back to the record the either started or ended closest to the point that was clicked. This should make it easier to jump
to records the represent a larger portion of time, like a slow paint, without having to zoom all the way in on the
timeline.

Records with children are not considered since the children records will be the next records checked, and we want to
have selection be as targeted as possible.

* Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js:
(WI.TimelineOverviewGraph.prototype.timelineRecordBarClicked):
* Source/WebInspectorUI/UserInterface/Views/TimelineRecordBar.js:
(WI.TimelineRecordBar):
(WI.TimelineRecordBar.prototype.refresh):
(WI.TimelineRecordBar.prototype._handleClick):

Canonical link: https://commits.webkit.org/254056@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/b236050-timeline-record-selection-coalescing branch from 2ff2092 to e9a80fb Compare September 1, 2022 18:26
@webkit-commit-queue
Copy link
Collaborator

Committed 254056@main (e9a80fb): https://commits.webkit.org/254056@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit e9a80fb into WebKit:main Sep 1, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Inspector Bugs related to the WebKit Web Inspector.
Projects
None yet
3 participants