Bug 805759 - Relax global search results auto-expand rules, r=past

This commit is contained in:
Victor Porof 2012-11-21 10:49:45 +02:00
parent 488f19d788
commit 3142514687
9 changed files with 15 additions and 1 deletions

View File

@ -1721,6 +1721,11 @@ SourceResults.prototype = {
this.expanded ^= 1;
},
/**
* Relaxes the auto-expand rules to always show as many results as possible.
*/
alwaysExpand: true,
/**
* Gets this element's expanded state.
* @return boolean
@ -1795,7 +1800,8 @@ SourceResults.prototype = {
aElementNode.resultsHeader = resultsHeader;
aElementNode.resultsContainer = resultsContainer;
if (aExpandFlag && aMatchCount < GLOBAL_SEARCH_EXPAND_MAX_RESULTS) {
if ((aExpandFlag || this.alwaysExpand) &&
aMatchCount < GLOBAL_SEARCH_EXPAND_MAX_RESULTS) {
this.expand();
}

View File

@ -25,6 +25,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;

View File

@ -27,6 +27,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;

View File

@ -28,6 +28,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;

View File

@ -28,6 +28,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;

View File

@ -28,6 +28,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;

View File

@ -28,6 +28,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;

View File

@ -29,6 +29,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;

View File

@ -28,6 +28,7 @@ function test()
gDebuggee = aDebuggee;
gPane = aPane;
gDebugger = gPane.contentWindow;
gDebugger.SourceResults.prototype.alwaysExpand = false;
gDebugger.DebuggerController.activeThread.addOneTimeListener("framesadded", function() {
framesAdded = true;