Bug 154041 - Web Inspector: Limit max and min zoom factor of Inspector
Summary: Web Inspector: Limit max and min zoom factor of Inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-02-09 11:40 PST by Joseph Pecoraro
Modified: 2016-02-09 12:54 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (4.24 KB, patch)
2016-02-09 11:47 PST, Joseph Pecoraro
bburg: review+
bburg: commit-queue-
Details | Formatted Diff | Diff
[PATCH] For Landing (4.33 KB, patch)
2016-02-09 12:03 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] For Landing (4.38 KB, patch)
2016-02-09 12:04 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 2016-02-09 11:40:56 PST
* SUMMARY
Limit max and min zoom factor of Inspector.

Currently there is no limit to zoom in and out, which can provide a poor experience.
Comment 1 Joseph Pecoraro 2016-02-09 11:41:03 PST
<rdar://problem/24571326>
Comment 2 Joseph Pecoraro 2016-02-09 11:47:21 PST
Created attachment 270940 [details]
[PATCH] Proposed Fix
Comment 3 BJ Burg 2016-02-09 11:56:22 PST
Comment on attachment 270940 [details]
[PATCH] Proposed Fix

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

r=me

> Source/WebInspectorUI/ChangeLog:8
> +

Please state what the intended limits are, so I can double-check you did it right ;-)

> Source/WebInspectorUI/ChangeLog:24
> +        Remove prevent default which would happen implicitly for these.

This comment confused me. Maybe say 'remove redundant preventDefault calls'

> Source/WebInspectorUI/UserInterface/Base/Main.js:1946
> +    const maximumZoom = 2.4;

If we want 6 zoom levels, this should be 2.2. Right? 1 + (.2 * 6) = 2.2

> Source/WebInspectorUI/UserInterface/Base/Main.js:1959
> +    const minimumZoom = 0.6;

For 3 zoom levels, it should be 0.4.
Comment 4 Joseph Pecoraro 2016-02-09 12:02:57 PST
> > Source/WebInspectorUI/ChangeLog:8
> > +
> 
> Please state what the intended limits are, so I can double-check you did it
> right ;-)

The intended limits are what look good to my eye and roughly matched Safari. I added a comment to the ChangeLog.

> 
> > Source/WebInspectorUI/UserInterface/Base/Main.js:1946
> > +    const maximumZoom = 2.4;
> 
> If we want 6 zoom levels, this should be 2.2. Right? 1 + (.2 * 6) = 2.2

I think its more important to have a good zoom then have 6 levels. Safari went up to 3, so I felt 2.4 was better than 2.2 in terms of comparing the two.


> > Source/WebInspectorUI/UserInterface/Base/Main.js:1959
> > +    const minimumZoom = 0.6;
> 
> For 3 zoom levels, it should be 0.4.

I think 0.6 was already looking super small. Our UI starts to break at the seems at this zoom level. Going smaller didn't seem useful.
Comment 5 Joseph Pecoraro 2016-02-09 12:03:23 PST
Created attachment 270943 [details]
[PATCH] For Landing
Comment 6 Joseph Pecoraro 2016-02-09 12:04:21 PST
Created attachment 270944 [details]
[PATCH] For Landing
Comment 7 WebKit Commit Bot 2016-02-09 12:52:44 PST
Comment on attachment 270944 [details]
[PATCH] For Landing

Clearing flags on attachment: 270944

Committed r196325: <http://trac.webkit.org/changeset/196325>