Title: [198619] trunk/Source/WebInspectorUI
- Revision
- 198619
- Author
- [email protected]
- Date
- 2016-03-24 00:13:05 -0700 (Thu, 24 Mar 2016)
Log Message
Web Inspector: Large repaints while typing in the console tab
https://bugs.webkit.org/show_bug.cgi?id=155627
<rdar://problem/25234875>
Reviewed by Timothy Hatcher.
Use a `position: absolute` workaround to reduce large repaint areas caused by flexbox.
* UserInterface/Views/LogContentView.css:
(body.selected-tab-console #content):
This selector must only affect the console tab as it breaks sidebars in other tabs.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._tabBarItemSelected):
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype.set selectedTabBarItem):
Add "selected-tab-console" class to <body> when the console tab is selected.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (198618 => 198619)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-03-24 06:32:27 UTC (rev 198618)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-03-24 07:13:05 UTC (rev 198619)
@@ -1,3 +1,24 @@
+2016-03-24 Nikita Vasilyev <[email protected]>
+
+ Web Inspector: Large repaints while typing in the console tab
+ https://bugs.webkit.org/show_bug.cgi?id=155627
+ <rdar://problem/25234875>
+
+ Reviewed by Timothy Hatcher.
+
+ Use a `position: absolute` workaround to reduce large repaint areas caused by flexbox.
+
+ * UserInterface/Views/LogContentView.css:
+ (body.selected-tab-console #content):
+ This selector must only affect the console tab as it breaks sidebars in other tabs.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.contentLoaded):
+ (WebInspector._tabBarItemSelected):
+ * UserInterface/Views/TabBar.js:
+ (WebInspector.TabBar.prototype.set selectedTabBarItem):
+ Add "selected-tab-console" class to <body> when the console tab is selected.
+
2016-03-23 Joseph Pecoraro <[email protected]>
Web Inspector: Timeline range selection changes with ProfileView should not cause navigation bar items to flicker
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (198618 => 198619)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2016-03-24 06:32:27 UTC (rev 198618)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2016-03-24 07:13:05 UTC (rev 198619)
@@ -226,6 +226,7 @@
this.tabBar = new WebInspector.TabBar(document.getElementById("tab-bar"));
this.tabBar.addEventListener(WebInspector.TabBar.Event.NewTabItemClicked, this._newTabItemClicked, this);
this.tabBar.addEventListener(WebInspector.TabBar.Event.OpenDefaultTab, this._openDefaultTab, this);
+ this.tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemSelected, this._tabBarItemSelected, this);
this._contentElement = document.getElementById("content");
this._contentElement.setAttribute("role", "main");
@@ -540,6 +541,18 @@
this.showNewTabTab();
};
+WebInspector._tabBarItemSelected = function(event)
+{
+ let {previouslySelectedTabIdentifier, selectedTabIdentifier} = event.data;
+ const classNamePrefix = "selected-tab-";
+
+ if (previouslySelectedTabIdentifier)
+ document.body.classList.remove(classNamePrefix + previouslySelectedTabIdentifier);
+
+ console.assert(selectedTabIdentifier);
+ document.body.classList.add(classNamePrefix + selectedTabIdentifier);
+};
+
WebInspector._tryToRestorePendingTabs = function()
{
let stillPendingOpenTabs = [];
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css (198618 => 198619)
--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css 2016-03-24 06:32:27 UTC (rev 198618)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css 2016-03-24 07:13:05 UTC (rev 198619)
@@ -23,6 +23,15 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+body.selected-tab-console #content {
+ /* FIXME: This shouldn't be necessary once https://webkit.org/b/145324 is resolved. */
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+
.log-scope-bar > li.unread::before {
content: '';
display: inline-block;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js (198618 => 198619)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js 2016-03-24 06:32:27 UTC (rev 198618)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js 2016-03-24 07:13:05 UTC (rev 198619)
@@ -363,15 +363,23 @@
if (this._selectedTabBarItem === tabBarItem)
return;
- if (this._selectedTabBarItem)
+ let previouslySelectedTabIdentifier = "";
+
+ if (this._selectedTabBarItem) {
this._selectedTabBarItem.selected = false;
+ previouslySelectedTabIdentifier = this._selectedTabBarItem.representedObject.identifier;
+ }
this._selectedTabBarItem = tabBarItem || null;
- if (this._selectedTabBarItem)
+ let selectedTabIdentifier = "";
+
+ if (this._selectedTabBarItem) {
this._selectedTabBarItem.selected = true;
+ selectedTabIdentifier = this._selectedTabBarItem.representedObject.identifier;
+ }
- this.dispatchEventToListeners(WebInspector.TabBar.Event.TabBarItemSelected);
+ this.dispatchEventToListeners(WebInspector.TabBar.Event.TabBarItemSelected, {previouslySelectedTabIdentifier, selectedTabIdentifier});
}
get tabBarItems()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes