diff --git a/CLOBBER b/CLOBBER index 69a1240162c7..26d5373f69ce 100644 --- a/CLOBBER +++ b/CLOBBER @@ -15,4 +15,4 @@ # # Note: The description below will be part of the error message shown to users. # -Bug 847120 needs a clobber +Bug 825341 appears to need a clobber diff --git a/accessible/src/generic/HyperTextAccessible.cpp b/accessible/src/generic/HyperTextAccessible.cpp index 5382a6b44c86..fbebe08fdd42 100644 --- a/accessible/src/generic/HyperTextAccessible.cpp +++ b/accessible/src/generic/HyperTextAccessible.cpp @@ -235,6 +235,7 @@ HyperTextAccessible::GetPosAndText(int32_t& aStartOffset, int32_t& aEndOffset, } nsIFrame *startFrame = nullptr; + nsIFrame* endFrame = nullptr; if (aEndFrame) { *aEndFrame = nullptr; } @@ -264,6 +265,7 @@ HyperTextAccessible::GetPosAndText(int32_t& aStartOffset, int32_t& aEndOffset, continue; } nsIFrame *primaryFrame = frame; + endFrame = frame; if (nsAccUtils::IsText(childAcc)) { // We only need info up to rendered offset -- that is what we're // converting to content offset @@ -389,9 +391,9 @@ HyperTextAccessible::GetPosAndText(int32_t& aStartOffset, int32_t& aEndOffset, NS_IF_ADDREF(*aStartAcc = lastAccessible); } if (aEndFrame && !*aEndFrame) { - *aEndFrame = startFrame; - if (aStartAcc && aEndAcc) - NS_IF_ADDREF(*aEndAcc = *aStartAcc); + *aEndFrame = endFrame; + if (aEndAcc && !*aEndAcc) + NS_IF_ADDREF(*aEndAcc = lastAccessible); } return startFrame; @@ -1824,7 +1826,7 @@ HyperTextAccessible::SetSelectionBounds(int32_t aSelectionNum, nsRefPtr range; if (aSelectionNum == rangeCount) - range = new nsRange(); + range = new nsRange(mContent); else range = domSel->GetRangeAt(aSelectionNum); @@ -1886,7 +1888,7 @@ HyperTextAccessible::ScrollSubstringTo(int32_t aStartIndex, int32_t aEndIndex, if (IsDefunct()) return NS_ERROR_FAILURE; - nsRefPtr range = new nsRange(); + nsRefPtr range = new nsRange(mContent); nsresult rv = HypertextOffsetsToDOMRange(aStartIndex, aEndIndex, range); NS_ENSURE_SUCCESS(rv, rv); @@ -1910,7 +1912,7 @@ HyperTextAccessible::ScrollSubstringToPoint(int32_t aStartIndex, nsIntPoint coords = nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordinateType, this); - nsRefPtr range = new nsRange(); + nsRefPtr range = new nsRange(mContent); nsresult rv = HypertextOffsetsToDOMRange(aStartIndex, aEndIndex, range); NS_ENSURE_SUCCESS(rv, rv); diff --git a/accessible/src/windows/msaa/TextLeafAccessibleWrap.cpp b/accessible/src/windows/msaa/TextLeafAccessibleWrap.cpp index eac78d1b3cd6..8c0786a27897 100644 --- a/accessible/src/windows/msaa/TextLeafAccessibleWrap.cpp +++ b/accessible/src/windows/msaa/TextLeafAccessibleWrap.cpp @@ -158,7 +158,7 @@ TextLeafAccessibleWrap::scrollToSubstring( if (IsDefunct()) return E_FAIL; - nsRefPtr range = new nsRange(); + nsRefPtr range = new nsRange(mContent); if (NS_FAILED(range->SetStart(mContent, aStartIndex))) return E_FAIL; diff --git a/accessible/tests/mochitest/editabletext/test_1.html b/accessible/tests/mochitest/editabletext/test_1.html index c6efd061add9..0dadddf482e9 100644 --- a/accessible/tests/mochitest/editabletext/test_1.html +++ b/accessible/tests/mochitest/editabletext/test_1.html @@ -20,9 +20,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=452161 + + + + diff --git a/content/canvas/src/CanvasRenderingContext2D.cpp b/content/canvas/src/CanvasRenderingContext2D.cpp index 43bd4e069265..044c60d6b89c 100644 --- a/content/canvas/src/CanvasRenderingContext2D.cpp +++ b/content/canvas/src/CanvasRenderingContext2D.cpp @@ -569,10 +569,9 @@ CanvasRenderingContext2D::~CanvasRenderingContext2D() } JSObject* -CanvasRenderingContext2D::WrapObject(JSContext *cx, JSObject *scope, - bool *triedToWrap) +CanvasRenderingContext2D::WrapObject(JSContext *cx, JSObject *scope) { - return CanvasRenderingContext2DBinding::Wrap(cx, scope, this, triedToWrap); + return CanvasRenderingContext2DBinding::Wrap(cx, scope, this); } bool diff --git a/content/canvas/src/CanvasRenderingContext2D.h b/content/canvas/src/CanvasRenderingContext2D.h index 53cfdc4e9e11..210400b9f25d 100644 --- a/content/canvas/src/CanvasRenderingContext2D.h +++ b/content/canvas/src/CanvasRenderingContext2D.h @@ -139,8 +139,7 @@ public: CanvasRenderingContext2D(); virtual ~CanvasRenderingContext2D(); - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, - bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; HTMLCanvasElement* GetCanvas() const { diff --git a/content/canvas/src/WebGLBuffer.cpp b/content/canvas/src/WebGLBuffer.cpp index c7b93b51ee80..f51dd1e5ca26 100644 --- a/content/canvas/src/WebGLBuffer.cpp +++ b/content/canvas/src/WebGLBuffer.cpp @@ -56,8 +56,8 @@ WebGLBuffer::ElementArrayCacheBufferSubData(size_t pos, const void* ptr, size_t } JSObject* -WebGLBuffer::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) { - return dom::WebGLBufferBinding::Wrap(cx, scope, this, triedToWrap); +WebGLBuffer::WrapObject(JSContext *cx, JSObject *scope) { + return dom::WebGLBufferBinding::Wrap(cx, scope, this); } NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLBuffer) diff --git a/content/canvas/src/WebGLBuffer.h b/content/canvas/src/WebGLBuffer.h index f0b9fa6a8180..c20034ce264b 100644 --- a/content/canvas/src/WebGLBuffer.h +++ b/content/canvas/src/WebGLBuffer.h @@ -56,7 +56,7 @@ public: return Context(); } - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebGLBuffer) diff --git a/content/canvas/src/WebGLContext.cpp b/content/canvas/src/WebGLContext.cpp index 35455eb63321..f35c95be2d35 100644 --- a/content/canvas/src/WebGLContext.cpp +++ b/content/canvas/src/WebGLContext.cpp @@ -207,11 +207,9 @@ WebGLContext::~WebGLContext() } JSObject* -WebGLContext::WrapObject(JSContext *cx, JSObject *scope, - bool *triedToWrap) +WebGLContext::WrapObject(JSContext *cx, JSObject *scope) { - return dom::WebGLRenderingContextBinding::Wrap(cx, scope, this, - triedToWrap); + return dom::WebGLRenderingContextBinding::Wrap(cx, scope, this); } void diff --git a/content/canvas/src/WebGLContext.h b/content/canvas/src/WebGLContext.h index cad66fa8b9ab..6d0fb2766c59 100644 --- a/content/canvas/src/WebGLContext.h +++ b/content/canvas/src/WebGLContext.h @@ -196,8 +196,7 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(WebGLContext, nsIDOMWebGLRenderingContext) - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, - bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; NS_DECL_NSIDOMWEBGLRENDERINGCONTEXT diff --git a/content/canvas/src/WebGLExtensions.h b/content/canvas/src/WebGLExtensions.h index 8e12cd131c79..02fc68a0ec87 100644 --- a/content/canvas/src/WebGLExtensions.h +++ b/content/canvas/src/WebGLExtensions.h @@ -28,12 +28,12 @@ public: }; #define DECL_WEBGL_EXTENSION_GOOP \ - JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); + JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; #define IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionType) \ JSObject* \ - WebGLExtensionType::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) { \ - return dom::WebGLExtensionType##Binding::Wrap(cx, scope, this, triedToWrap); \ + WebGLExtensionType::WrapObject(JSContext *cx, JSObject *scope) { \ + return dom::WebGLExtensionType##Binding::Wrap(cx, scope, this); \ } class WebGLExtensionCompressedTextureATC diff --git a/content/canvas/src/WebGLFramebuffer.cpp b/content/canvas/src/WebGLFramebuffer.cpp index 0126d82edd29..cb851bcd4e26 100644 --- a/content/canvas/src/WebGLFramebuffer.cpp +++ b/content/canvas/src/WebGLFramebuffer.cpp @@ -11,8 +11,8 @@ using namespace mozilla; JSObject* -WebGLFramebuffer::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) { - return dom::WebGLFramebufferBinding::Wrap(cx, scope, this, triedToWrap); +WebGLFramebuffer::WrapObject(JSContext *cx, JSObject *scope) { + return dom::WebGLFramebufferBinding::Wrap(cx, scope, this); } WebGLFramebuffer::WebGLFramebuffer(WebGLContext *context) diff --git a/content/canvas/src/WebGLFramebuffer.h b/content/canvas/src/WebGLFramebuffer.h index e669a5c35c89..c9060ae957d8 100644 --- a/content/canvas/src/WebGLFramebuffer.h +++ b/content/canvas/src/WebGLFramebuffer.h @@ -158,7 +158,7 @@ public: return Context(); } - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebGLFramebuffer) diff --git a/content/canvas/src/WebGLProgram.cpp b/content/canvas/src/WebGLProgram.cpp index c1ba24b07801..2bd59e8fbe83 100644 --- a/content/canvas/src/WebGLProgram.cpp +++ b/content/canvas/src/WebGLProgram.cpp @@ -44,8 +44,8 @@ static bool SplitLastSquareBracket(nsACString& string, nsCString& bracketPart) } JSObject* -WebGLProgram::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) { - return dom::WebGLProgramBinding::Wrap(cx, scope, this, triedToWrap); +WebGLProgram::WrapObject(JSContext *cx, JSObject *scope) { + return dom::WebGLProgramBinding::Wrap(cx, scope, this); } WebGLProgram::WebGLProgram(WebGLContext *context) diff --git a/content/canvas/src/WebGLProgram.h b/content/canvas/src/WebGLProgram.h index 88b00176c191..18fa4da03346 100644 --- a/content/canvas/src/WebGLProgram.h +++ b/content/canvas/src/WebGLProgram.h @@ -102,7 +102,7 @@ public: return Context(); } - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebGLProgram) diff --git a/content/canvas/src/WebGLRenderbuffer.cpp b/content/canvas/src/WebGLRenderbuffer.cpp index 129c71472afb..821ffc8d3903 100644 --- a/content/canvas/src/WebGLRenderbuffer.cpp +++ b/content/canvas/src/WebGLRenderbuffer.cpp @@ -11,8 +11,8 @@ using namespace mozilla; JSObject* -WebGLRenderbuffer::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) { - return dom::WebGLRenderbufferBinding::Wrap(cx, scope, this, triedToWrap); +WebGLRenderbuffer::WrapObject(JSContext *cx, JSObject *scope) { + return dom::WebGLRenderbufferBinding::Wrap(cx, scope, this); } WebGLRenderbuffer::WebGLRenderbuffer(WebGLContext *context) diff --git a/content/canvas/src/WebGLRenderbuffer.h b/content/canvas/src/WebGLRenderbuffer.h index afb740aaf6bd..d1ad5ccaa0bd 100644 --- a/content/canvas/src/WebGLRenderbuffer.h +++ b/content/canvas/src/WebGLRenderbuffer.h @@ -50,7 +50,7 @@ public: return Context(); } - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebGLRenderbuffer) diff --git a/content/canvas/src/WebGLShader.cpp b/content/canvas/src/WebGLShader.cpp index 54adefb05797..20de0f042dc7 100644 --- a/content/canvas/src/WebGLShader.cpp +++ b/content/canvas/src/WebGLShader.cpp @@ -11,8 +11,8 @@ using namespace mozilla; JSObject* -WebGLShader::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) { - return dom::WebGLShaderBinding::Wrap(cx, scope, this, triedToWrap); +WebGLShader::WrapObject(JSContext *cx, JSObject *scope) { + return dom::WebGLShaderBinding::Wrap(cx, scope, this); } WebGLShader::WebGLShader(WebGLContext *context, WebGLenum stype) diff --git a/content/canvas/src/WebGLShader.h b/content/canvas/src/WebGLShader.h index 0a7e421dec7a..ee15507639c3 100644 --- a/content/canvas/src/WebGLShader.h +++ b/content/canvas/src/WebGLShader.h @@ -115,7 +115,7 @@ public: return Context(); } - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebGLShader) diff --git a/content/canvas/src/WebGLTexture.cpp b/content/canvas/src/WebGLTexture.cpp index 6eadd364e612..bcf00dd1b0e3 100644 --- a/content/canvas/src/WebGLTexture.cpp +++ b/content/canvas/src/WebGLTexture.cpp @@ -12,8 +12,8 @@ using namespace mozilla; JSObject* -WebGLTexture::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) { - return dom::WebGLTextureBinding::Wrap(cx, scope, this, triedToWrap); +WebGLTexture::WrapObject(JSContext *cx, JSObject *scope) { + return dom::WebGLTextureBinding::Wrap(cx, scope, this); } WebGLTexture::WebGLTexture(WebGLContext *context) diff --git a/content/canvas/src/WebGLTexture.h b/content/canvas/src/WebGLTexture.h index 971a4ff75fd9..f6448846fabc 100644 --- a/content/canvas/src/WebGLTexture.h +++ b/content/canvas/src/WebGLTexture.h @@ -52,7 +52,7 @@ public: return Context(); } - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebGLTexture) diff --git a/content/events/public/nsEventNameList.h b/content/events/public/nsEventNameList.h index ae50e5f9774f..cb488cd99c4d 100644 --- a/content/events/public/nsEventNameList.h +++ b/content/events/public/nsEventNameList.h @@ -671,27 +671,27 @@ NON_IDL_EVENT(underflow, NON_IDL_EVENT(SVGLoad, NS_SVG_LOAD, EventNameType_None, - NS_SVG_EVENT) + NS_EVENT) NON_IDL_EVENT(SVGUnload, NS_SVG_UNLOAD, EventNameType_None, - NS_SVG_EVENT) + NS_EVENT) NON_IDL_EVENT(SVGAbort, NS_SVG_ABORT, EventNameType_None, - NS_SVG_EVENT) + NS_EVENT) NON_IDL_EVENT(SVGError, NS_SVG_ERROR, EventNameType_None, - NS_SVG_EVENT) + NS_EVENT) NON_IDL_EVENT(SVGResize, NS_SVG_RESIZE, EventNameType_None, - NS_SVG_EVENT) + NS_EVENT) NON_IDL_EVENT(SVGScroll, NS_SVG_SCROLL, EventNameType_None, - NS_SVG_EVENT) + NS_EVENT) NON_IDL_EVENT(SVGZoom, NS_SVG_ZOOM, diff --git a/content/events/src/nsContentEventHandler.cpp b/content/events/src/nsContentEventHandler.cpp index 45011d852200..de978925bf4c 100644 --- a/content/events/src/nsContentEventHandler.cpp +++ b/content/events/src/nsContentEventHandler.cpp @@ -515,7 +515,7 @@ nsContentEventHandler::OnQueryTextContent(nsQueryContentEvent* aEvent) NS_ASSERTION(aEvent->mReply.mString.IsEmpty(), "The reply string must be empty"); - nsRefPtr range = new nsRange(); + nsRefPtr range = new nsRange(mRootContent); rv = SetRangeFromFlatTextOffset(range, aEvent->mInput.mOffset, aEvent->mInput.mLength, false); NS_ENSURE_SUCCESS(rv, rv); @@ -572,7 +572,7 @@ nsContentEventHandler::OnQueryTextRect(nsQueryContentEvent* aEvent) if (NS_FAILED(rv)) return rv; - nsRefPtr range = new nsRange(); + nsRefPtr range = new nsRange(mRootContent); rv = SetRangeFromFlatTextOffset(range, aEvent->mInput.mOffset, aEvent->mInput.mLength, true); NS_ENSURE_SUCCESS(rv, rv); @@ -716,7 +716,7 @@ nsContentEventHandler::OnQueryCaretRect(nsQueryContentEvent* aEvent) } // Otherwise, we should set the guessed caret rect. - nsRefPtr range = new nsRange(); + nsRefPtr range = new nsRange(mRootContent); rv = SetRangeFromFlatTextOffset(range, aEvent->mInput.mOffset, 0, true); NS_ENSURE_SUCCESS(rv, rv); @@ -899,9 +899,10 @@ nsContentEventHandler::GetFlatTextOffsetOfRange(nsIContent* aRootContent, int32_t aNodeOffset, uint32_t* aNativeOffset) { + NS_ENSURE_STATE(aRootContent); NS_ASSERTION(aNativeOffset, "param is invalid"); - nsRefPtr prev = new nsRange(); + nsRefPtr prev = new nsRange(aRootContent); nsCOMPtr rootDOMNode(do_QueryInterface(aRootContent)); prev->SetStart(rootDOMNode, 0); @@ -1033,7 +1034,7 @@ nsContentEventHandler::OnSelectionEvent(nsSelectionEvent* aEvent) } // Get range from offset and length - nsRefPtr range = new nsRange(); + nsRefPtr range = new nsRange(mRootContent); NS_ENSURE_TRUE(range, NS_ERROR_OUT_OF_MEMORY); rv = SetRangeFromFlatTextOffset(range, aEvent->mOffset, aEvent->mLength, aEvent->mExpandToClusterBoundary); diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index 1aef763308c8..4697e37db37e 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -760,13 +760,6 @@ nsDOMEvent::DuplicatePrivateData() static_cast(mEvent)->detail); break; } - case NS_SVG_EVENT: - { - newEvent = new nsEvent(false, msg); - NS_ENSURE_TRUE(newEvent, NS_ERROR_OUT_OF_MEMORY); - newEvent->eventStructType = NS_SVG_EVENT; - break; - } case NS_SVGZOOM_EVENT: { newEvent = new nsGUIEvent(false, msg, nullptr); diff --git a/content/events/src/nsDOMEvent.h b/content/events/src/nsDOMEvent.h index 4811df1c0e06..7ed881797cca 100644 --- a/content/events/src/nsDOMEvent.h +++ b/content/events/src/nsDOMEvent.h @@ -79,9 +79,9 @@ public: return mOwner; } - virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) + virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE { - return mozilla::dom::EventBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return mozilla::dom::EventBinding::Wrap(aCx, aScope, this); } // nsIDOMEvent Interface @@ -176,6 +176,11 @@ public: return d; } + bool MultipleActionsPrevented() + { + return mEvent->mFlags.mMultipleActionsPrevented; + } + bool IsTrusted() { bool i; diff --git a/content/events/src/nsEventDispatcher.cpp b/content/events/src/nsEventDispatcher.cpp index 863800a5385d..fb2d63b0815d 100644 --- a/content/events/src/nsEventDispatcher.cpp +++ b/content/events/src/nsEventDispatcher.cpp @@ -744,9 +744,6 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner, case NS_CLIPBOARD_EVENT: return NS_NewDOMClipboardEvent(aDOMEvent, aOwner, aPresContext, static_cast(aEvent)); - case NS_SVG_EVENT: - return NS_NewDOMSVGEvent(aDOMEvent, aOwner, aPresContext, - aEvent); case NS_SVGZOOM_EVENT: return NS_NewDOMSVGZoomEvent(aDOMEvent, aOwner, aPresContext, static_cast(aEvent)); @@ -807,11 +804,10 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner, return NS_NewDOMUIEvent(aDOMEvent, aOwner, aPresContext, nullptr); if (aEventType.LowerCaseEqualsLiteral("event") || aEventType.LowerCaseEqualsLiteral("events") || - aEventType.LowerCaseEqualsLiteral("htmlevents")) - return NS_NewDOMEvent(aDOMEvent, aOwner, aPresContext, nullptr); - if (aEventType.LowerCaseEqualsLiteral("svgevent") || + aEventType.LowerCaseEqualsLiteral("htmlevents") || + aEventType.LowerCaseEqualsLiteral("svgevent") || aEventType.LowerCaseEqualsLiteral("svgevents")) - return NS_NewDOMSVGEvent(aDOMEvent, aOwner, aPresContext, nullptr); + return NS_NewDOMEvent(aDOMEvent, aOwner, aPresContext, nullptr); if (aEventType.LowerCaseEqualsLiteral("svgzoomevent") || aEventType.LowerCaseEqualsLiteral("svgzoomevents")) return NS_NewDOMSVGZoomEvent(aDOMEvent, aOwner, aPresContext, nullptr); diff --git a/content/events/src/nsPaintRequest.cpp b/content/events/src/nsPaintRequest.cpp index f5f2ddd776de..5db9d5b67b14 100644 --- a/content/events/src/nsPaintRequest.cpp +++ b/content/events/src/nsPaintRequest.cpp @@ -25,9 +25,9 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsPaintRequest) NS_IMPL_CYCLE_COLLECTING_RELEASE(nsPaintRequest) /* virtual */ JSObject* -nsPaintRequest::WrapObject(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) +nsPaintRequest::WrapObject(JSContext* aCx, JSObject* aScope) { - return PaintRequestBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return PaintRequestBinding::Wrap(aCx, aScope, this); } already_AddRefed @@ -65,11 +65,9 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsPaintRequestList) NS_IMPL_CYCLE_COLLECTING_RELEASE(nsPaintRequestList) JSObject* -nsPaintRequestList::WrapObject(JSContext *cx, JSObject *scope, - bool *triedToWrap) +nsPaintRequestList::WrapObject(JSContext *cx, JSObject *scope) { - return mozilla::dom::PaintRequestListBinding::Wrap(cx, scope, this, - triedToWrap); + return mozilla::dom::PaintRequestListBinding::Wrap(cx, scope, this); } NS_IMETHODIMP diff --git a/content/events/src/nsPaintRequest.h b/content/events/src/nsPaintRequest.h index 6d312db32c2b..ffad00c02c66 100644 --- a/content/events/src/nsPaintRequest.h +++ b/content/events/src/nsPaintRequest.h @@ -29,8 +29,7 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsPaintRequest) NS_DECL_NSIDOMPAINTREQUEST - virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope, - bool* aTriedToWrap) MOZ_OVERRIDE; + virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; nsIDOMEvent* GetParentObject() const { @@ -66,8 +65,7 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsPaintRequestList) NS_DECL_NSIDOMPAINTREQUESTLIST - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, - bool *triedToWrap); + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; nsISupports* GetParentObject() { return mParent; diff --git a/content/html/content/public/nsIHTMLCollection.h b/content/html/content/public/nsIHTMLCollection.h index c7f83634985f..53b3e73963f3 100644 --- a/content/html/content/public/nsIHTMLCollection.h +++ b/content/html/content/public/nsIHTMLCollection.h @@ -76,8 +76,7 @@ public: CallQueryInterface(this, &cache); return cache->GetWrapperPreserveColor(); } - virtual JSObject* WrapObject(JSContext *cx, JSObject *scope, - bool *triedToWrap) = 0; + virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLCollection, NS_IHTMLCOLLECTION_IID) diff --git a/content/html/content/src/HTMLAnchorElement.cpp b/content/html/content/src/HTMLAnchorElement.cpp index cf581c859eb6..845c054e6bbe 100644 --- a/content/html/content/src/HTMLAnchorElement.cpp +++ b/content/html/content/src/HTMLAnchorElement.cpp @@ -57,9 +57,9 @@ NS_HTML_CONTENT_INTERFACE_MAP_END NS_IMPL_ELEMENT_CLONE(HTMLAnchorElement) JSObject* -HTMLAnchorElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap) +HTMLAnchorElement::WrapNode(JSContext *aCx, JSObject *aScope) { - return HTMLAnchorElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return HTMLAnchorElementBinding::Wrap(aCx, aScope, this); } NS_IMPL_STRING_ATTR(HTMLAnchorElement, Charset, charset) diff --git a/content/html/content/src/HTMLAnchorElement.h b/content/html/content/src/HTMLAnchorElement.h index 74ee0c0a0695..17b2eb369222 100644 --- a/content/html/content/src/HTMLAnchorElement.h +++ b/content/html/content/src/HTMLAnchorElement.h @@ -201,8 +201,7 @@ public: protected: virtual void GetItemValueText(nsAString& text); virtual void SetItemValueText(const nsAString& text); - virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope, - bool *aTriedToWrap) MOZ_OVERRIDE; + virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE; }; } // namespace dom diff --git a/content/html/content/src/HTMLAreaElement.cpp b/content/html/content/src/HTMLAreaElement.cpp index e2d33191db67..48839c50edef 100644 --- a/content/html/content/src/HTMLAreaElement.cpp +++ b/content/html/content/src/HTMLAreaElement.cpp @@ -244,9 +244,9 @@ HTMLAreaElement::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const } JSObject* -HTMLAreaElement::WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) +HTMLAreaElement::WrapNode(JSContext* aCx, JSObject* aScope) { - return HTMLAreaElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return HTMLAreaElementBinding::Wrap(aCx, aScope, this); } } // namespace dom diff --git a/content/html/content/src/HTMLAreaElement.h b/content/html/content/src/HTMLAreaElement.h index 80ddd0c94e96..7d6669bd617d 100644 --- a/content/html/content/src/HTMLAreaElement.h +++ b/content/html/content/src/HTMLAreaElement.h @@ -161,8 +161,7 @@ public: } protected: - virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope, - bool* aTriedToWrap) MOZ_OVERRIDE; + virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; virtual void GetItemValueText(nsAString& text); virtual void SetItemValueText(const nsAString& text); diff --git a/content/html/content/src/HTMLBRElement.cpp b/content/html/content/src/HTMLBRElement.cpp index f2da13cbc8d1..625b93ecd164 100644 --- a/content/html/content/src/HTMLBRElement.cpp +++ b/content/html/content/src/HTMLBRElement.cpp @@ -106,10 +106,9 @@ HTMLBRElement::GetAttributeMappingFunction() const } JSObject* -HTMLBRElement::WrapNode(JSContext *aCx, JSObject *aScope, - bool* aTriedToWrap) +HTMLBRElement::WrapNode(JSContext *aCx, JSObject *aScope) { - return HTMLBRElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return HTMLBRElementBinding::Wrap(aCx, aScope, this); } } // namespace dom diff --git a/content/html/content/src/HTMLBRElement.h b/content/html/content/src/HTMLBRElement.h index e7d08cca0216..e492607e363a 100644 --- a/content/html/content/src/HTMLBRElement.h +++ b/content/html/content/src/HTMLBRElement.h @@ -53,8 +53,7 @@ public: return SetHTMLAttr(nsGkAtoms::clear, aClear, aError); } - virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope, - bool *aTriedToWrap); + virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE; }; } // namespace dom diff --git a/content/html/content/src/HTMLBodyElement.cpp b/content/html/content/src/HTMLBodyElement.cpp index c0e8e3bed158..d87d44dbf5c3 100644 --- a/content/html/content/src/HTMLBodyElement.cpp +++ b/content/html/content/src/HTMLBodyElement.cpp @@ -194,9 +194,9 @@ HTMLBodyElement::~HTMLBodyElement() } JSObject* -HTMLBodyElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap) +HTMLBodyElement::WrapNode(JSContext *aCx, JSObject *aScope) { - return HTMLBodyElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return HTMLBodyElementBinding::Wrap(aCx, aScope, this); } NS_IMPL_ADDREF_INHERITED(HTMLBodyElement, Element) diff --git a/content/html/content/src/HTMLBodyElement.h b/content/html/content/src/HTMLBodyElement.h index fddaa1565f0b..e96ce501d499 100644 --- a/content/html/content/src/HTMLBodyElement.h +++ b/content/html/content/src/HTMLBodyElement.h @@ -149,8 +149,7 @@ private: nsresult GetColorHelper(nsIAtom* aAtom, nsAString& aColor); protected: - virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope, - bool *aTriedToWrap) MOZ_OVERRIDE; + virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE; nsRefPtr mContentStyleRule; }; diff --git a/content/html/content/src/HTMLButtonElement.cpp b/content/html/content/src/HTMLButtonElement.cpp index 59fdb178989b..4662a55bd50f 100644 --- a/content/html/content/src/HTMLButtonElement.cpp +++ b/content/html/content/src/HTMLButtonElement.cpp @@ -548,10 +548,9 @@ HTMLButtonElement::IntrinsicState() const } JSObject* -HTMLButtonElement::WrapNode(JSContext* aCx, JSObject* aScope, - bool* aTriedToWrap) +HTMLButtonElement::WrapNode(JSContext* aCx, JSObject* aScope) { - return HTMLButtonElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return HTMLButtonElementBinding::Wrap(aCx, aScope, this); } } // namespace dom diff --git a/content/html/content/src/HTMLButtonElement.h b/content/html/content/src/HTMLButtonElement.h index 51e53f93773b..05543831c846 100644 --- a/content/html/content/src/HTMLButtonElement.h +++ b/content/html/content/src/HTMLButtonElement.h @@ -60,7 +60,7 @@ public: virtual nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const; virtual nsIDOMNode* AsDOMNode() { return this; } virtual JSObject* - WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE; + WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; // nsIContent virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent, diff --git a/content/html/content/src/HTMLDataElement.cpp b/content/html/content/src/HTMLDataElement.cpp index 25d9f73b693c..a27dd35fc20c 100644 --- a/content/html/content/src/HTMLDataElement.cpp +++ b/content/html/content/src/HTMLDataElement.cpp @@ -34,9 +34,9 @@ NS_HTML_CONTENT_INTERFACE_MAP_END NS_IMPL_ELEMENT_CLONE(HTMLDataElement) JSObject* -HTMLDataElement::WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) +HTMLDataElement::WrapNode(JSContext* aCx, JSObject* aScope) { - return HTMLDataElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return HTMLDataElementBinding::Wrap(aCx, aScope, this); } void diff --git a/content/html/content/src/HTMLDataElement.h b/content/html/content/src/HTMLDataElement.h index 6bf6dd87df5e..011cb6a5ba05 100644 --- a/content/html/content/src/HTMLDataElement.h +++ b/content/html/content/src/HTMLDataElement.h @@ -49,8 +49,7 @@ public: virtual nsIDOMNode* AsDOMNode() { return this; } protected: - virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope, - bool* aTriedToWrap) MOZ_OVERRIDE; + virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; }; } // namespace dom diff --git a/content/html/content/src/HTMLDataListElement.cpp b/content/html/content/src/HTMLDataListElement.cpp index 2c9b02618b2b..c5fb101916d1 100644 --- a/content/html/content/src/HTMLDataListElement.cpp +++ b/content/html/content/src/HTMLDataListElement.cpp @@ -16,10 +16,9 @@ HTMLDataListElement::~HTMLDataListElement() } JSObject* -HTMLDataListElement::WrapNode(JSContext *aCx, JSObject *aScope, - bool *aTriedToWrap) +HTMLDataListElement::WrapNode(JSContext *aCx, JSObject *aScope) { - return HTMLDataListElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); + return HTMLDataListElementBinding::Wrap(aCx, aScope, this); } NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLDataListElement, diff --git a/content/html/content/src/HTMLDataListElement.h b/content/html/content/src/HTMLDataListElement.h index 71f0fc8212c3..9e6b17193033 100644 --- a/content/html/content/src/HTMLDataListElement.h +++ b/content/html/content/src/HTMLDataListElement.h @@ -59,8 +59,7 @@ public: virtual nsIDOMNode* AsDOMNode() { return this; } protected: - virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope, - bool *aTriedToWrap) MOZ_OVERRIDE; + virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE; //