Web Inspector: optimize repaint regions upon text editing
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2012 01:06:47 +0000 (01:06 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2012 01:06:47 +0000 (01:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103674

Reviewed by Vsevolod Vlasov.

There is a lot happening that makes repaint area larger than it should be,
namely unnecessary tabbed pane and navigator updates.

* inspector/front-end/NavigatorView.js:
(WebInspector.NavigatorView.prototype._updateScriptTitle):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPaneTab.prototype.set title):

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/NavigatorView.js
Source/WebCore/inspector/front-end/TabbedPane.js

index 777a27a..f28e54e 100644 (file)
@@ -1,3 +1,18 @@
+2012-11-29  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: optimize repaint regions upon text editing
+        https://bugs.webkit.org/show_bug.cgi?id=103674
+
+        Reviewed by Vsevolod Vlasov.
+
+        There is a lot happening that makes repaint area larger than it should be,
+        namely unnecessary tabbed pane and navigator updates.
+
+        * inspector/front-end/NavigatorView.js:
+        (WebInspector.NavigatorView.prototype._updateScriptTitle):
+        * inspector/front-end/TabbedPane.js:
+        (WebInspector.TabbedPaneTab.prototype.set title):
+
 2012-11-29  KyungTae Kim  <ktf.kim@samsung.com>
 
         Unused parameters on plugins/npapi.cpp
index c9103bb..b740bbf 100644 (file)
@@ -479,6 +479,8 @@ WebInspector.BaseNavigatorTreeElement.prototype = {
 
     set titleText(titleText)
     {
+        if (this._titleText === titleText)
+            return;
         this._titleText = titleText || "";
         if (this.titleElement)
             this.titleElement.textContent = this._titleText;
index 18ba618..817b053 100644 (file)
@@ -598,6 +598,8 @@ WebInspector.TabbedPaneTab.prototype = {
 
     set title(title)
     {
+        if (title === this._title)
+            return;
         this._title = title;
         if (this._titleElement)
             this._titleElement.textContent = title;