From 3a27625aad7cc54b67125ff5371cb6ddce2e68b9 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Fri, 6 Jan 2012 07:32:38 -0500 Subject: [PATCH 1/4] Bug 714752: Make imgIContainerObserver::FrameChanged take an imgIRequest*. r=joe sr=roc --- content/base/src/nsImageLoadingContent.cpp | 5 +++-- content/base/src/nsStubImageDecoderObserver.cpp | 3 ++- content/svg/content/src/nsSVGFilters.cpp | 5 +++-- content/svg/content/src/nsSVGFilters.h | 3 ++- image/public/imgIContainerObserver.idl | 6 ++++-- image/public/imgIDecoderObserver.idl | 2 +- image/src/RasterImage.cpp | 4 ++-- image/src/VectorImage.cpp | 4 ++-- image/src/imgRequest.cpp | 7 +++++-- image/src/imgRequestProxy.cpp | 2 +- layout/base/nsImageLoader.cpp | 5 ++++- layout/base/nsImageLoader.h | 3 ++- layout/generic/nsBulletFrame.cpp | 8 +++++--- layout/generic/nsBulletFrame.h | 6 ++++-- layout/generic/nsImageFrame.cpp | 11 +++++++---- layout/generic/nsImageFrame.h | 6 ++++-- layout/svg/base/src/nsSVGImageFrame.cpp | 6 ++++-- layout/xul/base/src/nsImageBoxFrame.cpp | 8 +++++--- layout/xul/base/src/nsImageBoxFrame.h | 6 ++++-- layout/xul/base/src/tree/src/nsTreeImageListener.cpp | 3 ++- layout/xul/base/src/tree/src/nsTreeImageListener.h | 3 ++- toolkit/system/gnome/nsAlertsIconListener.cpp | 3 ++- widget/cocoa/nsMenuItemIconX.mm | 3 ++- 23 files changed, 72 insertions(+), 40 deletions(-) diff --git a/content/base/src/nsImageLoadingContent.cpp b/content/base/src/nsImageLoadingContent.cpp index 3a3f3a253e7..bc565bee3ab 100644 --- a/content/base/src/nsImageLoadingContent.cpp +++ b/content/base/src/nsImageLoadingContent.cpp @@ -159,10 +159,11 @@ nsImageLoadingContent::~nsImageLoadingContent() * imgIContainerObserver impl */ NS_IMETHODIMP -nsImageLoadingContent::FrameChanged(imgIContainer* aContainer, +nsImageLoadingContent::FrameChanged(imgIRequest* aRequest, + imgIContainer* aContainer, const nsIntRect* aDirtyRect) { - LOOP_OVER_OBSERVERS(FrameChanged(aContainer, aDirtyRect)); + LOOP_OVER_OBSERVERS(FrameChanged(aRequest, aContainer, aDirtyRect)); return NS_OK; } diff --git a/content/base/src/nsStubImageDecoderObserver.cpp b/content/base/src/nsStubImageDecoderObserver.cpp index 74f8aeea16e..91bac8b3883 100644 --- a/content/base/src/nsStubImageDecoderObserver.cpp +++ b/content/base/src/nsStubImageDecoderObserver.cpp @@ -113,7 +113,8 @@ nsStubImageDecoderObserver::OnImageIsAnimated(imgIRequest *aRequest) } NS_IMETHODIMP -nsStubImageDecoderObserver::FrameChanged(imgIContainer *aContainer, +nsStubImageDecoderObserver::FrameChanged(imgIRequest* aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { return NS_OK; diff --git a/content/svg/content/src/nsSVGFilters.cpp b/content/svg/content/src/nsSVGFilters.cpp index 0516dcad245..1b7411fdcd3 100644 --- a/content/svg/content/src/nsSVGFilters.cpp +++ b/content/svg/content/src/nsSVGFilters.cpp @@ -5742,11 +5742,12 @@ nsSVGFEImageElement::OnStopDecode(imgIRequest *aRequest, } NS_IMETHODIMP -nsSVGFEImageElement::FrameChanged(imgIContainer *aContainer, +nsSVGFEImageElement::FrameChanged(imgIRequest* aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { nsresult rv = - nsImageLoadingContent::FrameChanged(aContainer, aDirtyRect); + nsImageLoadingContent::FrameChanged(aRequest, aContainer, aDirtyRect); Invalidate(); return rv; } diff --git a/content/svg/content/src/nsSVGFilters.h b/content/svg/content/src/nsSVGFilters.h index c4f9e38cf8f..d72e861530b 100644 --- a/content/svg/content/src/nsSVGFilters.h +++ b/content/svg/content/src/nsSVGFilters.h @@ -298,7 +298,8 @@ public: NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg); // imgIContainerObserver - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest* aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); // imgIContainerObserver NS_IMETHOD OnStartContainer(imgIRequest *aRequest, diff --git a/image/public/imgIContainerObserver.idl b/image/public/imgIContainerObserver.idl index 30f24d750fe..361019e67d5 100644 --- a/image/public/imgIContainerObserver.idl +++ b/image/public/imgIContainerObserver.idl @@ -44,6 +44,7 @@ %} interface imgIContainer; +interface imgIRequest; [ptr] native nsIntRect(nsIntRect); /** @@ -52,9 +53,10 @@ interface imgIContainer; * @author Stuart Parmenter * @version 0.1 */ -[scriptable, uuid(aa2068c1-6b91-4f52-8603-487b14ac5f04)] +[scriptable, uuid(f01efdb3-4b20-4313-a636-a2aa01a4ef5d)] interface imgIContainerObserver : nsISupports { - [noscript] void frameChanged(in imgIContainer aContainer, + [noscript] void frameChanged(in imgIRequest aRequest, + in imgIContainer aContainer, [const] in nsIntRect aDirtyRect); }; diff --git a/image/public/imgIDecoderObserver.idl b/image/public/imgIDecoderObserver.idl index bed7cf6fc41..b7724c2fbca 100644 --- a/image/public/imgIDecoderObserver.idl +++ b/image/public/imgIDecoderObserver.idl @@ -77,7 +77,7 @@ interface imgIContainer; * @version 0.1 * @see imagelib2 */ -[scriptable, uuid(2e5fa0c4-57f8-4d16-bda3-1daeba9caa34)] +[scriptable, uuid(5ca71b89-1a2f-475f-881d-d76c1531c4c8)] interface imgIDecoderObserver : imgIContainerObserver { /** diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp index beb7b336978..bf33f74bb50 100644 --- a/image/src/RasterImage.cpp +++ b/image/src/RasterImage.cpp @@ -480,7 +480,7 @@ RasterImage::RequestRefresh(const mozilla::TimeStamp& aTime) mFramesNotified++; #endif - observer->FrameChanged(this, &dirtyRect); + observer->FrameChanged(nsnull, this, &dirtyRect); } } @@ -1423,7 +1423,7 @@ RasterImage::ResetAnimation() // Update display if we were animating before nsCOMPtr observer(do_QueryReferent(mObserver)); if (mAnimating && observer) - observer->FrameChanged(this, &(mAnim->firstFrameRefreshArea)); + observer->FrameChanged(nsnull, this, &(mAnim->firstFrameRefreshArea)); if (ShouldAnimate()) { StartAnimation(); diff --git a/image/src/VectorImage.cpp b/image/src/VectorImage.cpp index 181300cb141..611840f7dca 100644 --- a/image/src/VectorImage.cpp +++ b/image/src/VectorImage.cpp @@ -699,7 +699,7 @@ VectorImage::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt, // NOTE: This signals that width/height are available. observer->OnStartContainer(nsnull, this); - observer->FrameChanged(this, &nsIntRect::GetMaxSizedIntRect()); + observer->FrameChanged(nsnull, this, &nsIntRect::GetMaxSizedIntRect()); observer->OnStopFrame(nsnull, 0); observer->OnStopDecode(nsnull, NS_OK, nsnull); } @@ -738,7 +738,7 @@ VectorImage::InvalidateObserver() nsCOMPtr containerObs(do_QueryReferent(mObserver)); if (containerObs) { - containerObs->FrameChanged(this, &nsIntRect::GetMaxSizedIntRect()); + containerObs->FrameChanged(nsnull, this, &nsIntRect::GetMaxSizedIntRect()); } nsCOMPtr decoderObs(do_QueryReferent(mObserver)); diff --git a/image/src/imgRequest.cpp b/image/src/imgRequest.cpp index 3b0ee404f9d..ac84fc90688 100644 --- a/image/src/imgRequest.cpp +++ b/image/src/imgRequest.cpp @@ -514,8 +514,11 @@ imgRequest::RequestDecode() /** imgIContainerObserver methods **/ -/* [noscript] void frameChanged (in imgIContainer container, in nsIntRect dirtyRect); */ -NS_IMETHODIMP imgRequest::FrameChanged(imgIContainer *container, +/* [noscript] void frameChanged (in imgIRequest request, + in imgIContainer container, + in nsIntRect dirtyRect); */ +NS_IMETHODIMP imgRequest::FrameChanged(imgIRequest *request, + imgIContainer *container, const nsIntRect *dirtyRect) { LOG_SCOPE(gImgLog, "imgRequest::FrameChanged"); diff --git a/image/src/imgRequestProxy.cpp b/image/src/imgRequestProxy.cpp index dc23c1f7017..c36e9c8f804 100644 --- a/image/src/imgRequestProxy.cpp +++ b/image/src/imgRequestProxy.cpp @@ -614,7 +614,7 @@ void imgRequestProxy::FrameChanged(imgIContainer *container, if (mListener && !mCanceled) { // Hold a ref to the listener while we call it, just in case. nsCOMPtr kungFuDeathGrip(mListener); - mListener->FrameChanged(container, dirtyRect); + mListener->FrameChanged(this, container, dirtyRect); } } diff --git a/layout/base/nsImageLoader.cpp b/layout/base/nsImageLoader.cpp index 347b1738b5a..e90cc3e22c4 100644 --- a/layout/base/nsImageLoader.cpp +++ b/layout/base/nsImageLoader.cpp @@ -212,7 +212,8 @@ NS_IMETHODIMP nsImageLoader::OnStopRequest(imgIRequest *aRequest, return NS_OK; } -NS_IMETHODIMP nsImageLoader::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsImageLoader::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { if (!mFrame) @@ -223,6 +224,8 @@ NS_IMETHODIMP nsImageLoader::FrameChanged(imgIContainer *aContainer, return NS_OK; } + NS_ASSERTION(aRequest == mRequest, "This is a neat trick."); + nsRect r = aDirtyRect->IsEqualInterior(nsIntRect::GetMaxSizedIntRect()) ? nsRect(nsPoint(0, 0), mFrame->GetSize()) : aDirtyRect->ToAppUnits(nsPresContext::AppUnitsPerCSSPixel()); diff --git a/layout/base/nsImageLoader.h b/layout/base/nsImageLoader.h index 0cdba70d7f1..85e27b223b2 100644 --- a/layout/base/nsImageLoader.h +++ b/layout/base/nsImageLoader.h @@ -90,7 +90,8 @@ public: // incrementally in nsImageFrame.cpp. // imgIContainerObserver (override nsStubImageDecoderObserver) - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); void Destroy(); diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index 49120c65839..a5020a3eb6a 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -1547,7 +1547,8 @@ NS_IMETHODIMP nsBulletFrame::OnImageIsAnimated(imgIRequest* aRequest) return NS_OK; } -NS_IMETHODIMP nsBulletFrame::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsBulletFrame::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { // Invalidate the entire content area. Maybe it's not optimal but it's simple and @@ -1700,11 +1701,12 @@ NS_IMETHODIMP nsBulletListener::OnImageIsAnimated(imgIRequest *aRequest) return mFrame->OnImageIsAnimated(aRequest); } -NS_IMETHODIMP nsBulletListener::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsBulletListener::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { if (!mFrame) return NS_OK; - return mFrame->FrameChanged(aContainer, aDirtyRect); + return mFrame->FrameChanged(aRequest, aContainer, aDirtyRect); } diff --git a/layout/generic/nsBulletFrame.h b/layout/generic/nsBulletFrame.h index e7142da4334..7ab909d62e3 100644 --- a/layout/generic/nsBulletFrame.h +++ b/layout/generic/nsBulletFrame.h @@ -68,7 +68,8 @@ public: NS_IMETHOD OnImageIsAnimated(imgIRequest *aRequest); // imgIContainerObserver (override nsStubImageDecoderObserver) - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *dirtyRect); void SetFrame(nsBulletFrame *frame) { mFrame = frame; } @@ -122,7 +123,8 @@ public: nsresult aStatus, const PRUnichar *aStatusArg); NS_IMETHOD OnImageIsAnimated(imgIRequest *aRequest); - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); /* get list item text, without '.' */ diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index ca5da70dc3e..1aa47613f8d 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -682,7 +682,8 @@ nsImageFrame::OnStopDecode(imgIRequest *aRequest, } nsresult -nsImageFrame::FrameChanged(imgIContainer *aContainer, +nsImageFrame::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { if (!GetStyleVisibility()->IsVisible()) { @@ -1988,7 +1989,8 @@ nsImageFrame::IconLoad::OnDiscard(imgIRequest *aRequest) } NS_IMETHODIMP -nsImageFrame::IconLoad::FrameChanged(imgIContainer *aContainer, +nsImageFrame::IconLoad::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { nsTObserverArray::ForwardIterator iter(mIconObservers); @@ -2043,13 +2045,14 @@ NS_IMETHODIMP nsImageListener::OnStopDecode(imgIRequest *aRequest, return mFrame->OnStopDecode(aRequest, status, statusArg); } -NS_IMETHODIMP nsImageListener::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsImageListener::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { if (!mFrame) return NS_ERROR_FAILURE; - return mFrame->FrameChanged(aContainer, aDirtyRect); + return mFrame->FrameChanged(aRequest, aContainer, aDirtyRect); } static bool diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index b6bc5c63e79..caba3ba0501 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -85,7 +85,8 @@ public: NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg); // imgIContainerObserver (override nsStubImageDecoderObserver) - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *dirtyRect); void SetFrame(nsImageFrame *frame) { mFrame = frame; } @@ -237,7 +238,8 @@ protected: nsresult OnStopDecode(imgIRequest *aRequest, nsresult aStatus, const PRUnichar *aStatusArg); - nsresult FrameChanged(imgIContainer *aContainer, + nsresult FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); private: diff --git a/layout/svg/base/src/nsSVGImageFrame.cpp b/layout/svg/base/src/nsSVGImageFrame.cpp index 998b01fbcce..e42b5b836c0 100644 --- a/layout/svg/base/src/nsSVGImageFrame.cpp +++ b/layout/svg/base/src/nsSVGImageFrame.cpp @@ -62,7 +62,8 @@ public: NS_IMETHOD OnStopDecode(imgIRequest *aRequest, nsresult status, const PRUnichar *statusArg); // imgIContainerObserver (override nsStubImageDecoderObserver) - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); // imgIContainerObserver (override nsStubImageDecoderObserver) NS_IMETHOD OnStartContainer(imgIRequest *aRequest, @@ -555,7 +556,8 @@ NS_IMETHODIMP nsSVGImageListener::OnStopDecode(imgIRequest *aRequest, return NS_OK; } -NS_IMETHODIMP nsSVGImageListener::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsSVGImageListener::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { if (!mFrame) diff --git a/layout/xul/base/src/nsImageBoxFrame.cpp b/layout/xul/base/src/nsImageBoxFrame.cpp index ca07631f137..c03af4042d8 100644 --- a/layout/xul/base/src/nsImageBoxFrame.cpp +++ b/layout/xul/base/src/nsImageBoxFrame.cpp @@ -626,7 +626,8 @@ NS_IMETHODIMP nsImageBoxFrame::OnImageIsAnimated(imgIRequest *aRequest) return NS_OK; } -NS_IMETHODIMP nsImageBoxFrame::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsImageBoxFrame::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { nsBoxLayoutState state(PresContext()); @@ -681,12 +682,13 @@ NS_IMETHODIMP nsImageBoxListener::OnImageIsAnimated(imgIRequest* aRequest) return mFrame->OnImageIsAnimated(aRequest); } -NS_IMETHODIMP nsImageBoxListener::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsImageBoxListener::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { if (!mFrame) return NS_ERROR_FAILURE; - return mFrame->FrameChanged(aContainer, aDirtyRect); + return mFrame->FrameChanged(aRequest, aContainer, aDirtyRect); } diff --git a/layout/xul/base/src/nsImageBoxFrame.h b/layout/xul/base/src/nsImageBoxFrame.h index 720094af676..b7287f3fae0 100644 --- a/layout/xul/base/src/nsImageBoxFrame.h +++ b/layout/xul/base/src/nsImageBoxFrame.h @@ -61,7 +61,8 @@ public: NS_IMETHOD OnImageIsAnimated(imgIRequest* aRequest); // imgIContainerObserver (override nsStubImageDecoderObserver) - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); void SetFrame(nsImageBoxFrame *frame) { mFrame = frame; } @@ -126,7 +127,8 @@ public: const PRUnichar *statusArg); NS_IMETHOD OnImageIsAnimated(imgIRequest* aRequest); - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); virtual ~nsImageBoxFrame(); diff --git a/layout/xul/base/src/tree/src/nsTreeImageListener.cpp b/layout/xul/base/src/tree/src/nsTreeImageListener.cpp index 3155f5d9224..39356406918 100644 --- a/layout/xul/base/src/tree/src/nsTreeImageListener.cpp +++ b/layout/xul/base/src/tree/src/nsTreeImageListener.cpp @@ -84,7 +84,8 @@ NS_IMETHODIMP nsTreeImageListener::OnDataAvailable(imgIRequest *aRequest, return NS_OK; } -NS_IMETHODIMP nsTreeImageListener::FrameChanged(imgIContainer *aContainer, +NS_IMETHODIMP nsTreeImageListener::FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect) { Invalidate(); diff --git a/layout/xul/base/src/tree/src/nsTreeImageListener.h b/layout/xul/base/src/tree/src/nsTreeImageListener.h index e0beba4d915..84264950fb1 100644 --- a/layout/xul/base/src/tree/src/nsTreeImageListener.h +++ b/layout/xul/base/src/tree/src/nsTreeImageListener.h @@ -60,7 +60,8 @@ public: NS_IMETHOD OnDataAvailable(imgIRequest *aRequest, bool aCurrentFrame, const nsIntRect *aRect); // imgIContainerObserver (override nsStubImageDecoderObserver) - NS_IMETHOD FrameChanged(imgIContainer *aContainer, + NS_IMETHOD FrameChanged(imgIRequest *aRequest, + imgIContainer *aContainer, const nsIntRect *aDirtyRect); NS_IMETHOD ClearFrame(); diff --git a/toolkit/system/gnome/nsAlertsIconListener.cpp b/toolkit/system/gnome/nsAlertsIconListener.cpp index 8cf8c575d16..4bc64e072f6 100644 --- a/toolkit/system/gnome/nsAlertsIconListener.cpp +++ b/toolkit/system/gnome/nsAlertsIconListener.cpp @@ -144,7 +144,8 @@ nsAlertsIconListener::OnStopDecode(imgIRequest* aRequest, } NS_IMETHODIMP -nsAlertsIconListener::FrameChanged(imgIContainer* aContainer, +nsAlertsIconListener::FrameChanged(imgIRequest* aRequest, + imgIContainer* aContainer, const nsIntRect* aDirtyRect) { return NS_OK; diff --git a/widget/cocoa/nsMenuItemIconX.mm b/widget/cocoa/nsMenuItemIconX.mm index 13f866f2232..9505ea25da5 100644 --- a/widget/cocoa/nsMenuItemIconX.mm +++ b/widget/cocoa/nsMenuItemIconX.mm @@ -358,7 +358,8 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconURI) // NS_IMETHODIMP -nsMenuItemIconX::FrameChanged(imgIContainer* aContainer, +nsMenuItemIconX::FrameChanged(imgIRequest* aRequest, + imgIContainer* aContainer, const nsIntRect* aDirtyRect) { return NS_OK; From 40b26fb600edc7204308932f0481144eb42cf608 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Fri, 6 Jan 2012 09:44:25 -0500 Subject: [PATCH 2/4] Bug 683891: Stop exporting THEBES_API symbols from libxul. r=glandium --- gfx/thebes/gfxASurface.h | 15 +++++++++++++++ gfx/thebes/gfxTypes.h | 6 +----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gfx/thebes/gfxASurface.h b/gfx/thebes/gfxASurface.h index 94b8e9ed835..33fa4726fd7 100644 --- a/gfx/thebes/gfxASurface.h +++ b/gfx/thebes/gfxASurface.h @@ -57,9 +57,24 @@ struct nsIntRect; */ class THEBES_API gfxASurface { public: +#ifdef MOZILLA_INTERNAL_API nsrefcnt AddRef(void); nsrefcnt Release(void); + // These functions exist so that browsercomps can refcount a gfxASurface + virtual nsresult AddRefExternal(void) + { + return AddRef(); + } + virtual nsresult ReleaseExternal(void) + { + return Release(); + } +#else + virtual nsresult AddRef(void); + virtual nsresult Release(void); +#endif + public: /** * The format for an image surface. For all formats with alpha data, 0 diff --git a/gfx/thebes/gfxTypes.h b/gfx/thebes/gfxTypes.h index e12611cb631..48b53081d69 100644 --- a/gfx/thebes/gfxTypes.h +++ b/gfx/thebes/gfxTypes.h @@ -47,11 +47,7 @@ */ typedef double gfxFloat; -#if defined(IMPL_THEBES) -# define THEBES_API NS_EXPORT -#else -# define THEBES_API NS_IMPORT -#endif +# define THEBES_API /** * gfx errors From 97350bb71111ead265543fab73606853bb662aa1 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Fri, 6 Jan 2012 17:36:27 +0100 Subject: [PATCH 3/4] Bug 710562. (Av1a) Disable 2 application-specific '#ifdef' in Toolkit, as a workaround ftb. r=taras. --- toolkit/components/telemetry/TelemetryHistograms.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/toolkit/components/telemetry/TelemetryHistograms.h b/toolkit/components/telemetry/TelemetryHistograms.h index 09f963fa3d6..8f0c96a55f2 100644 --- a/toolkit/components/telemetry/TelemetryHistograms.h +++ b/toolkit/components/telemetry/TelemetryHistograms.h @@ -289,20 +289,24 @@ HISTOGRAM(UPDATE_STATUS, 1, 16006, 20, LINEAR, "Updater: the status of the lates /** * Thunderbird-specific telemetry. */ -#ifdef MOZ_THUNDERBIRD +// Disable this application-specific #ifdef ftb. (See bug 710562) +// #ifdef MOZ_THUNDERBIRD HISTOGRAM(THUNDERBIRD_GLODA_SIZE_MB, 1, 1000, 40, LINEAR, "Gloda: size of global-messages-db.sqlite (MB)") +// THUNDERBIRD_CONVERSATIONS_TIME_TO_2ND_GLODA_QUERY_MS is used by Thunderbird Conversations add-on. +// https://addons.mozilla.org/en-US/thunderbird/addon/54035/ HISTOGRAM(THUNDERBIRD_CONVERSATIONS_TIME_TO_2ND_GLODA_QUERY_MS, 1, 10000, 30, EXPONENTIAL, "Conversations: time between the moment we click and the second gloda query returns (ms)") HISTOGRAM(THUNDERBIRD_INDEXING_RATE_MSG_PER_S, 1, 100, 20, LINEAR, "Gloda: indexing rate (message/s)") -#endif +// #endif /** * Firefox-specific telemetry. */ -#ifdef MOZ_PHOENIX +// Disable this application-specific #ifdef ftb. (See bug 710562) +// #ifdef MOZ_PHOENIX HISTOGRAM(FX_TAB_ANIM_OPEN_MS, 1, 3000, 10, EXPONENTIAL, "Firefox: Time taken by the tab opening animation") HISTOGRAM(FX_TAB_ANIM_CLOSE_MS, 1, 3000, 10, EXPONENTIAL, "Firefox: Time taken by the tab closing animation") HISTOGRAM_BOOLEAN(FX_CONTEXT_SEARCH_AND_TAB_SELECT, "Firefox: Background tab was selected within 5 seconds of searching from the context menu") -#endif +// #endif HISTOGRAM_BOOLEAN(INNERWINDOWS_WITH_MUTATION_LISTENERS, "Deleted or to-be-reused innerwindow which has had mutation event listeners.") HISTOGRAM(XUL_REFLOW_MS, 1, 3000, 10, EXPONENTIAL, "xul reflows") From 0175dba70ae3f15ab134d5128a845e597b30d052 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Fri, 6 Jan 2012 21:08:08 +0200 Subject: [PATCH 4/4] Bug 714162 - Don't traverse certainly alive selections, additional patch, r=mccr8 --- layout/generic/nsSelection.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index 6e6f9c50bee..02ec8573603 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -66,7 +66,7 @@ #include "nsIDOMNodeList.h" #include "nsTArray.h" #include "nsIScrollableFrame.h" - +#include "nsCCUncollectableMarker.h" #include "nsISelectionListener.h" #include "nsIContentIterator.h" #include "nsIDocumentEncoder.h" @@ -760,7 +760,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsFrameSelection) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mMaintainRange) NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsFrameSelection) - if (tmp->mShell) { + if (tmp->mShell && tmp->mShell->GetDocument() && + nsCCUncollectableMarker::InGeneration(cb, + tmp->mShell->GetDocument()-> + GetMarkedCCGeneration())) { return NS_SUCCESS_INTERRUPTED_TRAVERSE; } PRInt32 i;