Bug 151071 - Web Inspector: Support Gesture Events to zoom in / out of the Timeline
Summary: Web Inspector: Support Gesture Events to zoom in / out of the Timeline
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
: 151061 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-09 17:17 PST by Joseph Pecoraro
Modified: 2015-11-16 10:43 PST (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (4.11 KB, patch)
2015-11-09 17:18 PST, Joseph Pecoraro
timothy: review+
bburg: commit-queue-
Details | Formatted Diff | Diff
[PATCH] For Landing (4.10 KB, patch)
2015-11-09 19:42 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-11-09 17:17:28 PST
* SUMMARY
Support Gesture Events to zoom in / out of the Timeline.

Use the gesture event's scale property to scale the secondsPerPixel value.

Center like MouseWheel events around the mouse position.

* NOTES
- This still pins to the edge if an edge is available for both mouse wheel and now gesture events. That feels funny, we should make any zoom IN unpin from the edge and just zoom in where the mouse is. Handle this separately.
Comment 1 Radar WebKit Bug Importer 2015-11-09 17:17:46 PST
<rdar://problem/23474383>
Comment 2 Joseph Pecoraro 2015-11-09 17:18:43 PST
Created attachment 265125 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2015-11-09 17:20:27 PST
*** Bug 151061 has been marked as a duplicate of this bug. ***
Comment 4 Matt Baker 2015-11-09 17:52:44 PST
Comment on attachment 265125 [details]
[PATCH] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:494
> +        let newSecondsPerPixel = this._gestureStartDurationPerPixel * (1 / scale);

let newSecondsPerPixel = this._gestureStartDurationPerPixel / scale;
Comment 5 Joseph Pecoraro 2015-11-09 19:42:40 PST
Created attachment 265139 [details]
[PATCH] For Landing
Comment 6 Joseph Pecoraro 2015-11-09 19:43:49 PST
(In reply to comment #4)
> Comment on attachment 265125 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=265125&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:494
> > +        let newSecondsPerPixel = this._gestureStartDurationPerPixel * (1 / scale);
> 
> let newSecondsPerPixel = this._gestureStartDurationPerPixel / scale;

Heh, yeah. I think this is a bit harder to reason about when you read the line of code. In any case, I made this change.
Comment 7 WebKit Commit Bot 2015-11-09 20:39:22 PST
Comment on attachment 265139 [details]
[PATCH] For Landing

Clearing flags on attachment: 265139

Committed r192198: <http://trac.webkit.org/changeset/192198>
Comment 8 BJ Burg 2015-11-10 06:46:00 PST
Comment on attachment 265125 [details]
[PATCH] Proposed Fix

Clearing stale cq? flag.
Comment 9 BJ Burg 2015-11-10 06:50:39 PST
Comment on attachment 265139 [details]
[PATCH] For Landing

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

> Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:429
> +        // Ignore wheel events while handing gestures.

Nit: handling