Bug 682048 - Change Metro frame script handling to support anon/global scope (r=jimm,mbrubeck)

This commit is contained in:
Bill McCloskey 2013-11-23 21:32:32 -08:00
Родитель 181fc4be1f
Коммит 7b954d4bef
9 изменённых файлов: 44 добавлений и 12 удалений

Просмотреть файл

@ -2,6 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Cc = Components.classes;
let Ci = Components.interfaces;
Components.utils.import("resource:///modules/ContentUtil.jsm");
let Util = {
@ -408,3 +411,5 @@ Util.Timeout.prototype = {
Util[name] = copy;
}
}
this.Util = Util;

Просмотреть файл

@ -664,6 +664,7 @@ let ContentScroll = {
isRoot: isRoot });
}
};
this.ContentScroll = ContentScroll;
ContentScroll.init();

Просмотреть файл

@ -2,6 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Ci = Components.interfaces;
let Cc = Components.classes;
dump("### ConsoleAPIObserver.js loaded\n");
/*
@ -116,6 +119,7 @@ var ConsoleAPIObserver = {
return aSourceURL;
}
};
this.ConsoleAPIObserver = ConsoleAPIObserver;
ConsoleAPIObserver.init();

Просмотреть файл

@ -37,13 +37,13 @@ XPCOMUtils.defineLazyServiceGetter(this, "gFocusManager",
XPCOMUtils.defineLazyServiceGetter(this, "gDOMUtils",
"@mozilla.org/inspector/dom-utils;1", "inIDOMUtils");
let XULDocument = Ci.nsIDOMXULDocument;
let HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
let HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
let HTMLFrameElement = Ci.nsIDOMHTMLFrameElement;
let HTMLFrameSetElement = Ci.nsIDOMHTMLFrameSetElement;
let HTMLSelectElement = Ci.nsIDOMHTMLSelectElement;
let HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;
this.XULDocument = Ci.nsIDOMXULDocument;
this.HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
this.HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
this.HTMLFrameElement = Ci.nsIDOMHTMLFrameElement;
this.HTMLFrameSetElement = Ci.nsIDOMHTMLFrameSetElement;
this.HTMLSelectElement = Ci.nsIDOMHTMLSelectElement;
this.HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;
const kReferenceDpi = 240; // standard "pixel" size used in some preferences
@ -82,6 +82,7 @@ function getBoundingContentRect(aElement) {
return new Rect(r.left + offset.x, r.top + offset.y, r.width, r.height);
}
this.getBoundingContentRect = getBoundingContentRect;
/*
* getOverflowContentBoundingRect
@ -108,6 +109,7 @@ function getOverflowContentBoundingRect(aElement) {
return r;
}
this.getOverflowContentBoundingRect = getOverflowContentBoundingRect;
/*
* Content
@ -584,5 +586,6 @@ var FormSubmitObserver = {
return this;
}
};
this.Content = Content;
FormSubmitObserver.init();

Просмотреть файл

@ -2,7 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const kXLinkNamespace = "http://www.w3.org/1999/xlink";
let Ci = Components.interfaces;
let Cc = Components.classes;
this.kXLinkNamespace = "http://www.w3.org/1999/xlink";
dump("### ContextMenuHandler.js loaded\n");
@ -383,5 +386,6 @@ var ContextMenuHandler = {
this._types = this._types.filter(function(type) type.name != aName);
}
};
this.ContextMenuHandler = ContextMenuHandler;
ContextMenuHandler.init();

Просмотреть файл

@ -2,6 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Ci = Components.interfaces;
let Cc = Components.classes;
dump("### FindHandler.js loaded\n");
var FindHandler = {
@ -83,5 +86,6 @@ var FindHandler = {
timer.once(0);
}
};
this.FindHandler = FindHandler;
FindHandler.init();

Просмотреть файл

@ -576,6 +576,7 @@ FormAssistant.prototype = {
return result;
}
};
this.FormAssistant = FormAssistant;
/******************************************************************************
@ -704,6 +705,7 @@ SelectWrapper.prototype = {
}, 0);
}
};
this.SelectWrapper = SelectWrapper;
// bug 559792
@ -761,3 +763,4 @@ MenulistWrapper.prototype = {
}, 0);
}
};
this.MenulistWrapper = MenulistWrapper;

Просмотреть файл

@ -2,6 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Ci = Components.interfaces;
let Cc = Components.classes;
dump("### SelectionHandler.js loaded\n");
var SelectionHandler = {
@ -596,6 +599,7 @@ var SelectionHandler = {
}
},
};
this.SelectionHandler = SelectionHandler;
SelectionHandler.__proto__ = new SelectionPrototype();
SelectionHandler.init();

Просмотреть файл

@ -3,17 +3,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
let Ci = Components.interfaces;
let Cc = Components.classes;
/*
* SelectionPrototype - common base class used by both chrome and content selection logic.
*/
// selection node parameters for various apis
const kSelectionNodeAnchor = 1;
const kSelectionNodeFocus = 2;
this.kSelectionNodeAnchor = 1;
this.kSelectionNodeFocus = 2;
// selection type property constants
const kChromeSelector = 1;
const kContentSelector = 2;
this.kChromeSelector = 1;
this.kContentSelector = 2;
dump("### SelectionPrototype.js loaded\n");
@ -951,3 +954,4 @@ SelectionPrototype.prototype = {
this._setDebugRect(rect, aColor, true);
},
};
this.SelectionPrototype = SelectionPrototype;