Web Inspector: Console drawer resizing is broken when console prompt has >1 line...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 May 2018 00:09:41 +0000 (00:09 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 May 2018 00:09:41 +0000 (00:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185369
<rdar://problem/40013202>

Reviewed by Devin Rousso.

Mouse offset calculation should account for the height of the quick console.
The only reason resizing worked with the single-line quick console is that
the offset calculation included the resizer height, which is very close
to that of the single-line quick console (27px and 30px respectively).

* UserInterface/Views/ConsoleDrawer.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231527 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js

index 82a0328..6efefec 100644 (file)
@@ -1,3 +1,18 @@
+2018-05-08  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: Console drawer resizing is broken when console prompt has >1 line of code
+        https://bugs.webkit.org/show_bug.cgi?id=185369
+        <rdar://problem/40013202>
+
+        Reviewed by Devin Rousso.
+
+        Mouse offset calculation should account for the height of the quick console.
+        The only reason resizing worked with the single-line quick console is that
+        the offset calculation included the resizer height, which is very close
+        to that of the single-line quick console (27px and 30px respectively).
+
+        * UserInterface/Views/ConsoleDrawer.js:
+
 2018-05-04  Devin Rousso  <webkit@devinrousso.com>
 
         Web Inspector: simplify the WI.Collection interface
index e58231a..3e0f663 100644 (file)
@@ -122,7 +122,8 @@ WI.ConsoleDrawer = class ConsoleDrawer extends WI.ContentBrowser
             return;
 
         let resizerElement = event.target;
-        let mouseOffset = resizerElement.offsetHeight - (event.pageY - resizerElement.totalOffsetTop);
+        let quickConsoleHeight = window.innerHeight - (this.element.totalOffsetTop + this.height);
+        let mouseOffset = quickConsoleHeight - (event.pageY - resizerElement.totalOffsetTop);
 
         function dockedResizerDrag(event)
         {