Merge m-c to fx-team. a=merge

This commit is contained in:
Ryan VanderMeulen 2014-10-07 16:12:28 -04:00
commit 65e93627d5
403 changed files with 2989 additions and 1685 deletions

View File

@ -266,7 +266,8 @@ this.EventManager.prototype = {
case Events.DOCUMENT_LOAD_COMPLETE:
{
let position = this.contentControl.vc.position;
if (position && Utils.isInSubtree(position, aEvent.accessible)) {
if (aEvent.accessible === aEvent.accessibleDocument ||
(position && Utils.isInSubtree(position, aEvent.accessible))) {
// Do not automove into the document if the virtual cursor is already
// positioned inside it.
break;

View File

@ -4834,7 +4834,8 @@
class="tab-content" align="center">
<xul:image xbl:inherits="fadein,pinned,busy,progress,selected"
class="tab-throbber"
role="presentation"/>
role="presentation"
layer="true" />
<xul:image xbl:inherits="src=image,fadein,pinned,selected"
anonid="tab-icon-image"
class="tab-icon-image"

View File

@ -474,6 +474,13 @@ function injectLoopAPI(targetWindow) {
}
},
fxAEnabled: {
enumerable: true,
get: function() {
return MozLoopService.fxAEnabled;
},
},
logInToFxA: {
enumerable: true,
writable: true,

View File

@ -85,6 +85,7 @@ let gPushHandler = null;
let gHawkClient = null;
let gLocalizedStrings = null;
let gInitializeTimer = null;
let gFxAEnabled = true;
let gFxAOAuthClientPromise = null;
let gFxAOAuthClient = null;
let gFxAOAuthTokenData = null;
@ -1073,6 +1074,13 @@ this.MozLoopService = {
return;
}
if (Services.prefs.getPrefType("loop.fxa.enabled") == Services.prefs.PREF_BOOL) {
gFxAEnabled = Services.prefs.getBoolPref("loop.fxa.enabled");
if (!gFxAEnabled) {
this.logOutFromFxA();
}
}
// If expiresTime is in the future then kick-off registration.
if (MozLoopServiceInternal.urlExpiryTimeIsInFuture()) {
gInitializeTimerFunc();
@ -1260,6 +1268,10 @@ this.MozLoopService = {
MozLoopServiceInternal.doNotDisturb = aFlag;
},
get fxAEnabled() {
return gFxAEnabled;
},
get userProfile() {
return gFxAOAuthProfile;
},

View File

@ -230,6 +230,12 @@ loop.panel = (function(_, mozL10n) {
render: function() {
var cx = React.addons.classSet;
// For now all of the menu entries require FxA so hide the whole gear if FxA is disabled.
if (!navigator.mozLoop.fxAEnabled) {
return null;
}
return (
React.DOM.div({className: "settings-menu dropdown"},
React.DOM.a({className: "button-settings", onClick: this.showDropdownMenu,
@ -248,6 +254,7 @@ loop.panel = (function(_, mozL10n) {
__("settings_menu_item_signout") :
__("settings_menu_item_signin"),
onClick: this.handleClickAuthEntry,
displayed: navigator.mozLoop.fxAEnabled,
icon: this._isSignedIn() ? "signout" : "signin"})
)
)
@ -405,7 +412,7 @@ loop.panel = (function(_, mozL10n) {
},
render: function() {
if (navigator.mozLoop.userProfile) {
if (!navigator.mozLoop.fxAEnabled || navigator.mozLoop.userProfile) {
return null;
}
return (
@ -582,6 +589,7 @@ loop.panel = (function(_, mozL10n) {
return {
init: init,
UserIdentity: UserIdentity,
AuthLink: AuthLink,
AvailabilityDropdown: AvailabilityDropdown,
CallUrlResult: CallUrlResult,
PanelView: PanelView,

View File

@ -230,6 +230,12 @@ loop.panel = (function(_, mozL10n) {
render: function() {
var cx = React.addons.classSet;
// For now all of the menu entries require FxA so hide the whole gear if FxA is disabled.
if (!navigator.mozLoop.fxAEnabled) {
return null;
}
return (
<div className="settings-menu dropdown">
<a className="button-settings" onClick={this.showDropdownMenu}
@ -248,6 +254,7 @@ loop.panel = (function(_, mozL10n) {
__("settings_menu_item_signout") :
__("settings_menu_item_signin")}
onClick={this.handleClickAuthEntry}
displayed={navigator.mozLoop.fxAEnabled}
icon={this._isSignedIn() ? "signout" : "signin"} />
</ul>
</div>
@ -405,7 +412,7 @@ loop.panel = (function(_, mozL10n) {
},
render: function() {
if (navigator.mozLoop.userProfile) {
if (!navigator.mozLoop.fxAEnabled || navigator.mozLoop.userProfile) {
return null;
}
return (
@ -582,6 +589,7 @@ loop.panel = (function(_, mozL10n) {
return {
init: init,
UserIdentity: UserIdentity,
AuthLink: AuthLink,
AvailabilityDropdown: AvailabilityDropdown,
CallUrlResult: CallUrlResult,
PanelView: PanelView,

View File

@ -25,6 +25,7 @@ describe("loop.panel", function() {
navigator.mozLoop = {
doNotDisturb: true,
fxAEnabled: true,
getStrings: function() {
return JSON.stringify({textContent: "fakeText"});
},
@ -177,8 +178,19 @@ describe("loop.panel", function() {
sinon.assert.calledOnce(navigator.mozLoop.logInToFxA);
});
it("should be hidden if FxA is not enabled",
function() {
navigator.mozLoop.fxAEnabled = false;
var view = TestUtils.renderIntoDocument(loop.panel.AuthLink());
expect(view.getDOMNode()).to.be.null;
});
afterEach(function() {
navigator.mozLoop.fxAEnabled = true;
});
});
describe("SettingsDropdown", function() {
var view;
@ -188,6 +200,17 @@ describe("loop.panel", function() {
navigator.mozLoop.openFxASettings = sandbox.stub();
});
afterEach(function() {
navigator.mozLoop.fxAEnabled = true;
});
it("should be hidden if FxA is not enabled",
function() {
navigator.mozLoop.fxAEnabled = false;
var view = TestUtils.renderIntoDocument(loop.panel.SettingsDropdown());
expect(view.getDOMNode()).to.be.null;
});
it("should show a signin entry when user is not authenticated",
function() {
navigator.mozLoop.loggedInToFxA = false;

View File

@ -139,6 +139,7 @@ skip-if = os == "mac" || e10s # Bug 895426
[browser_dbg_breakpoints-other-tabs.js]
[browser_dbg_breakpoints-pane.js]
[browser_dbg_breakpoints-reload.js]
skip-if = (os == "linux") && debug # Bug 1076830
[browser_dbg_chrome-create.js]
[browser_dbg_chrome-debugging.js]
[browser_dbg_clean-exit-window.js]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -76,30 +76,12 @@
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
}
@keyframes throbber-loading {
to {
transform: rotate(360deg);
}
}
@keyframes throbber-connecting {
from {
transform: rotate(360deg);
}
}
.tab-throbber[busy] {
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
animation-duration: 960ms;
animation-iteration-count: infinite;
animation-name: throbber-connecting;
animation-timing-function: linear;
}
.tab-throbber[progress] {
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
animation-duration: 800ms;
animation-name: throbber-loading;
}
.tab-throbber:not([pinned]),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 570 B

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -51,7 +51,6 @@ public:
explicit nsChildContentList(nsINode* aNode)
: mNode(aNode)
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS

View File

@ -754,7 +754,6 @@ class nsDOMFileList MOZ_FINAL : public nsIDOMFileList,
public:
explicit nsDOMFileList(nsISupports *aParent) : mParent(aParent)
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS

View File

@ -320,7 +320,6 @@ public:
mSubtreeRoot(MOZ_THIS_IN_INITIALIZER_LIST()),
mSlots(nullptr)
{
SetIsDOMBinding();
}
#endif
@ -381,11 +380,7 @@ protected:
* does some additional checks and fix-up that's common to all nodes. WrapNode
* should just call the DOM binding's Wrap function.
*/
virtual JSObject* WrapNode(JSContext *aCx)
{
MOZ_ASSERT(!IsDOMBinding(), "Someone forgot to override WrapNode");
return nullptr;
}
virtual JSObject* WrapNode(JSContext *aCx) = 0;
// Subclasses that wish to override the parent behavior should return the
// result of GetParentObjectIntenral, which handles the XBL scope stuff.

View File

@ -54,8 +54,6 @@ Attr::Attr(nsDOMAttributeMap *aAttrMap,
// We don't add a reference to our content. It will tell us
// to drop our reference when it goes away.
SetIsDOMBinding();
}
NS_IMPL_CYCLE_COLLECTION_CLASS(Attr)
@ -388,7 +386,7 @@ Attr::Shutdown()
}
JSObject*
Attr::WrapObject(JSContext* aCx)
Attr::WrapNode(JSContext* aCx)
{
return AttrBinding::Wrap(aCx, this);
}

View File

@ -82,7 +82,7 @@ public:
virtual nsIDOMNode* AsDOMNode() { return this; }
// WebIDL
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
// XPCOM GetName() is OK
// XPCOM GetValue() is OK

View File

@ -42,7 +42,6 @@ public:
, mBaseURI(aBaseURI)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS

View File

@ -28,7 +28,6 @@ public:
explicit DOMMatrixReadOnly(nsISupports* aParent)
: mParent(aParent), mMatrix2D(new gfx::Matrix())
{
SetIsDOMBinding();
}
DOMMatrixReadOnly(nsISupports* aParent, const DOMMatrixReadOnly& other)
@ -39,8 +38,6 @@ public:
} else {
mMatrix3D = new gfx::Matrix4x4(*other.mMatrix3D);
}
SetIsDOMBinding();
}
#define GetMatrixMember(entry2D, entry3D, default) \

View File

@ -25,7 +25,6 @@ using namespace mozilla::dom;
DOMParser::DOMParser()
: mAttemptedInit(false)
{
SetIsDOMBinding();
}
DOMParser::~DOMParser()

View File

@ -84,7 +84,6 @@ private:
explicit DOMParser(nsISupports* aOwner) : mOwner(aOwner), mAttemptedInit(false)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}
nsresult InitInternal(nsISupports* aOwner, nsIPrincipal* prin,

View File

@ -31,7 +31,6 @@ public:
, mZ(aZ)
, mW(aW)
{
SetIsDOMBinding();
}
double X() const { return mX; }

View File

@ -23,7 +23,6 @@ NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMQuad, Release)
DOMQuad::DOMQuad(nsISupports* aParent, CSSPoint aPoints[4])
: mParent(aParent)
{
SetIsDOMBinding();
for (uint32_t i = 0; i < 4; ++i) {
mPoints[i] = new DOMPoint(aParent, aPoints[i].x, aPoints[i].y);
}
@ -32,7 +31,6 @@ DOMQuad::DOMQuad(nsISupports* aParent, CSSPoint aPoints[4])
DOMQuad::DOMQuad(nsISupports* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}
DOMQuad::~DOMQuad()

View File

@ -36,7 +36,6 @@ public:
explicit DOMRectReadOnly(nsISupports* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}
nsISupports* GetParentObject() const
@ -155,7 +154,6 @@ class DOMRectList MOZ_FINAL : public nsIDOMClientRectList,
public:
explicit DOMRectList(nsISupports *aParent) : mParent(aParent)
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS

View File

@ -21,11 +21,6 @@ protected:
virtual ~DOMStringList();
public:
DOMStringList()
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList)

View File

@ -876,8 +876,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DestinationInsertionPointList)
DestinationInsertionPointList::DestinationInsertionPointList(Element* aElement)
: mParent(aElement)
{
SetIsDOMBinding();
nsTArray<nsIContent*>* destPoints = aElement->GetExistingDestInsertionPoints();
if (destPoints) {
for (uint32_t i = 0; i < destPoints->Length(); i++) {

View File

@ -20,11 +20,6 @@ class StyleSheetList : public nsIDOMStyleSheetList
, public nsWrapperCache
{
public:
StyleSheetList()
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
NS_DECL_NSIDOMSTYLESHEETLIST

View File

@ -39,11 +39,6 @@ class Element;
class nsBaseContentList : public nsINodeList
{
public:
nsBaseContentList()
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsIDOMNodeList

View File

@ -34,7 +34,6 @@ nsDOMAttributeMap::nsDOMAttributeMap(Element* aContent)
{
// We don't add a reference to our content. If it goes away,
// we'll be told to drop our reference
SetIsDOMBinding();
}
/**

View File

@ -13,7 +13,6 @@ using namespace mozilla::dom;
nsDOMCaretPosition::nsDOMCaretPosition(nsINode* aNode, uint32_t aOffset)
: mOffset(aOffset), mOffsetNode(aNode), mAnonymousContentNode(nullptr)
{
SetIsDOMBinding();
}
nsDOMCaretPosition::~nsDOMCaretPosition()

View File

@ -87,7 +87,6 @@ nsDOMFileReader::nsDOMFileReader()
mResultArrayBuffer(nullptr)
{
SetDOMStringToNull(mResult);
SetIsDOMBinding();
}
nsDOMFileReader::~nsDOMFileReader()

View File

@ -37,7 +37,6 @@ public:
nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner)
: mType(aType), mAttrNamespace(NullString()), mPrevValue(NullString()), mOwner(aOwner)
{
SetIsDOMBinding();
}
nsISupports* GetParentObject() const
@ -347,7 +346,6 @@ public:
: mOwner(aOwner), mLastPendingMutation(nullptr), mPendingMutationCount(0),
mCallback(&aCb), mWaitingForRun(false), mId(++sCount)
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMMutationObserver)

View File

@ -18,7 +18,6 @@ using namespace mozilla;
nsDOMSerializer::nsDOMSerializer()
{
SetIsDOMBinding();
}
nsDOMSerializer::~nsDOMSerializer()

View File

@ -59,7 +59,6 @@ private:
explicit nsDOMSerializer(nsISupports* aOwner) : mOwner(aOwner)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}
nsCOMPtr<nsISupports> mOwner;

View File

@ -24,7 +24,6 @@ nsDOMTokenList::nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom)
{
// We don't add a reference to our element. If it goes away,
// we'll be told to drop our reference
SetIsDOMBinding();
}
nsDOMTokenList::~nsDOMTokenList() { }

View File

@ -16,7 +16,6 @@ nsFormData::nsFormData(nsISupports* aOwner)
: nsFormSubmission(NS_LITERAL_CSTRING("UTF-8"), nullptr)
, mOwner(aOwner)
{
SetIsDOMBinding();
}
// -------------------------------------------------------------------------

View File

@ -2674,8 +2674,6 @@ nsINode::GetElementById(const nsAString& aId)
JSObject*
nsINode::WrapObject(JSContext *aCx)
{
MOZ_ASSERT(IsDOMBinding());
// Make sure one of these is true
// (1) our owner document has a script handling object,
// (2) Our owner document has had a script handling object, or has been marked

View File

@ -103,6 +103,7 @@ nsInProcessTabChildGlobal::nsInProcessTabChildGlobal(nsIDocShell* aShell,
: mDocShell(aShell), mInitialized(false), mLoadingScript(false),
mOwner(aOwner), mChromeMessageManager(aChrome)
{
SetIsNotDOMBinding();
mozilla::HoldJSObjects(this);
// If owner corresponds to an <iframe mozbrowser> or <iframe mozapp>, we'll

View File

@ -154,6 +154,10 @@ public:
return mGlobal->GetJSObject();
}
virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE
{
MOZ_CRASH("nsInProcessTabChildGlobal doesn't use DOM bindings!");
}
protected:
virtual ~nsInProcessTabChildGlobal();

View File

@ -3451,9 +3451,6 @@ void
nsObjectLoadingContent::SetupProtoChain(JSContext* aCx,
JS::Handle<JSObject*> aObject)
{
MOZ_ASSERT(nsCOMPtr<nsIContent>(do_QueryInterface(
static_cast<nsIObjectLoadingContent*>(this)))->IsDOMBinding());
if (mType != eType_Plugin) {
return;
}

View File

@ -57,7 +57,6 @@ public:
, mAssertNextInsertOrAppendNode(nullptr)
#endif
{
SetIsDOMBinding();
MOZ_ASSERT(aNode, "range isn't in a document!");
mOwner = aNode->OwnerDoc();
}

View File

@ -307,7 +307,6 @@ nsXMLHttpRequest::nsXMLHttpRequest()
mIsMappedArrayBuffer(false),
mXPCOMifier(nullptr)
{
SetIsDOMBinding();
#ifdef DEBUG
StaticAssertions();
#endif

View File

@ -115,6 +115,21 @@ function xray_test()
sendSyncMessage("cpows:xray_test", {}, {element: element});
}
function symbol_test()
{
let iterator = Symbol.iterator;
let named = Symbol.for("cpow-test");
// let unique = Symbol();
let object = {
[iterator]: iterator,
[named]: named,
// [unique]: unique,
// "unique": unique
};
sendSyncMessage("cpows:symbol_test", {}, object);
}
// Parent->Child references should go X->parent.privilegedJunkScope->child.privilegedJunkScope->Y
// Child->Parent references should go X->child.privilegedJunkScope->parent.unprivilegedJunkScope->Y
function compartment_test()

View File

@ -205,6 +205,13 @@
is(element.foo, undefined, "DOM element does not expose content properties");
}
function recvSymbolTest(message) {
let object = message.objects;
is(object[Symbol.iterator], Symbol.iterator, "Should use Symbol.iterator");
is(Symbol.keyFor(object[Symbol.for("cpow-test")]), "cpow-test", "Symbols aren't registered correctly");
// is(object.unique, object[object.unique], "Unique symbols as ids and values don't seem to work");
}
let systemGlobal = this;
function recvCompartmentTest(message) {
let getUnprivilegedObject = message.objects.getUnprivilegedObject;
@ -300,6 +307,7 @@
mm.addMessageListener("cpows:dom_test", recvDomTest);
mm.addMessageListener("cpows:dom_test_after_gc", recvDomTestAfterGC);
mm.addMessageListener("cpows:xray_test", recvXrayTest);
mm.addMessageListener("cpows:symbol_test", recvSymbolTest);
mm.addMessageListener("cpows:compartment_test", recvCompartmentTest);
mm.addMessageListener("cpows:regexp_test", recvRegExpTest);
mm.addMessageListener("cpows:lifetime_test_1", recvLifetimeTest1);

View File

@ -46,7 +46,7 @@ window.onload = function () {
});
ok(scripts.length > 0, "Should be able to find script");
is(scripts[0].sourceMapURL, "foo.js.map");
is(scripts[0].source.sourceMapURL, "foo.js.map");
SimpleTest.finish();
}

View File

@ -64,7 +64,6 @@ HTMLCanvasPrintState::HTMLCanvasPrintState(HTMLCanvasElement* aCanvas,
: mIsDone(false), mPendingNotify(false), mCanvas(aCanvas),
mContext(aContext), mCallback(aCallback)
{
SetIsDOMBinding();
}
HTMLCanvasPrintState::~HTMLCanvasPrintState()

View File

@ -24,7 +24,6 @@ using namespace mozilla::dom;
HTMLContentElement::HTMLContentElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsGenericHTMLElement(aNodeInfo), mValidSelector(true), mIsInsertionPoint(false)
{
SetIsDOMBinding();
}
HTMLContentElement::~HTMLContentElement()
@ -312,7 +311,6 @@ DistributedContentList::DistributedContentList(HTMLContentElement* aHostElement)
: mParent(aHostElement)
{
MOZ_COUNT_CTOR(DistributedContentList);
SetIsDOMBinding();
if (aHostElement->IsInsertionPoint()) {
if (aHostElement->MatchedNodes().IsEmpty()) {

View File

@ -76,7 +76,6 @@ HTMLFormControlsCollection::HTMLFormControlsCollection(HTMLFormElement* aForm)
, mElements(8)
, mNameLookupTable(HTMLFormElement::FORM_CONTROL_LIST_HASHTABLE_LENGTH)
{
SetIsDOMBinding();
}
HTMLFormControlsCollection::~HTMLFormControlsCollection()

View File

@ -2067,14 +2067,15 @@ HTMLFormElement::GetNextRadioButton(const nsAString& aName,
index = 0;
}
radio = HTMLInputElement::FromContentOrNull(radioGroup->Item(index));
if (!radio)
isRadio = radio && radio->GetType() == NS_FORM_INPUT_RADIO;
if (!isRadio) {
continue;
}
isRadio = radio->GetType() == NS_FORM_INPUT_RADIO;
if (!isRadio)
continue;
} while ((radio->Disabled() && radio != currentRadio) || !isRadio);
nsAutoString name;
radio->GetName(name);
isRadio = aName.Equals(name);
} while (!isRadio || (radio->Disabled() && radio != currentRadio));
NS_IF_ADDREF(*aRadioOut = radio);
return NS_OK;

View File

@ -35,8 +35,6 @@ namespace dom {
HTMLOptionsCollection::HTMLOptionsCollection(HTMLSelectElement* aSelect)
{
SetIsDOMBinding();
// Do not maintain a reference counted reference. When
// the select goes away, it will let us know.
mSelect = aSelect;

View File

@ -46,7 +46,6 @@ HTMLPropertiesCollection::HTMLPropertiesCollection(nsGenericHTMLElement* aRoot)
, mDoc(aRoot->GetUncomposedDoc())
, mIsDirty(true)
{
SetIsDOMBinding();
mNames = new PropertyStringList(this);
if (mDoc) {
mDoc->AddMutationObserver(this);
@ -311,7 +310,6 @@ PropertyNodeList::PropertyNodeList(HTMLPropertiesCollection* aCollection,
mParent(aParent),
mIsDirty(true)
{
SetIsDOMBinding();
if (mDoc) {
mDoc->AddMutationObserver(this);
}

View File

@ -17,7 +17,6 @@ using namespace mozilla::dom;
HTMLShadowElement::HTMLShadowElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsGenericHTMLElement(aNodeInfo), mIsInsertionPoint(false)
{
SetIsDOMBinding();
}
HTMLShadowElement::~HTMLShadowElement()

View File

@ -73,7 +73,6 @@ TableRowsCollection::TableRowsCollection(HTMLTableElement *aParent)
nsGkAtoms::tr,
false))
{
SetIsDOMBinding();
}
TableRowsCollection::~TableRowsCollection()

View File

@ -25,7 +25,6 @@ MediaError::MediaError(HTMLMediaElement* aParent, uint16_t aCode)
: mParent(aParent)
, mCode(aCode)
{
SetIsDOMBinding();
}
NS_IMETHODIMP MediaError::GetCode(uint16_t* aCode)

View File

@ -841,7 +841,6 @@ NS_INTERFACE_MAP_END
UndoManager::UndoManager(nsIContent* aNode)
: mHostNode(aNode), mInTransaction(false), mIsDisconnected(false)
{
SetIsDOMBinding();
mTxnManager = new nsTransactionManager();
}

View File

@ -24,7 +24,6 @@ NS_INTERFACE_MAP_END
ValidityState::ValidityState(nsIConstraintValidation* aConstraintValidation)
: mConstraintValidation(aConstraintValidation)
{
SetIsDOMBinding();
}
NS_IMETHODIMP

View File

@ -55,8 +55,6 @@ nsDOMStringMap::nsDOMStringMap(nsGenericHTMLElement* aElement)
: mElement(aElement),
mRemovingProp(false)
{
SetIsDOMBinding();
mElement->AddMutationObserver(this);
}

View File

@ -94,6 +94,10 @@ nsHTMLDNSPrefetch::Shutdown()
bool
nsHTMLDNSPrefetch::IsAllowed (nsIDocument *aDocument)
{
if (NS_IsAppOffline(aDocument->NodePrincipal())) {
return false;
}
// There is no need to do prefetch on non UI scenarios such as XMLHttpRequest.
return aDocument->IsDNSPrefetchAllowed() && aDocument->GetWindow();
}

View File

@ -14,16 +14,30 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=343444
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=343444">Mozilla Bug 343444</a>
<p id="display"></p>
<form>
<input type="radio" name="testradio" id="start"></input>
<input type="text" name="testradio"></input>
<input type="text" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="text" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="text" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="text" name="testradio"></input>
<fieldset id="testradio">
<input type="radio" name="testradio" id="start"></input>
<input type="text" name="testradio"></input>
<input type="text" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="text" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="text" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="radio" name="testradio"></input>
<input type="text" name="testradio"></input>
</fieldset>
<fieldset>
<input type="radio" name="testtwo" id="start2"></input>
<input type="radio" name="testtwo"></input>
<input type="radio" name="error" id="testtwo"></input>
<input type="radio" name="testtwo" id="end"></input>
</fieldset>
<fieldset>
<input type="radio" name="testthree" id="start3"></input>
<input type="radio" name="errorthree" id="testthree"></input>
</fieldset>
</form>
<script class="testbody" type="text/javascript">
/** Test for Bug 343444 **/
@ -31,11 +45,24 @@ document.getElementById("start").focus();
var count=0;
while (count < 2) {
sendKey("DOWN");
ok(document.activeElement.type == "radio", "radioGroup should ignore non-radio input fields");
is(document.activeElement.type, "radio", "radioGroup should ignore non-radio input fields");
if (document.activeElement.id == "start") {
count++;
}
}
document.getElementById("start2").focus();
count = 0;
while (count < 3) {
is(document.activeElement.name, "testtwo",
"radioGroup should only contain elements with the same @name")
sendKey("DOWN");
count++;
}
document.getElementById("start3").focus();
sendKey("DOWN");
is(document.activeElement.name, "testthree", "we don't have an infinite-loop");
</script>
</pre>
</body>

View File

@ -18,7 +18,6 @@ HTMLAllCollection::HTMLAllCollection(nsHTMLDocument* aDocument)
: mDocument(aDocument)
{
MOZ_ASSERT(mDocument);
SetIsDOMBinding();
}
HTMLAllCollection::~HTMLAllCollection()

View File

@ -127,7 +127,6 @@ DOMMediaStream::DOMMediaStream()
mStream(nullptr), mHintContents(0), mTrackTypesAvailable(0),
mNotifiedOfMediaStreamGraphShutdown(false)
{
SetIsDOMBinding();
}
DOMMediaStream::~DOMMediaStream()

View File

@ -15,8 +15,6 @@ namespace dom {
MediaStreamTrack::MediaStreamTrack(DOMMediaStream* aStream, TrackID aTrackID)
: mStream(aStream), mTrackID(aTrackID), mEnded(false), mEnabled(true)
{
SetIsDOMBinding();
memset(&mID, 0, sizeof(mID));
nsresult rv;

View File

@ -43,7 +43,6 @@ void
MediaTrack::Init(nsPIDOMWindow* aOwnerWindow)
{
BindToOwner(aOwnerWindow);
SetIsDOMBinding();
}
} // namespace dom

View File

@ -35,7 +35,6 @@ NS_INTERFACE_MAP_END
TextTrackCueList::TextTrackCueList(nsISupports* aParent) : mParent(aParent)
{
SetIsDOMBinding();
}
TextTrackCueList::~TextTrackCueList()

View File

@ -46,7 +46,6 @@ TextTrackRegion::TextTrackRegion(nsISupports* aGlobal)
, mViewportAnchorX(0)
, mViewportAnchorY(100)
{
SetIsDOMBinding();
}
void

View File

@ -25,7 +25,6 @@ VideoPlaybackQuality::VideoPlaybackQuality(HTMLMediaElement* aElement,
, mDroppedFrames(aDroppedFrames)
, mCorruptedFrames(aCorruptedFrames)
{
SetIsDOMBinding();
}
HTMLMediaElement*

View File

@ -15,7 +15,6 @@ MediaKeyError::MediaKeyError(EventTarget* aOwner, uint32_t aSystemCode)
: Event(aOwner, nullptr, nullptr)
, mSystemCode(aSystemCode)
{
SetIsDOMBinding();
InitEvent(NS_LITERAL_STRING("error"), false, false);
}

View File

@ -41,7 +41,6 @@ MediaKeys::MediaKeys(nsPIDOMWindow* aParent, const nsAString& aKeySystem)
, mKeySystem(aKeySystem)
, mCreatePromiseId(0)
{
SetIsDOMBinding();
}
static PLDHashOperator

View File

@ -48,7 +48,6 @@ AudioBuffer::AudioBuffer(AudioContext* aContext, uint32_t aNumberOfChannels,
mSampleRate(aSampleRate)
{
mJSChannels.SetCapacity(aNumberOfChannels);
SetIsDOMBinding();
mozilla::HoldJSObjects(this);
}

View File

@ -26,7 +26,6 @@ AudioListener::AudioListener(AudioContext* aContext)
, mSpeedOfSound(343.3) // meters/second
{
MOZ_ASSERT(aContext);
SetIsDOMBinding();
}
JSObject*

View File

@ -72,7 +72,6 @@ AudioNode::AudioNode(AudioContext* aContext,
{
MOZ_ASSERT(aContext);
DOMEventTargetHelper::BindToOwner(aContext->GetParentObject());
SetIsDOMBinding();
aContext->UpdateNodeCount(1);
}

View File

@ -51,7 +51,6 @@ AudioParam::AudioParam(AudioNode* aNode,
, mCallback(aCallback)
, mDefaultValue(aDefaultValue)
{
SetIsDOMBinding();
}
AudioParam::~AudioParam()

View File

@ -28,7 +28,6 @@ AudioProcessingEvent::AudioProcessingEvent(ScriptProcessorNode* aOwner,
, mPlaybackTime(0.0)
, mNode(aOwner)
{
SetIsDOMBinding();
}
AudioProcessingEvent::~AudioProcessingEvent()

View File

@ -25,7 +25,6 @@ OfflineAudioCompletionEvent::OfflineAudioCompletionEvent(AudioContext* aOwner,
WidgetEvent* aEvent)
: Event(aOwner, aPresContext, aEvent)
{
SetIsDOMBinding();
}
OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent()

View File

@ -24,7 +24,6 @@ PeriodicWave::PeriodicWave(AudioContext* aContext,
: mContext(aContext)
{
MOZ_ASSERT(aContext);
SetIsDOMBinding();
// Caller should have checked this and thrown.
MOZ_ASSERT(aLength > 0);

View File

@ -23,7 +23,6 @@ NS_INTERFACE_MAP_END
SpeechGrammar::SpeechGrammar(nsISupports* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}
SpeechGrammar::~SpeechGrammar()

View File

@ -27,7 +27,6 @@ SpeechGrammarList::SpeechGrammarList(nsISupports* aParent, nsISpeechRecognitionS
: mParent(aParent)
{
this->mRecognitionService = aRecognitionService;
SetIsDOMBinding();
}
SpeechGrammarList::~SpeechGrammarList()

View File

@ -26,7 +26,6 @@ SpeechRecognitionAlternative::SpeechRecognitionAlternative(SpeechRecognition* aP
, mConfidence(0)
, mParent(aParent)
{
SetIsDOMBinding();
}
SpeechRecognitionAlternative::~SpeechRecognitionAlternative()

View File

@ -23,7 +23,6 @@ NS_INTERFACE_MAP_END
SpeechRecognitionResult::SpeechRecognitionResult(SpeechRecognition* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}
SpeechRecognitionResult::~SpeechRecognitionResult()

View File

@ -24,7 +24,6 @@ NS_INTERFACE_MAP_END
SpeechRecognitionResultList::SpeechRecognitionResultList(SpeechRecognition* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}
SpeechRecognitionResultList::~SpeechRecognitionResultList()

View File

@ -77,7 +77,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(SpeechSynthesis)
SpeechSynthesis::SpeechSynthesis(nsPIDOMWindow* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}
SpeechSynthesis::~SpeechSynthesis()

View File

@ -35,7 +35,6 @@ SpeechSynthesisUtterance::SpeechSynthesisUtterance(nsPIDOMWindow* aOwnerWindow,
, mState(STATE_NONE)
, mPaused(false)
{
SetIsDOMBinding();
}
SpeechSynthesisUtterance::~SpeechSynthesisUtterance() {}

View File

@ -24,7 +24,6 @@ SpeechSynthesisVoice::SpeechSynthesisVoice(nsISupports* aParent,
: mParent(aParent)
, mUri(aUri)
{
SetIsDOMBinding();
}
SpeechSynthesisVoice::~SpeechSynthesisVoice()

View File

@ -177,7 +177,6 @@ private:
, mAttrEnum(aAttrEnum)
, mAxis(aAxis)
{
SetIsDOMBinding();
}
~DOMSVGAnimatedLengthList();

View File

@ -107,7 +107,6 @@ private:
, mElement(aElement)
, mAttrEnum(aAttrEnum)
{
SetIsDOMBinding();
}
~DOMSVGAnimatedNumberList();

View File

@ -112,8 +112,6 @@ DOMSVGLength::DOMSVGLength(DOMSVGLengthList *aList,
aListIndex <= MaxListIndex(), "bad arg");
NS_ABORT_IF_FALSE(IndexIsValid(), "Bad index for DOMSVGNumber!");
SetIsDOMBinding();
}
DOMSVGLength::DOMSVGLength()
@ -125,7 +123,6 @@ DOMSVGLength::DOMSVGLength()
, mValue(0.0f)
, mVal(nullptr)
{
SetIsDOMBinding();
}
DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement,
@ -139,7 +136,6 @@ DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement,
, mVal(aVal)
, mSVGElement(aSVGElement)
{
SetIsDOMBinding();
}
DOMSVGLength::~DOMSVGLength()

View File

@ -61,8 +61,6 @@ public:
const SVGLengthList &aInternalList)
: mAList(aAList)
{
SetIsDOMBinding();
// aInternalList must be passed in explicitly because we can't use
// InternalList() here. (Because it depends on IsAnimValList, which depends
// on this object having been assigned to aAList's mBaseVal or mAnimVal,

View File

@ -98,8 +98,6 @@ DOMSVGNumber::DOMSVGNumber(DOMSVGNumberList *aList,
aListIndex <= MaxListIndex(), "bad arg");
NS_ABORT_IF_FALSE(IndexIsValid(), "Bad index for DOMSVGNumber!");
SetIsDOMBinding();
}
DOMSVGNumber::DOMSVGNumber(nsISupports* aParent)
@ -110,7 +108,6 @@ DOMSVGNumber::DOMSVGNumber(nsISupports* aParent)
, mIsAnimValItem(false)
, mValue(0.0f)
{
SetIsDOMBinding();
}
/* static */ already_AddRefed<DOMSVGNumber>

View File

@ -61,8 +61,6 @@ public:
const SVGNumberList &aInternalList)
: mAList(aAList)
{
SetIsDOMBinding();
// aInternalList must be passed in explicitly because we can't use
// InternalList() here. (Because it depends on IsAnimValList, which depends
// on this object having been assigned to aAList's mBaseVal or mAnimVal,

View File

@ -79,7 +79,6 @@ DOMSVGPathSeg::DOMSVGPathSeg(DOMSVGPathSegList *aList,
, mListIndex(aListIndex)
, mIsAnimValItem(aIsAnimValItem)
{
SetIsDOMBinding();
// These shifts are in sync with the members in the header.
NS_ABORT_IF_FALSE(aList &&
aListIndex <= MaxListIndex(), "bad arg");
@ -92,7 +91,6 @@ DOMSVGPathSeg::DOMSVGPathSeg()
, mListIndex(0)
, mIsAnimValItem(false)
{
SetIsDOMBinding();
}
void

View File

@ -170,8 +170,6 @@ private:
: mElement(aElement)
, mIsAnimValList(aIsAnimValList)
{
SetIsDOMBinding();
InternalListWillChangeTo(InternalList()); // Sync mItems
}

View File

@ -172,8 +172,6 @@ private:
: mElement(aElement)
, mIsAnimValList(aIsAnimValList)
{
SetIsDOMBinding();
InternalListWillChangeTo(InternalList()); // Sync mItems
}

View File

@ -100,7 +100,6 @@ private:
, mAttrEnum(aAttrEnum)
, mIsConditionalProcessingAttribute(aIsConditionalProcessingAttribute)
{
SetIsDOMBinding();
}
~DOMSVGStringList();

View File

@ -56,8 +56,6 @@ public:
const SVGTransformList &aInternalList)
: mAList(aAList)
{
SetIsDOMBinding();
// aInternalList must be passed in explicitly because we can't use
// InternalList() here. (Because it depends on IsAnimValList, which depends
// on this object having been assigned to aAList's mBaseVal or mAnimVal,

View File

@ -30,7 +30,6 @@ public:
SVGAngle(nsSVGAngle* aVal, nsSVGElement *aSVGElement, AngleType aType)
: mVal(aVal), mSVGElement(aSVGElement), mType(aType)
{
SetIsDOMBinding();
}
// WebIDL

Some files were not shown because too many files have changed in this diff Show More