Web Inspector: Console Drawer resizing doesn't match cursor position
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2017 22:11:59 +0000 (22:11 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2017 22:11:59 +0000 (22:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178753
<rdar://problem/35160484>

Reviewed by Brian Burg.

* UserInterface/Views/ConsoleDrawer.js:
(WI.ConsoleDrawer.prototype._updateDrawerHeight):
Drive-by fix an early return that would never have worked.

* UserInterface/Views/Main.css:
(#content):
Give the #content a flex grow of 1. This causes the space to grow as it
already was but now it does not affect the size of the fixed height sibling.

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

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

index ff4ef4d..4e6b8ef 100644 (file)
@@ -1,3 +1,20 @@
+2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Console Drawer resizing doesn't match cursor position
+        https://bugs.webkit.org/show_bug.cgi?id=178753
+        <rdar://problem/35160484>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/ConsoleDrawer.js:
+        (WI.ConsoleDrawer.prototype._updateDrawerHeight):
+        Drive-by fix an early return that would never have worked.
+
+        * UserInterface/Views/Main.css:
+        (#content):
+        Give the #content a flex grow of 1. This causes the space to grow as it
+        already was but now it does not affect the size of the fixed height sibling.
+
 2017-10-24  Eric Carlson  <eric.carlson@apple.com>
 
         Web Inspector: Enable WebKit logging configuration and display
index e9e1c26..8fb1b30 100644 (file)
@@ -147,11 +147,11 @@ WI.ConsoleDrawer = class ConsoleDrawer extends WI.ContentBrowser
         const minimumHeight = 64;
         const maximumHeight = this.element.parentNode.offsetHeight - 100;
 
-        height = Number.constrain(height, minimumHeight, maximumHeight);
-        if (height === this.element.style.height)
+        let heightCSSValue = Number.constrain(height, minimumHeight, maximumHeight) + "px";
+        if (this.element.style.height === heightCSSValue)
             return;
 
-        this.element.style.height = height + "px";
+        this.element.style.height = heightCSSValue;
 
         this.dispatchEventToListeners(WI.ConsoleDrawer.Event.Resized);
     }
index 902881e..61ab302 100644 (file)
@@ -151,6 +151,7 @@ body.docked:matches(.right, .left) #navigation-sidebar.collapsed > .resizer {
 #content {
     display: flex;
     height: 100%; /* This reduces paint areas when typing in the console. http://webkit.org/b/145324 */
+    flex: 1;
 }
 
 #tab-browser {