Title: [222436] trunk/Source/WebInspectorUI
Revision
222436
Author
[email protected]
Date
2017-09-24 11:55:03 -0700 (Sun, 24 Sep 2017)

Log Message

Web Inspector: Reduce work during resizing
https://bugs.webkit.org/show_bug.cgi?id=177402

Patch by Joseph Pecoraro <[email protected]> on 2017-09-24
Reviewed by Matt Baker.

* UserInterface/Views/ConsolePrompt.js:
(WI.ConsolePrompt.prototype.layout):
In the most common case there is no text so avoid doing work in CodeMirror.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (222435 => 222436)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-09-24 18:30:54 UTC (rev 222435)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-09-24 18:55:03 UTC (rev 222436)
@@ -1,3 +1,14 @@
+2017-09-24  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Reduce work during resizing
+        https://bugs.webkit.org/show_bug.cgi?id=177402
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/ConsolePrompt.js:
+        (WI.ConsolePrompt.prototype.layout):
+        In the most common case there is no text so avoid doing work in CodeMirror.
+
 2017-09-22  Matt Baker  <[email protected]>
 
         Web Inspector: Remove SidebarPanel show/hide and added/removed

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js (222435 => 222436)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js	2017-09-24 18:30:54 UTC (rev 222435)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js	2017-09-24 18:55:03 UTC (rev 222436)
@@ -144,7 +144,8 @@
 
     layout()
     {
-        this._codeMirror.refresh();
+        if (this.layoutReason === WI.View.LayoutReason.Resize && this.text)
+            this._codeMirror.refresh();
     }
 
     // Private
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to