Web Inspector: Reduce synchronous view layouts
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 05:44:32 +0000 (05:44 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 05:44:32 +0000 (05:44 +0000)
commita39df200428415ba2f98c38c4abfefcba0673376
tree3ecddf31075c22a749b4321d5783157d262a1f9c
parent852858f1e515a8c7aa0b58849198f503b9ecafa0
Web Inspector: Reduce synchronous view layouts
https://bugs.webkit.org/show_bug.cgi?id=151058

Reviewed by Timothy Hatcher.

Replace calls to View.updateLayout with needsLayout, when a synchronous layout
isn't absolutely necessary.

* UserInterface/Models/BackForwardEntry.js:
(WebInspector.BackForwardEntry.prototype.prepareToShow):

* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout): Deleted.
View subclasses shouldn't override updateLayout.

* UserInterface/Views/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.set label):

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
(WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):

* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype._queryFinished):
Just update DataGrid's layout, not the whole view. The grid is the only subview
so the result is identical, but the intent is cleared this way.
(WebInspector.DatabaseTableContentView.prototype.updateLayout): Deleted.
View subclasses shouldn't override updateLayout.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
(WebInspector.LogContentView.prototype.promptDidChangeHeight): Deleted.
Unused code.

* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.set collapsed):

* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype._contentWillPopulate):
Add TextEditor as a subview.
(WebInspector.TextResourceContentView.prototype.updateLayout): Deleted.
View subclasses shouldn't override updateLayout.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/BackForwardEntry.js
Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js
Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js
Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js
Source/WebInspectorUI/UserInterface/Views/DatabaseTableContentView.js
Source/WebInspectorUI/UserInterface/Views/LogContentView.js
Source/WebInspectorUI/UserInterface/Views/Sidebar.js
Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js