[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

yurys at chromium.org yurys at chromium.org
Wed Dec 22 14:21:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a2203086f4a415d161baa6a7c4ff9f1e9e0354bc
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 7 06:42:56 2010 +0000

    2010-10-06  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: clear line highlight when switching current view
            https://bugs.webkit.org/show_bug.cgi?id=47262
    
            * inspector/front-end/SourceFrame.js:
            (WebInspector.SourceFrame.prototype.clearLineHighlight):
            * inspector/front-end/SourceView.js:
            (WebInspector.SourceView.prototype.hide):
            * inspector/front-end/TextViewer.js:
            (WebInspector.TextViewer.prototype.highlightLine):
            (WebInspector.TextViewer.prototype.clearLineHighlight):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69276 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f6e996b..0b365ad 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-06  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: clear line highlight when switching current view
+        https://bugs.webkit.org/show_bug.cgi?id=47262
+
+        * inspector/front-end/SourceFrame.js:
+        (WebInspector.SourceFrame.prototype.clearLineHighlight):
+        * inspector/front-end/SourceView.js:
+        (WebInspector.SourceView.prototype.hide):
+        * inspector/front-end/TextViewer.js:
+        (WebInspector.TextViewer.prototype.highlightLine):
+        (WebInspector.TextViewer.prototype.clearLineHighlight):
+
 2010-10-06  Chris Evans  <cevans at google.com>
 
         Reviewed by David Levin.
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index aecd57b..4b391ac 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -169,6 +169,14 @@ WebInspector.SourceFrame.prototype = {
             this._lineToHighlight = line;
     },
 
+    clearLineHighlight: function()
+    {
+        if (this._textViewer)
+            this._textViewer.clearLineHighlight();
+        else
+            delete this._lineToHighlight;
+    },
+
     _createViewerIfNeeded: function()
     {
         if (!this._visible || !this._loaded || this._textViewer)
diff --git a/WebCore/inspector/front-end/SourceView.js b/WebCore/inspector/front-end/SourceView.js
index 3f762cc..09549bf 100644
--- a/WebCore/inspector/front-end/SourceView.js
+++ b/WebCore/inspector/front-end/SourceView.js
@@ -59,6 +59,8 @@ WebInspector.SourceView.prototype = {
     hide: function()
     {
         this.sourceFrame.visible = false;
+        if (!this._frameNeedsSetup)
+            this.sourceFrame.clearLineHighlight();
         WebInspector.View.prototype.hide.call(this);
         if (this.localSourceFrame)
             this.localSourceFrame.visible = false;
diff --git a/WebCore/inspector/front-end/TextViewer.js b/WebCore/inspector/front-end/TextViewer.js
index 13b2836..9ad5e49 100644
--- a/WebCore/inspector/front-end/TextViewer.js
+++ b/WebCore/inspector/front-end/TextViewer.js
@@ -117,16 +117,22 @@ WebInspector.TextViewer.prototype = {
 
     highlightLine: function(lineNumber)
     {
-        if (typeof this._highlightedLine === "number") {
-            var chunk = this._makeLineAChunk(this._highlightedLine);
-            chunk.removeDecoration("webkit-highlighted-line");
-        }
+        this.clearLineHighlight();
         this._highlightedLine = lineNumber;
         this.revealLine(lineNumber);
         var chunk = this._makeLineAChunk(lineNumber);
         chunk.addDecoration("webkit-highlighted-line");
     },
 
+    clearLineHighlight: function()
+    {
+        if (typeof this._highlightedLine === "number") {
+            var chunk = this._makeLineAChunk(this._highlightedLine);
+            chunk.removeDecoration("webkit-highlighted-line");
+            delete this._highlightedLine;
+        }
+    },
+
     freeCachedElements: function()
     {
         this._cachedSpans = [];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list