Web Inspector: Sources: content of function definition popover sometimes cut off
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 20:23:24 +0000 (20:23 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 20:23:24 +0000 (20:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203258

Reviewed by Matt Baker.

* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):

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

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

index 7e5c192..9eec94c 100644 (file)
@@ -1,5 +1,15 @@
 2019-10-22  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: Sources: content of function definition popover sometimes cut off
+        https://bugs.webkit.org/show_bug.cgi?id=203258
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/SourceCodeTextEditor.js:
+        (WI.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
+
+2019-10-22  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: REGRESSION: Sources: when editing style sheets, the content is sometimes suddenly replaced with the original content of the resource
         https://bugs.webkit.org/show_bug.cgi?id=203235
 
index 43d1481..3735d97 100644 (file)
@@ -1906,6 +1906,11 @@ WI.SourceCodeTextEditor = class SourceCodeTextEditor extends WI.TextEditor
                 this._showPopover(content);
                 codeMirror.setValue(formattedText || data.description);
                 this._popover.update();
+
+                // CodeMirror needs a refresh after the popover displays, to layout, otherwise it may appear with the wrong size.
+                setTimeout(() => {
+                    codeMirror.refresh();
+                });
             });
         }