[webkit-reviews] review granted: [Bug 185369] Web Inspector: Console drawer resizing is broken when console prompt has >1 line of code : [Attachment 339783] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 7 18:35:23 PDT 2018


Devin Rousso <webkit at devinrousso.com> has granted Matt Baker
<mattbaker at apple.com>'s request for review:
Bug 185369: Web Inspector: Console drawer resizing is broken when console
prompt has >1 line of code
https://bugs.webkit.org/show_bug.cgi?id=185369

Attachment 339783: Patch

https://bugs.webkit.org/attachment.cgi?id=339783&action=review




--- Comment #5 from Devin Rousso <webkit at devinrousso.com> ---
Comment on attachment 339783
  --> https://bugs.webkit.org/attachment.cgi?id=339783
Patch

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

r=me

Nice fix!

> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:125
> +	   let quickConsoleHeight = window.innerHeight -
(this.element.totalOffsetTop + this.height);

NIT: I'd prefer this be rewritten without the parenthesis, as I first thought
that the `this.element.totalOffsetTop` and `this.height` were somehow
"related".  A comment might also help explaining that "this gets the full
height of the console prompt by taking into account the current position of the
console drawer and its height with respect to the entire inspector area, so
that the remainder is the height of the console prompt", or something like
that.

Shame that there's no easy way of getting the height from the
`WI.ConsolePrompt` and passing it in here.  This method works just fine though.


More information about the webkit-reviews mailing list