Title: [200332] trunk/Source/WebInspectorUI
- Revision
- 200332
- Author
- [email protected]
- Date
- 2016-05-02 12:47:03 -0700 (Mon, 02 May 2016)
Log Message
Web Inspector: Zooming of docked Web Inspector affects the webpage, but reset to 0 does not
https://bugs.webkit.org/show_bug.cgi?id=157234
rdar://problem/26027177
Always prevent default for the zoom keyboard shortcuts to avoid passing the event back to
Safari to handle and add explicit beeps when max/min is hit.
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Removed setting implicitlyPreventsDefault on zoom keyboard shortcuts.
(WebInspector._increaseZoom): Add explicit beep and remove preventDefault call.
(WebInspector._decreaseZoom): Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200331 => 200332)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-02 19:33:28 UTC (rev 200331)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-02 19:47:03 UTC (rev 200332)
@@ -1,3 +1,19 @@
+2016-05-02 Timothy Hatcher <[email protected]>
+
+ Web Inspector: Zooming of docked Web Inspector affects the webpage, but reset to 0 does not
+ https://bugs.webkit.org/show_bug.cgi?id=157234
+ rdar://problem/26027177
+
+ Always prevent default for the zoom keyboard shortcuts to avoid passing the event back to
+ Safari to handle and add explicit beeps when max/min is hit.
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.contentLoaded): Removed setting implicitlyPreventsDefault on zoom keyboard shortcuts.
+ (WebInspector._increaseZoom): Add explicit beep and remove preventDefault call.
+ (WebInspector._decreaseZoom): Ditto.
+
2016-05-01 Dan Bernstein <[email protected]>
WebInspectorUI.framework/Versions/A/Resources/Images/Legacy is empty
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (200331 => 200332)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2016-05-02 19:33:28 UTC (rev 200331)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2016-05-02 19:47:03 UTC (rev 200332)
@@ -263,8 +263,6 @@
this._increaseZoomKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, WebInspector.KeyboardShortcut.Key.Plus, this._increaseZoom.bind(this));
this._decreaseZoomKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, WebInspector.KeyboardShortcut.Key.Minus, this._decreaseZoom.bind(this));
- this._increaseZoomKeyboardShortcut.implicitlyPreventsDefault = this._decreaseZoomKeyboardShortcut.implicitlyPreventsDefault = false;
-
this._resetZoomKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "0", this._resetZoom.bind(this));
this._showTabAtIndexKeyboardShortcuts = [1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, `${i}`, this._showTabAtIndex.bind(this, i)));
@@ -1960,12 +1958,13 @@
const epsilon = 0.0001;
const maximumZoom = 2.4;
let currentZoom = this._zoomFactor();
- if (currentZoom + epsilon >= maximumZoom)
+ if (currentZoom + epsilon >= maximumZoom) {
+ InspectorFrontendHost.beep();
return;
+ }
let newZoom = Math.min(maximumZoom, currentZoom + 0.2);
this._setZoomFactor(newZoom);
- event.preventDefault();
};
WebInspector._decreaseZoom = function(event)
@@ -1973,12 +1972,13 @@
const epsilon = 0.0001;
const minimumZoom = 0.6;
let currentZoom = this._zoomFactor();
- if (currentZoom - epsilon <= minimumZoom)
+ if (currentZoom - epsilon <= minimumZoom) {
+ InspectorFrontendHost.beep();
return;
+ }
let newZoom = Math.max(minimumZoom, currentZoom - 0.2);
this._setZoomFactor(newZoom);
- event.preventDefault();
};
WebInspector._resetZoom = function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes