[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

pfeldman at chromium.org pfeldman at chromium.org
Fri Feb 26 22:20:56 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 388857275488890f7d72820fa520e389b521ae92
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 16 10:08:21 2010 +0000

    2010-02-16  Pavel Feldman  <pfeldman at chromium.org>
    
            Reviewed by Timothy Hatcher.
    
            Web Inspector: let search iterate over views in Resources
            and keep the view in Scripts.
    
            https://bugs.webkit.org/show_bug.cgi?id=34968
    
            * inspector/front-end/Panel.js:
            (WebInspector.Panel.prototype.jumpToNextSearchResult):
            (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
            (WebInspector.Panel.prototype.showSourceLineForURL):
            (WebInspector.Panel.prototype.searchIteratesOverViews):
            * inspector/front-end/ResourcesPanel.js:
            (WebInspector.ResourcesPanel.prototype.get _resources):
            (WebInspector.ResourcesPanel.prototype.searchIteratesOverViews):
            * inspector/front-end/SourceView.js:
            (WebInspector.SourceView.prototype.showingLastSearchResult):
            * inspector/front-end/inspector.js:
            (WebInspector.documentKeyDown):
            (WebInspector.focusSearchField):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54812 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0aab728..d8bda9c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-02-16  Pavel Feldman  <pfeldman at chromium.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Web Inspector: let search iterate over views in Resources
+        and keep the view in Scripts.
+
+        https://bugs.webkit.org/show_bug.cgi?id=34968
+
+        * inspector/front-end/Panel.js:
+        (WebInspector.Panel.prototype.jumpToNextSearchResult):
+        (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
+        (WebInspector.Panel.prototype.showSourceLineForURL):
+        (WebInspector.Panel.prototype.searchIteratesOverViews):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.ResourcesPanel.prototype.get _resources):
+        (WebInspector.ResourcesPanel.prototype.searchIteratesOverViews):
+        * inspector/front-end/SourceView.js:
+        (WebInspector.SourceView.prototype.showingLastSearchResult):
+        * inspector/front-end/inspector.js:
+        (WebInspector.documentKeyDown):
+        (WebInspector.focusSearchField):
+
 2010-02-16  Noam Rosenthal  <noam.rosenthal at nokia.com>
 
         Reviewed by Ariya Hidayat.
diff --git a/WebCore/inspector/front-end/Panel.js b/WebCore/inspector/front-end/Panel.js
index 5e81e2d..5b01191 100644
--- a/WebCore/inspector/front-end/Panel.js
+++ b/WebCore/inspector/front-end/Panel.js
@@ -230,16 +230,17 @@ WebInspector.Panel.prototype = {
         var currentView = this._searchResults[this._currentSearchResultIndex];
 
         if (currentView.showingLastSearchResult()) {
-            if (++this._currentSearchResultIndex >= this._searchResults.length)
-                this._currentSearchResultIndex = 0;
-            currentView = this._searchResults[this._currentSearchResultIndex];
+            if (this.searchIteratesOverViews()) {
+                if (++this._currentSearchResultIndex >= this._searchResults.length)
+                    this._currentSearchResultIndex = 0;
+                currentView = this._searchResults[this._currentSearchResultIndex];
+            }
             showFirstResult = true;
         }
 
         if (currentView !== this.visibleView) {
-            currentView = this.visibleView;
-            this._currentSearchResultIndex = 0;
-            showFirstResult = true;
+            this.showView(currentView);
+            WebInspector.focusSearchField();
         }
 
         if (showFirstResult)
@@ -264,14 +265,18 @@ WebInspector.Panel.prototype = {
         var currentView = this._searchResults[this._currentSearchResultIndex];
 
         if (currentView.showingFirstSearchResult()) {
-            if (--this._currentSearchResultIndex < 0)
-                this._currentSearchResultIndex = (this._searchResults.length - 1);
-            currentView = this._searchResults[this._currentSearchResultIndex];
+            if (this.searchIteratesOverViews()) {
+                if (--this._currentSearchResultIndex < 0)
+                    this._currentSearchResultIndex = (this._searchResults.length - 1);
+                currentView = this._searchResults[this._currentSearchResultIndex];
+            }
             showLastResult = true;
         }
 
-        if (currentView !== this.visibleView)
+        if (currentView !== this.visibleView) {
             this.showView(currentView);
+            WebInspector.focusSearchField();
+        }
 
         if (showLastResult)
             currentView.jumpToLastSearchResult();
@@ -376,6 +381,11 @@ WebInspector.Panel.prototype = {
     showSourceLineForURL: function(url, line)
     {
         return false;
+    },
+
+    searchIteratesOverViews: function()
+    {
+        return false;
     }
 }
 
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 40a380c..19325bb 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -706,6 +706,11 @@ WebInspector.ResourcesPanel.prototype = {
     get _resources()
     {
         return this.items;
+    },
+
+    searchIteratesOverViews: function()
+    {
+        return true;
     }
 }
 
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 77d3f42..354bf21 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -686,9 +686,7 @@ WebInspector.documentKeyDown = function(event)
                 var isFindKey = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey;
 
             if (isFindKey) {
-                var searchField = document.getElementById("search");
-                searchField.focus();
-                searchField.select();
+                WebInspector.focusSearchField();
                 event.preventDefault();
             }
 
@@ -878,6 +876,13 @@ WebInspector.updateSearchLabel = function()
     }
 }
 
+WebInspector.focusSearchField = function()
+{
+    var searchField = document.getElementById("search");
+    searchField.focus();
+    searchField.select();
+}
+
 WebInspector.toggleAttach = function()
 {
     this.attached = !this.attached;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list