Bug 172608

Summary: Web Inspector: The CodeMirror instance in the ConsolePrompt does't need to be refreshed each time it is shown
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, inspector-bugzilla-changes, timothy
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
[Image] Timeline Before
none
[Image] Timeline After
none
Archive of layout-test-results from ews126 for ios-simulator-wk2 none

Devin Rousso
Reported 2017-05-25 13:59:09 PDT
Since ConsolePrompt is a subclass of View, we only need to refresh when it has a layout().
Attachments
Patch (3.19 KB, patch)
2017-05-25 14:03 PDT, Devin Rousso
no flags
[Image] Timeline Before (460.08 KB, image/png)
2017-05-25 14:03 PDT, Devin Rousso
no flags
[Image] Timeline After (493.68 KB, image/png)
2017-05-25 14:03 PDT, Devin Rousso
no flags
Archive of layout-test-results from ews126 for ios-simulator-wk2 (31.78 MB, application/zip)
2017-05-25 15:31 PDT, Build Bot
no flags
Devin Rousso
Comment 1 2017-05-25 14:03:11 PDT
Devin Rousso
Comment 2 2017-05-25 14:03:25 PDT
Created attachment 311288 [details] [Image] Timeline Before
Devin Rousso
Comment 3 2017-05-25 14:03:38 PDT
Created attachment 311289 [details] [Image] Timeline After
Build Bot
Comment 4 2017-05-25 15:31:41 PDT
Comment on attachment 311287 [details] Patch Attachment 311287 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3816951 New failing tests: http/tests/preload/viewport/meta-viewport-link-headers.php
Build Bot
Comment 5 2017-05-25 15:31:43 PDT
Created attachment 311303 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Timothy Hatcher
Comment 6 2017-06-02 10:10:44 PDT
Comment on attachment 311287 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311287&action=review Okay, as long as you tested this well! > Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js:-120 > - this._codeMirror.refresh(); I think we did this because CodeMirror gets in a bad state when it has been hidden/out of the document. Specifically the caret would be broken.
Devin Rousso
Comment 7 2017-06-02 17:43:53 PDT
Comment on attachment 311287 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311287&action=review >> Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js:-120 >> - this._codeMirror.refresh(); > > I think we did this because CodeMirror gets in a bad state when it has been hidden/out of the document. Specifically the caret would be broken. I don't think the ConsolePrompt is ever out of the document, seeing as it is visible on every tab. In the case of the DatabaseContentView, I saw no noticeable difference between my change and ToT.
WebKit Commit Bot
Comment 8 2017-06-02 18:18:55 PDT
Comment on attachment 311287 [details] Patch Clearing flags on attachment: 311287 Committed r217746: <http://trac.webkit.org/changeset/217746>
WebKit Commit Bot
Comment 9 2017-06-02 18:18:56 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.