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: case Events.DOCUMENT_LOAD_COMPLETE:
{ {
let position = this.contentControl.vc.position; 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 // Do not automove into the document if the virtual cursor is already
// positioned inside it. // positioned inside it.
break; break;

View File

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

View File

@ -85,6 +85,7 @@ let gPushHandler = null;
let gHawkClient = null; let gHawkClient = null;
let gLocalizedStrings = null; let gLocalizedStrings = null;
let gInitializeTimer = null; let gInitializeTimer = null;
let gFxAEnabled = true;
let gFxAOAuthClientPromise = null; let gFxAOAuthClientPromise = null;
let gFxAOAuthClient = null; let gFxAOAuthClient = null;
let gFxAOAuthTokenData = null; let gFxAOAuthTokenData = null;
@ -1073,6 +1074,13 @@ this.MozLoopService = {
return; 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 expiresTime is in the future then kick-off registration.
if (MozLoopServiceInternal.urlExpiryTimeIsInFuture()) { if (MozLoopServiceInternal.urlExpiryTimeIsInFuture()) {
gInitializeTimerFunc(); gInitializeTimerFunc();
@ -1260,6 +1268,10 @@ this.MozLoopService = {
MozLoopServiceInternal.doNotDisturb = aFlag; MozLoopServiceInternal.doNotDisturb = aFlag;
}, },
get fxAEnabled() {
return gFxAEnabled;
},
get userProfile() { get userProfile() {
return gFxAOAuthProfile; return gFxAOAuthProfile;
}, },

View File

@ -230,6 +230,12 @@ loop.panel = (function(_, mozL10n) {
render: function() { render: function() {
var cx = React.addons.classSet; 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 ( return (
React.DOM.div({className: "settings-menu dropdown"}, React.DOM.div({className: "settings-menu dropdown"},
React.DOM.a({className: "button-settings", onClick: this.showDropdownMenu, React.DOM.a({className: "button-settings", onClick: this.showDropdownMenu,
@ -248,6 +254,7 @@ loop.panel = (function(_, mozL10n) {
__("settings_menu_item_signout") : __("settings_menu_item_signout") :
__("settings_menu_item_signin"), __("settings_menu_item_signin"),
onClick: this.handleClickAuthEntry, onClick: this.handleClickAuthEntry,
displayed: navigator.mozLoop.fxAEnabled,
icon: this._isSignedIn() ? "signout" : "signin"}) icon: this._isSignedIn() ? "signout" : "signin"})
) )
) )
@ -405,7 +412,7 @@ loop.panel = (function(_, mozL10n) {
}, },
render: function() { render: function() {
if (navigator.mozLoop.userProfile) { if (!navigator.mozLoop.fxAEnabled || navigator.mozLoop.userProfile) {
return null; return null;
} }
return ( return (
@ -582,6 +589,7 @@ loop.panel = (function(_, mozL10n) {
return { return {
init: init, init: init,
UserIdentity: UserIdentity, UserIdentity: UserIdentity,
AuthLink: AuthLink,
AvailabilityDropdown: AvailabilityDropdown, AvailabilityDropdown: AvailabilityDropdown,
CallUrlResult: CallUrlResult, CallUrlResult: CallUrlResult,
PanelView: PanelView, PanelView: PanelView,

View File

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

View File

@ -25,6 +25,7 @@ describe("loop.panel", function() {
navigator.mozLoop = { navigator.mozLoop = {
doNotDisturb: true, doNotDisturb: true,
fxAEnabled: true,
getStrings: function() { getStrings: function() {
return JSON.stringify({textContent: "fakeText"}); return JSON.stringify({textContent: "fakeText"});
}, },
@ -177,8 +178,19 @@ describe("loop.panel", function() {
sinon.assert.calledOnce(navigator.mozLoop.logInToFxA); 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() { describe("SettingsDropdown", function() {
var view; var view;
@ -188,6 +200,17 @@ describe("loop.panel", function() {
navigator.mozLoop.openFxASettings = sandbox.stub(); 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", it("should show a signin entry when user is not authenticated",
function() { function() {
navigator.mozLoop.loggedInToFxA = false; 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-other-tabs.js]
[browser_dbg_breakpoints-pane.js] [browser_dbg_breakpoints-pane.js]
[browser_dbg_breakpoints-reload.js] [browser_dbg_breakpoints-reload.js]
skip-if = (os == "linux") && debug # Bug 1076830
[browser_dbg_chrome-create.js] [browser_dbg_chrome-create.js]
[browser_dbg_chrome-debugging.js] [browser_dbg_chrome-debugging.js]
[browser_dbg_clean-exit-window.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"); 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] { .tab-throbber[busy] {
list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png"); 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] { .tab-throbber[progress] {
list-style-image: url("chrome://browser/skin/tabbrowser/loading.png"); list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
animation-duration: 800ms;
animation-name: throbber-loading;
} }
.tab-throbber:not([pinned]), .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) explicit nsChildContentList(nsINode* aNode)
: mNode(aNode) : mNode(aNode)
{ {
SetIsDOMBinding();
} }
NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTING_ISUPPORTS

View File

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

View File

@ -320,7 +320,6 @@ public:
mSubtreeRoot(MOZ_THIS_IN_INITIALIZER_LIST()), mSubtreeRoot(MOZ_THIS_IN_INITIALIZER_LIST()),
mSlots(nullptr) mSlots(nullptr)
{ {
SetIsDOMBinding();
} }
#endif #endif
@ -381,11 +380,7 @@ protected:
* does some additional checks and fix-up that's common to all nodes. WrapNode * does some additional checks and fix-up that's common to all nodes. WrapNode
* should just call the DOM binding's Wrap function. * should just call the DOM binding's Wrap function.
*/ */
virtual JSObject* WrapNode(JSContext *aCx) virtual JSObject* WrapNode(JSContext *aCx) = 0;
{
MOZ_ASSERT(!IsDOMBinding(), "Someone forgot to override WrapNode");
return nullptr;
}
// Subclasses that wish to override the parent behavior should return the // Subclasses that wish to override the parent behavior should return the
// result of GetParentObjectIntenral, which handles the XBL scope stuff. // 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 // We don't add a reference to our content. It will tell us
// to drop our reference when it goes away. // to drop our reference when it goes away.
SetIsDOMBinding();
} }
NS_IMPL_CYCLE_COLLECTION_CLASS(Attr) NS_IMPL_CYCLE_COLLECTION_CLASS(Attr)
@ -388,7 +386,7 @@ Attr::Shutdown()
} }
JSObject* JSObject*
Attr::WrapObject(JSContext* aCx) Attr::WrapNode(JSContext* aCx)
{ {
return AttrBinding::Wrap(aCx, this); return AttrBinding::Wrap(aCx, this);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31,7 +31,6 @@ public:
, mZ(aZ) , mZ(aZ)
, mW(aW) , mW(aW)
{ {
SetIsDOMBinding();
} }
double X() const { return mX; } 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]) DOMQuad::DOMQuad(nsISupports* aParent, CSSPoint aPoints[4])
: mParent(aParent) : mParent(aParent)
{ {
SetIsDOMBinding();
for (uint32_t i = 0; i < 4; ++i) { for (uint32_t i = 0; i < 4; ++i) {
mPoints[i] = new DOMPoint(aParent, aPoints[i].x, aPoints[i].y); 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) DOMQuad::DOMQuad(nsISupports* aParent)
: mParent(aParent) : mParent(aParent)
{ {
SetIsDOMBinding();
} }
DOMQuad::~DOMQuad() DOMQuad::~DOMQuad()

View File

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

View File

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

View File

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

View File

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

View File

@ -39,11 +39,6 @@ class Element;
class nsBaseContentList : public nsINodeList class nsBaseContentList : public nsINodeList
{ {
public: public:
nsBaseContentList()
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsIDOMNodeList // 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 don't add a reference to our content. If it goes away,
// we'll be told to drop our reference // 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) nsDOMCaretPosition::nsDOMCaretPosition(nsINode* aNode, uint32_t aOffset)
: mOffset(aOffset), mOffsetNode(aNode), mAnonymousContentNode(nullptr) : mOffset(aOffset), mOffsetNode(aNode), mAnonymousContentNode(nullptr)
{ {
SetIsDOMBinding();
} }
nsDOMCaretPosition::~nsDOMCaretPosition() nsDOMCaretPosition::~nsDOMCaretPosition()

View File

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

View File

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

View File

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

View File

@ -59,7 +59,6 @@ private:
explicit nsDOMSerializer(nsISupports* aOwner) : mOwner(aOwner) explicit nsDOMSerializer(nsISupports* aOwner) : mOwner(aOwner)
{ {
MOZ_ASSERT(aOwner); MOZ_ASSERT(aOwner);
SetIsDOMBinding();
} }
nsCOMPtr<nsISupports> mOwner; 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 don't add a reference to our element. If it goes away,
// we'll be told to drop our reference // we'll be told to drop our reference
SetIsDOMBinding();
} }
nsDOMTokenList::~nsDOMTokenList() { } nsDOMTokenList::~nsDOMTokenList() { }

View File

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

View File

@ -2674,8 +2674,6 @@ nsINode::GetElementById(const nsAString& aId)
JSObject* JSObject*
nsINode::WrapObject(JSContext *aCx) nsINode::WrapObject(JSContext *aCx)
{ {
MOZ_ASSERT(IsDOMBinding());
// Make sure one of these is true // Make sure one of these is true
// (1) our owner document has a script handling object, // (1) our owner document has a script handling object,
// (2) Our owner document has had a script handling object, or has been marked // (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), : mDocShell(aShell), mInitialized(false), mLoadingScript(false),
mOwner(aOwner), mChromeMessageManager(aChrome) mOwner(aOwner), mChromeMessageManager(aChrome)
{ {
SetIsNotDOMBinding();
mozilla::HoldJSObjects(this); mozilla::HoldJSObjects(this);
// If owner corresponds to an <iframe mozbrowser> or <iframe mozapp>, we'll // If owner corresponds to an <iframe mozbrowser> or <iframe mozapp>, we'll

View File

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

View File

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

View File

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

View File

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

View File

@ -115,6 +115,21 @@ function xray_test()
sendSyncMessage("cpows:xray_test", {}, {element: element}); 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 // Parent->Child references should go X->parent.privilegedJunkScope->child.privilegedJunkScope->Y
// Child->Parent references should go X->child.privilegedJunkScope->parent.unprivilegedJunkScope->Y // Child->Parent references should go X->child.privilegedJunkScope->parent.unprivilegedJunkScope->Y
function compartment_test() function compartment_test()

View File

@ -205,6 +205,13 @@
is(element.foo, undefined, "DOM element does not expose content properties"); 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; let systemGlobal = this;
function recvCompartmentTest(message) { function recvCompartmentTest(message) {
let getUnprivilegedObject = message.objects.getUnprivilegedObject; let getUnprivilegedObject = message.objects.getUnprivilegedObject;
@ -300,6 +307,7 @@
mm.addMessageListener("cpows:dom_test", recvDomTest); mm.addMessageListener("cpows:dom_test", recvDomTest);
mm.addMessageListener("cpows:dom_test_after_gc", recvDomTestAfterGC); mm.addMessageListener("cpows:dom_test_after_gc", recvDomTestAfterGC);
mm.addMessageListener("cpows:xray_test", recvXrayTest); mm.addMessageListener("cpows:xray_test", recvXrayTest);
mm.addMessageListener("cpows:symbol_test", recvSymbolTest);
mm.addMessageListener("cpows:compartment_test", recvCompartmentTest); mm.addMessageListener("cpows:compartment_test", recvCompartmentTest);
mm.addMessageListener("cpows:regexp_test", recvRegExpTest); mm.addMessageListener("cpows:regexp_test", recvRegExpTest);
mm.addMessageListener("cpows:lifetime_test_1", recvLifetimeTest1); 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"); 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(); SimpleTest.finish();
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -94,6 +94,10 @@ nsHTMLDNSPrefetch::Shutdown()
bool bool
nsHTMLDNSPrefetch::IsAllowed (nsIDocument *aDocument) 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. // There is no need to do prefetch on non UI scenarios such as XMLHttpRequest.
return aDocument->IsDNSPrefetchAllowed() && aDocument->GetWindow(); 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> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=343444">Mozilla Bug 343444</a>
<p id="display"></p> <p id="display"></p>
<form> <form>
<input type="radio" name="testradio" id="start"></input> <fieldset id="testradio">
<input type="text" name="testradio"></input> <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="text" name="testradio"></input> <input type="radio" name="testradio"></input>
<input type="radio" name="testradio"></input> <input type="text" 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>
<input type="radio" 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>
</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> </form>
<script class="testbody" type="text/javascript"> <script class="testbody" type="text/javascript">
/** Test for Bug 343444 **/ /** Test for Bug 343444 **/
@ -31,11 +45,24 @@ document.getElementById("start").focus();
var count=0; var count=0;
while (count < 2) { while (count < 2) {
sendKey("DOWN"); 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") { if (document.activeElement.id == "start") {
count++; 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> </script>
</pre> </pre>
</body> </body>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -61,8 +61,6 @@ public:
const SVGLengthList &aInternalList) const SVGLengthList &aInternalList)
: mAList(aAList) : mAList(aAList)
{ {
SetIsDOMBinding();
// aInternalList must be passed in explicitly because we can't use // aInternalList must be passed in explicitly because we can't use
// InternalList() here. (Because it depends on IsAnimValList, which depends // InternalList() here. (Because it depends on IsAnimValList, which depends
// on this object having been assigned to aAList's mBaseVal or mAnimVal, // 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"); aListIndex <= MaxListIndex(), "bad arg");
NS_ABORT_IF_FALSE(IndexIsValid(), "Bad index for DOMSVGNumber!"); NS_ABORT_IF_FALSE(IndexIsValid(), "Bad index for DOMSVGNumber!");
SetIsDOMBinding();
} }
DOMSVGNumber::DOMSVGNumber(nsISupports* aParent) DOMSVGNumber::DOMSVGNumber(nsISupports* aParent)
@ -110,7 +108,6 @@ DOMSVGNumber::DOMSVGNumber(nsISupports* aParent)
, mIsAnimValItem(false) , mIsAnimValItem(false)
, mValue(0.0f) , mValue(0.0f)
{ {
SetIsDOMBinding();
} }
/* static */ already_AddRefed<DOMSVGNumber> /* static */ already_AddRefed<DOMSVGNumber>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -56,8 +56,6 @@ public:
const SVGTransformList &aInternalList) const SVGTransformList &aInternalList)
: mAList(aAList) : mAList(aAList)
{ {
SetIsDOMBinding();
// aInternalList must be passed in explicitly because we can't use // aInternalList must be passed in explicitly because we can't use
// InternalList() here. (Because it depends on IsAnimValList, which depends // InternalList() here. (Because it depends on IsAnimValList, which depends
// on this object having been assigned to aAList's mBaseVal or mAnimVal, // 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) SVGAngle(nsSVGAngle* aVal, nsSVGElement *aSVGElement, AngleType aType)
: mVal(aVal), mSVGElement(aSVGElement), mType(aType) : mVal(aVal), mSVGElement(aSVGElement), mType(aType)
{ {
SetIsDOMBinding();
} }
// WebIDL // WebIDL

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