Title: [172617] trunk/Source/WebInspectorUI
Revision
172617
Author
[email protected]
Date
2014-08-14 17:30:38 -0700 (Thu, 14 Aug 2014)

Log Message

Web Inspector: Dragging Undocked inspector by window title has broken behavior
https://bugs.webkit.org/show_bug.cgi?id=135950

Patch by Joseph Pecoraro <[email protected]> on 2014-08-14
Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
On Mac ports where we the inspector content goes everywhere, window dragging behavior
still exists for the top 22px of the window. So don't do our _javascript_ based window
dragging for this special region.

* UserInterface/Models/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut.Modifier.get CommandOrControl):
(WebInspector.KeyboardShortcut.prototype.get displayName):
Instead of calling a host function, use the value already in the frontend.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (172616 => 172617)


--- trunk/Source/WebInspectorUI/ChangeLog	2014-08-15 00:21:25 UTC (rev 172616)
+++ trunk/Source/WebInspectorUI/ChangeLog	2014-08-15 00:30:38 UTC (rev 172617)
@@ -1,5 +1,22 @@
 2014-08-14  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Dragging Undocked inspector by window title has broken behavior
+        https://bugs.webkit.org/show_bug.cgi?id=135950
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Base/Main.js:
+        On Mac ports where we the inspector content goes everywhere, window dragging behavior
+        still exists for the top 22px of the window. So don't do our _javascript_ based window
+        dragging for this special region.
+
+        * UserInterface/Models/KeyboardShortcut.js:
+        (WebInspector.KeyboardShortcut.Modifier.get CommandOrControl):
+        (WebInspector.KeyboardShortcut.prototype.get displayName):
+        Instead of calling a host function, use the value already in the frontend.
+
+2014-08-14  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: Split console toggle button wrong - Images/Images/SplitToggleUp.svg does not exist
         https://bugs.webkit.org/show_bug.cgi?id=135957
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (172616 => 172617)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2014-08-15 00:21:25 UTC (rev 172616)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2014-08-15 00:30:38 UTC (rev 172617)
@@ -1316,6 +1316,13 @@
         !event.target.classList.contains("item-section"))
         return;
 
+    // Ignore dragging on the top of the toolbar on Mac where the inspector content fills the entire window.
+    if (WebInspector.Platform.name === "mac" && WebInspector.Platform.version.release >= 10) {
+        const windowDragHandledTitleBarHeight = 22;
+        if (event.pageY < windowDragHandledTitleBarHeight)
+            return;
+    }
+
     var lastScreenX = event.screenX;
     var lastScreenY = event.screenY;
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/KeyboardShortcut.js (172616 => 172617)


--- trunk/Source/WebInspectorUI/UserInterface/Models/KeyboardShortcut.js	2014-08-15 00:21:25 UTC (rev 172616)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/KeyboardShortcut.js	2014-08-15 00:30:38 UTC (rev 172617)
@@ -93,7 +93,7 @@
 
     get CommandOrControl()
     {
-        return InspectorFrontendHost.platform() === "mac" ? this.Command : this.Control;
+        return WebInspector.Platform.name === "mac" ? this.Command : this.Control;
     }
 };
 
@@ -181,7 +181,7 @@
         if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Control)
             result += "\u2303";
         if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Option)
-            result += InspectorFrontendHost.platform() === "mac" ? "\u2325" : "\u2387";
+            result += WebInspector.Platform.name === "mac" ? "\u2325" : "\u2387";
         if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Shift)
             result += "\u21e7";
         if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Command)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to