[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
pfeldman at chromium.org
pfeldman at chromium.org
Wed Dec 22 12:33:33 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e224a6fe2714f158d3049c3f0ec4185412251250
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 25 10:06:06 2010 +0000
2010-08-25 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: search in Scripts panel brings ui back to original search view.
https://bugs.webkit.org/show_bug.cgi?id=44516
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.searchCanceled):
(WebInspector.Panel.prototype.jumpToNextSearchResult):
(WebInspector.Panel.prototype.jumpToPreviousSearchResult):
* inspector/front-end/ResourcesPanel.js:
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype.searchCanceled):
(WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback):
(WebInspector.ScriptsPanel.prototype.performSearch):
(WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult):
(WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cc335a3..5aaa269 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-08-25 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: search in Scripts panel brings ui back to original search view.
+ https://bugs.webkit.org/show_bug.cgi?id=44516
+
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.searchCanceled):
+ (WebInspector.Panel.prototype.jumpToNextSearchResult):
+ (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
+ * inspector/front-end/ResourcesPanel.js:
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.searchCanceled):
+ (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback):
+ (WebInspector.ScriptsPanel.prototype.performSearch):
+ (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult):
+ (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
+
2010-08-25 Kent Tamura <tkent at chromium.org>
Reviewed by Shinichiro Hamaji
diff --git a/WebCore/inspector/front-end/Panel.js b/WebCore/inspector/front-end/Panel.js
index 2fa0d34..8cbdebb 100644
--- a/WebCore/inspector/front-end/Panel.js
+++ b/WebCore/inspector/front-end/Panel.js
@@ -116,7 +116,7 @@ WebInspector.Panel.prototype = {
document.getElementById("main-panels").appendChild(this.element);
},
- searchCanceled: function(startingNewSearch)
+ searchCanceled: function()
{
if (this._searchResults) {
for (var i = 0; i < this._searchResults.length; ++i) {
@@ -238,11 +238,9 @@ WebInspector.Panel.prototype = {
var currentView = this._searchResults[this._currentSearchResultIndex];
if (currentView.showingLastSearchResult()) {
- if (this.searchIteratesOverViews()) {
- if (++this._currentSearchResultIndex >= this._searchResults.length)
- this._currentSearchResultIndex = 0;
- currentView = this._searchResults[this._currentSearchResultIndex];
- }
+ if (++this._currentSearchResultIndex >= this._searchResults.length)
+ this._currentSearchResultIndex = 0;
+ currentView = this._searchResults[this._currentSearchResultIndex];
showFirstResult = true;
}
@@ -273,11 +271,9 @@ WebInspector.Panel.prototype = {
var currentView = this._searchResults[this._currentSearchResultIndex];
if (currentView.showingFirstSearchResult()) {
- if (this.searchIteratesOverViews()) {
- if (--this._currentSearchResultIndex < 0)
- this._currentSearchResultIndex = (this._searchResults.length - 1);
- currentView = this._searchResults[this._currentSearchResultIndex];
- }
+ if (--this._currentSearchResultIndex < 0)
+ this._currentSearchResultIndex = (this._searchResults.length - 1);
+ currentView = this._searchResults[this._currentSearchResultIndex];
showLastResult = true;
}
@@ -409,11 +405,6 @@ WebInspector.Panel.prototype = {
return false;
},
- searchIteratesOverViews: function()
- {
- return false;
- },
-
elementsToRestoreScrollPositionsFor: function()
{
return [];
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 01eefc7..ff0d1ab 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -769,11 +769,6 @@ WebInspector.ResourcesPanel.prototype = {
return this.items;
},
- searchIteratesOverViews: function()
- {
- return true;
- },
-
elementsToRestoreScrollPositionsFor: function()
{
return [ this.containerElement ];
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index ae85e13..7521ea9 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -230,11 +230,6 @@ WebInspector.ScriptsPanel.prototype = {
WebInspector.Panel.prototype.hide.call(this);
},
- get searchableViews()
- {
- return [ this.visibleView ];
- },
-
get breakpointsActivated()
{
return this.toggleBreakpointsButton.toggled;
@@ -1014,6 +1009,74 @@ WebInspector.ScriptsPanel.prototype = {
section.addAlternateKeys([ shortcut1.name, shortcut2.name ], WebInspector.UIString("Step out"));
this.sidebarPanes.callstack.registerShortcuts(section);
+ },
+
+ searchCanceled: function()
+ {
+ WebInspector.updateSearchMatchesCount(0, this);
+
+ if (this._searchView)
+ this._searchView.searchCanceled();
+
+ delete this._searchView;
+ delete this._searchQuery;
+ },
+
+ performSearch: function(query)
+ {
+ if (!this.visibleView)
+ return;
+
+ // Call searchCanceled since it will reset everything we need before doing a new search.
+ this.searchCanceled();
+
+ this._searchView = this.visibleView;
+ this._searchQuery = query;
+
+ function finishedCallback(view, searchMatches)
+ {
+ if (!searchMatches)
+ return;
+
+ WebInspector.updateSearchMatchesCount(searchMatches, this);
+ view.jumpToFirstSearchResult();
+ }
+
+ this._searchView.performSearch(query, finishedCallback.bind(this));
+ },
+
+ jumpToNextSearchResult: function()
+ {
+ if (!this._searchView)
+ return;
+
+ if (this._searchView !== this.visibleView) {
+ this.performSearch(this._searchQuery);
+ return;
+ }
+
+ if (this._searchView.showingLastSearchResult())
+ this._searchView.jumpToFirstSearchResult();
+ else
+ this._searchView.jumpToNextSearchResult();
+ },
+
+ jumpToPreviousSearchResult: function()
+ {
+ if (!this._searchView)
+ return;
+
+ if (this._searchView !== this.visibleView) {
+ this.performSearch(this._searchQuery);
+ if (this._searchView)
+ this._searchView.jumpToLastSearchResult();
+ return;
+ }
+
+ if (this._searchView.showingFirstSearchResult())
+ this._searchView.jumpToLastSearchResult();
+ else
+ this._searchView.jumpToPreviousSearchResult();
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list