зеркало из https://github.com/mozilla/gecko-dev.git
Enforce interCaps Mozilla XPIDL style (r=shaver).
This commit is contained in:
Родитель
9d72595993
Коммит
44ffcfa883
|
@ -329,9 +329,9 @@ function FindAndSelectEditorWindowWithURL(urlToMatch)
|
|||
if ( !enumerator )
|
||||
return false;
|
||||
|
||||
while ( enumerator.HasMoreElements() )
|
||||
while ( enumerator.hasMoreElements() )
|
||||
{
|
||||
var window = windowManagerInterface.convertISupportsToDOMWindow( enumerator.GetNext() );
|
||||
var window = windowManagerInterface.convertISupportsToDOMWindow( enumerator.getNext() );
|
||||
if ( window )
|
||||
{
|
||||
var didFindWindow = editorShell.checkOpenWindowForURLMatch(urlToMatch, window)
|
||||
|
|
|
@ -399,9 +399,9 @@ function fillContextMenu(name)
|
|||
if (!cmdEnum) break;
|
||||
|
||||
var nextCmdArray = new Array();
|
||||
while (cmdEnum.HasMoreElements())
|
||||
while (cmdEnum.hasMoreElements())
|
||||
{
|
||||
var cmd = cmdEnum.GetNext();
|
||||
var cmd = cmdEnum.getNext();
|
||||
if (!cmd) break;
|
||||
if (nodeIndex == 0)
|
||||
{
|
||||
|
|
|
@ -157,9 +157,9 @@ function rdf_inittree (n1, a, recurse)
|
|||
|
||||
var targets = this.ds.GetTargets(n1, a, true);
|
||||
|
||||
while (targets.HasMoreElements())
|
||||
while (targets.hasMoreElements())
|
||||
{
|
||||
var n2 = targets.GetNext().QueryInterface(nsIRDFNode);
|
||||
var n2 = targets.getNext().QueryInterface(nsIRDFNode);
|
||||
|
||||
if (recurse)
|
||||
{
|
||||
|
@ -168,9 +168,9 @@ function rdf_inittree (n1, a, recurse)
|
|||
var resN2 = n2.QueryInterface(nsIRDFResource);
|
||||
var arcs = this.ds.ArcLabelsOut(resN2);
|
||||
|
||||
while (arcs.HasMoreElements())
|
||||
while (arcs.hasMoreElements())
|
||||
{
|
||||
arc = arcs.GetNext().QueryInterface(nsIRDFNode);
|
||||
arc = arcs.getNext().QueryInterface(nsIRDFNode);
|
||||
this.clearTargets (resN2, arc, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ function CompileJSFilesInDir(dir) {
|
|||
if(!dir.isDirectory())
|
||||
return;
|
||||
var list = dir.directoryEntries;
|
||||
while(list.HasMoreElements()) {
|
||||
file = list.GetNext().QueryInterface(nsIFile);
|
||||
while(list.hasMoreElements()) {
|
||||
file = list.getNext().QueryInterface(nsIFile);
|
||||
if(file.isDirectory())
|
||||
count += CompileJSFilesInDir(file);
|
||||
else if(file.leafName.match(/\.js$/i)) {
|
||||
|
|
|
@ -7,8 +7,8 @@ function ListJSFilesInDir(dir) {
|
|||
if(!dir.isDirectory())
|
||||
return;
|
||||
var list = dir.directoryEntries;
|
||||
while(list.HasMoreElements()) {
|
||||
file = list.GetNext().QueryInterface(nsIFile);
|
||||
while(list.hasMoreElements()) {
|
||||
file = list.getNext().QueryInterface(nsIFile);
|
||||
if(file.isDirectory())
|
||||
ListJSFilesInDir(file);
|
||||
else if(file.leafName.match(/\.js$/i))
|
||||
|
|
|
@ -372,8 +372,8 @@ function ReadAndSort () {
|
|||
allAppts = new Array();
|
||||
|
||||
try {
|
||||
while (enumerator.HasMoreElements()) {
|
||||
var service = enumerator.GetNext().QueryInterface(
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var service = enumerator.getNext().QueryInterface(
|
||||
Components.interfaces.nsIRDFResource);
|
||||
|
||||
// get the title text
|
||||
|
|
|
@ -131,8 +131,8 @@ function dataSourceToObject(datasource, root)
|
|||
var result = null;
|
||||
var arcs = datasource.ArcLabelsOut(root);
|
||||
|
||||
while (arcs.HasMoreElements()) {
|
||||
var arc = arcs.GetNext().QueryInterface(nsIRDFResource);
|
||||
while (arcs.hasMoreElements()) {
|
||||
var arc = arcs.getNext().QueryInterface(nsIRDFResource);
|
||||
|
||||
var arcName = arc.Value;
|
||||
arcName = arcName.substring(NClength, arcName.length);
|
||||
|
|
|
@ -414,8 +414,8 @@ function nsIEnumerator2JSArray(enumerator, iface) {
|
|||
function nsISimpleEnumerator2JSArray(enumerator, iface) {
|
||||
var array = new Array;
|
||||
var i=0;
|
||||
while (enumerator.HasMoreElements()) {
|
||||
var element = enumerator.GetNext();
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var element = enumerator.getNext();
|
||||
array[i] = element.QueryInterface(iface);
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -349,9 +349,9 @@ function OutputEmailAddresses(parentBox, defaultParentDiv, emailAddresses, inclu
|
|||
var emailAddress = {};
|
||||
var name = {};
|
||||
|
||||
while (enumerator.HasMoreElements())
|
||||
while (enumerator.hasMoreElements())
|
||||
{
|
||||
var headerResult = enumerator.GetNext();
|
||||
var headerResult = enumerator.getNext();
|
||||
headerResult = enumerator.QueryInterface(Components.interfaces.nsIMsgHeaderParserResult);
|
||||
|
||||
// get the email and name fields
|
||||
|
|
|
@ -413,8 +413,8 @@ function nsIEnumerator2JSArray(enumerator, iface) {
|
|||
function nsISimpleEnumerator2JSArray(enumerator, iface) {
|
||||
var array = new Array;
|
||||
var i=0;
|
||||
while (enumerator.HasMoreElements()) {
|
||||
var element = enumerator.GetNext();
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var element = enumerator.getNext();
|
||||
array[i] = element.QueryInterface(iface);
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
[scriptable, uuid(D1899240-F9D2-11D2-BDD6-000064657374)]
|
||||
interface nsISimpleEnumerator : nsISupports {
|
||||
boolean HasMoreElements();
|
||||
nsISupports GetNext();
|
||||
boolean hasMoreElements();
|
||||
nsISupports getNext();
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -67,11 +67,11 @@ interface nsIBidirectionalEnumerator : nsIEnumerator {
|
|||
|
||||
/** Last will reset the list to the end. will return NS_FAILED if no items
|
||||
*/
|
||||
void Last();
|
||||
void last();
|
||||
|
||||
/** Prev will decrement the list. will return failed if already at beginning
|
||||
*/
|
||||
void Prev();
|
||||
void prev();
|
||||
};
|
||||
|
||||
%{C++
|
||||
|
|
|
@ -57,8 +57,8 @@ function ls_dir(file, recur)
|
|||
|
||||
function foreach_iter(iter, fun)
|
||||
{
|
||||
while (iter.HasMoreElements()) {
|
||||
var item = iter.GetNext().QueryInterface(nsILocalFile);
|
||||
while (iter.hasMoreElements()) {
|
||||
var item = iter.getNext().QueryInterface(nsILocalFile);
|
||||
fun(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1512,20 +1512,20 @@ function TileWindow()
|
|||
var yOffset = screen.availRight;
|
||||
do
|
||||
{
|
||||
var currentWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.GetNext() );
|
||||
var currentWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
|
||||
if ( currentWindow.screenX == screenX && currentWindow.screenY == screenY )
|
||||
{
|
||||
alreadyThere = true;
|
||||
break;
|
||||
}
|
||||
} while ( enumerator.HasMoreElements() )
|
||||
} while ( enumerator.hasMoreElements() )
|
||||
|
||||
if ( alreadyThere )
|
||||
{
|
||||
enumerator = windowManagerInterface.getEnumerator( null );
|
||||
do
|
||||
{
|
||||
var currentWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.GetNext() );
|
||||
var currentWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
|
||||
if ( currentWindow.screenX == screenX+xOffset*xShift+yOffset*xShift && currentWindow.screenY == screenY+yShift*xOffset && window != currentWindow )
|
||||
{
|
||||
xOffset++;
|
||||
|
@ -1537,7 +1537,7 @@ function TileWindow()
|
|||
}
|
||||
enumerator = windowManagerInterface.getEnumerator( null );
|
||||
}
|
||||
} while ( enumerator.HasMoreElements() )
|
||||
} while ( enumerator.hasMoreElements() )
|
||||
}
|
||||
|
||||
if ( xOffset > 0 || yOffset >0 )
|
||||
|
|
|
@ -709,9 +709,9 @@ function fillContextMenu(name)
|
|||
if (!cmdEnum) break;
|
||||
|
||||
var nextCmdArray = new Array();
|
||||
while (cmdEnum.HasMoreElements())
|
||||
while (cmdEnum.hasMoreElements())
|
||||
{
|
||||
var cmd = cmdEnum.GetNext();
|
||||
var cmd = cmdEnum.getNext();
|
||||
if (!cmd) break;
|
||||
|
||||
if (nodeIndex == 0)
|
||||
|
|
|
@ -296,8 +296,8 @@ function getDirectoryContents(parentElement, dirContents)
|
|||
|
||||
var splitFilters = currentFilter.split("; ");
|
||||
|
||||
while (dirContents.HasMoreElements()) {
|
||||
var file = dirContents.GetNext().QueryInterface(nsILocalFile);
|
||||
while (dirContents.hasMoreElements()) {
|
||||
var file = dirContents.getNext().QueryInterface(nsILocalFile);
|
||||
|
||||
/* split up the current filter since there might be more than one thing in it */
|
||||
try {
|
||||
|
|
|
@ -142,10 +142,10 @@ function ReadAvailableLanguages()
|
|||
|
||||
acceptedBundleEnum = acceptedBundle.getSimpleEnumeration();
|
||||
|
||||
while (acceptedBundleEnum.HasMoreElements()) {
|
||||
while (acceptedBundleEnum.hasMoreElements()) {
|
||||
|
||||
//progress through the bundle
|
||||
curItem = acceptedBundleEnum.GetNext();
|
||||
curItem = acceptedBundleEnum.getNext();
|
||||
|
||||
//"unpack" the item, nsIPropertyElement is now partially scriptable
|
||||
curItem = curItem.QueryInterface(Components.interfaces.nsIPropertyElement);
|
||||
|
|
|
@ -74,8 +74,8 @@ function OnSelect(event)
|
|||
|
||||
var source = RDF.GetResource(uri);
|
||||
var arcs = Registry.ArcLabelsOut(source);
|
||||
while (arcs.HasMoreElements()) {
|
||||
var property = arcs.GetNext().QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
while (arcs.hasMoreElements()) {
|
||||
var property = arcs.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
if (property == kRegistry_Subkeys)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -67,9 +67,9 @@ function fillContextMenu(name, treeName)
|
|||
if (!cmdEnum) break;
|
||||
|
||||
var nextCmdArray = new Array();
|
||||
while (cmdEnum.HasMoreElements())
|
||||
while (cmdEnum.hasMoreElements())
|
||||
{
|
||||
var cmd = cmdEnum.GetNext();
|
||||
var cmd = cmdEnum.getNext();
|
||||
if (!cmd) break;
|
||||
if (nodeIndex == 0)
|
||||
{
|
||||
|
|
|
@ -385,8 +385,8 @@ function Save()
|
|||
|
||||
// Remove all the current panels from the datasource.
|
||||
var current_panels = container.GetElements();
|
||||
while (current_panels.HasMoreElements()) {
|
||||
panel = current_panels.GetNext();
|
||||
while (current_panels.hasMoreElements()) {
|
||||
panel = current_panels.getNext();
|
||||
id = panel.QueryInterface(Components.interfaces.nsIRDFResource).Value;
|
||||
|
||||
// If this panel is not in the new list,
|
||||
|
@ -435,7 +435,7 @@ function has_element(array, element) {
|
|||
// Search for targets from resource in datasource
|
||||
function has_targets(datasource, resource) {
|
||||
var arcs = datasource.ArcLabelsOut(resource);
|
||||
return arcs.HasMoreElements();
|
||||
return arcs.hasMoreElements();
|
||||
}
|
||||
|
||||
// Use an assertion to pass a "refresh" event to all the sidebars.
|
||||
|
@ -453,11 +453,11 @@ function refresh_all_sidebars() {
|
|||
// Remove a resource and all the arcs out from it.
|
||||
function delete_resource_deeply(container, resource) {
|
||||
var arcs = container.DataSource.ArcLabelsOut(resource);
|
||||
while (arcs.HasMoreElements()) {
|
||||
var arc = arcs.GetNext();
|
||||
while (arcs.hasMoreElements()) {
|
||||
var arc = arcs.getNext();
|
||||
var targets = container.DataSource.GetTargets(resource, arc, true);
|
||||
while (targets.HasMoreElements()) {
|
||||
var target = targets.GetNext();
|
||||
while (targets.hasMoreElements()) {
|
||||
var target = targets.getNext();
|
||||
container.DataSource.Unassert(resource, arc, target, true);
|
||||
}
|
||||
}
|
||||
|
@ -467,11 +467,11 @@ function delete_resource_deeply(container, resource) {
|
|||
// Copy a resource and all its arcs out to a new container.
|
||||
function copy_resource_deeply(source_datasource, resource, dest_container) {
|
||||
var arcs = source_datasource.ArcLabelsOut(resource);
|
||||
while (arcs.HasMoreElements()) {
|
||||
var arc = arcs.GetNext();
|
||||
while (arcs.hasMoreElements()) {
|
||||
var arc = arcs.getNext();
|
||||
var targets = source_datasource.GetTargets(resource, arc, true);
|
||||
while (targets.HasMoreElements()) {
|
||||
var target = targets.GetNext();
|
||||
while (targets.hasMoreElements()) {
|
||||
var target = targets.getNext();
|
||||
dest_container.DataSource.Assert(resource, arc, target, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,9 +30,9 @@ function goQuitApplication()
|
|||
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
|
||||
var enumerator = windowManagerInterface.getEnumerator( null );
|
||||
|
||||
while ( enumerator.HasMoreElements() )
|
||||
while ( enumerator.hasMoreElements() )
|
||||
{
|
||||
var windowToClose = enumerator.GetNext();
|
||||
var windowToClose = enumerator.getNext();
|
||||
var domWindow = windowManagerInterface.convertISupportsToDOMWindow( windowToClose );
|
||||
domWindow.focus();
|
||||
if ( domWindow.tryToClose == null )
|
||||
|
|
|
@ -173,7 +173,7 @@ function CycleWindow( inType, inChromeURL )
|
|||
}
|
||||
|
||||
var enumerator = windowManagerInterface.getEnumerator( inType );
|
||||
firstWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.GetNext() );
|
||||
firstWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
|
||||
if ( firstWindow == topWindowOfType )
|
||||
{
|
||||
dump( "top most window is first window \n");
|
||||
|
@ -182,18 +182,18 @@ function CycleWindow( inType, inChromeURL )
|
|||
else
|
||||
{
|
||||
dump("find topmost window \n");
|
||||
while ( enumerator.HasMoreElements() )
|
||||
while ( enumerator.hasMoreElements() )
|
||||
{
|
||||
var nextWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.GetNext() );
|
||||
var nextWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
|
||||
if ( nextWindow == topWindowOfType )
|
||||
break;
|
||||
}
|
||||
}
|
||||
desiredWindow = firstWindow;
|
||||
if ( enumerator.HasMoreElements() )
|
||||
if ( enumerator.hasMoreElements() )
|
||||
{
|
||||
dump( "Give focus to next window in the list \n");
|
||||
desiredWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.GetNext() );
|
||||
desiredWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );
|
||||
}
|
||||
|
||||
if ( desiredWindow )
|
||||
|
|
Загрузка…
Ссылка в новой задаче