mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
e7535dc94b
- Bug 1187401 (Part 1) - Simplify the condition that determines whether we set RasterImage::mHasBeenDecoded. r=tn (69be36e7ef) - Bug 1187401 (Part 2) - Eliminate the nsresult return value from RasterImage::SetMetadata, since it's not used anymore. r=tn (dc521c4b9f) - Bug 1187401 (Part 3) - For consistency, call DoError if SetMetadata sees a negative size. r=tn (d9ca8ec91b) - Bug 1207183 - micro-optimize removing work items from DecodePool's queues; r=seth (6bd2717e3a) - No bug - Fix out-of-date comment in Decoder.cpp. r=me (54fdbbd444) - Bug 1181324 - Eliminate the duplicate mRefCnt member in MultipartImage. r=seth (c4512a443e) - Bug 1180105 - Do not leak the SourceSurface returned from imgIContainer::GetFrame in BlockUntilDecodedAndFinishObserving; r=seth (1cadbffc53) - Bug 1181909 - Fix potential null dereference in NextPartObserver. r=tn (cfd8ad0119) - Bug 108603 - Remove NS_IMPL_QUERY_INTERFACE_INHERITED0. r=mccr8, r=froydnj (4bfa6771fc) - Bug 1159502 - Don't block onload for multipart images. r=tn (8b50eadf39) - Bug 1200413 - Part 1: Re-write RefCountedInsideLambdaChecker to use captures instead of checking for DeclRef instances, r=ehsan (80ef99efe2) - Bug 1200413 - Part 2: Make lambdas in ProgressTracker.cpp capture strong references, r=seth (9e4d96dffa) - Bug 1194557 - Ensure that if the image was locked before RecoverFromLossOfFrames() was called, it's still locked afterwards. r=tn (ea4dc6ea9f) - code style (ad3773ba42) - Bug 1167590 - Mark imgRequestProxy::mListener as MOZ_UNSAFE_REF. r=seth (946ffaed8a) - Bug 1148397 - Fix data race on imgRequest::mHadInsecureRedirect. r=tanvi (e73d0664f3) - No bug - Tweak formatting of logging statement in imgRequest. r=me (cab2bcb014) - Bug 1180126 - Read content disposition regardless of content type in imgRequest::PrepareForNewPart. r=tn (2934597743) - Bug 1139225 - Followup - Remove duplicate multiPartChannel variable. (7f7f555a0b) - Bug 1141398 - Do not always revalidate image cache entries for file URIs. r=tn (31d73cb508) - Bug 1183563 - Fix incorrect mixed content warning after internal redirects. r=tanvi, r=seth (12a6c8a15f) - Bug 1150127 - Stop leaking windows via imgCacheValidator. r=baku (a7809c5fa7) - bits of Bug 1102048 (Part 20, imgLoader) (b2098c8a5a) - (No bug) - Correct blatantly lying comment in imgLoader.cpp. r=me DONTBUILD (64c42a5b09) - Bug 1160592 - Report image source size again in about:memory. r=dholbert (4e04cf3c3e) - Add an assertion for the first argument of NewImageChannel, no bug (4c8f087a8f) - Bug 1127534 - Remove assertion before creating a channel (r=sicking) (988692dc91) - Bug 1175371 - Make VectorImage wait to deliver LOAD_COMPLETE until its size is available. r=dholbert (3c81e0daff) - Bug 1181323 - Move nsSVGRenderingObserver's isupports/refcounting decl to subclasses, since one subclass (nsSVGFilterReference) already has its own redundant copy of the decl. r=dholbert (6171171c2c) - Bug 1161722 - If we're shutting down, don't warn about untracked unlocked surfaces. r=dholbert (f7e18ce481) - Bug 1170877 - Track how many times the SurfaceCache has overflowed and report it in about:memory. r=dholbert (884176cb1d) - Bug 1161743 - Upgrade 'WARNING: Not expiration-tracking an unlocked surface' to an assertion. r=dholbert (9900169e7b) - Bug 1167557 - Crash when a null surface is passed to SurfaceCache::Insert. r=dholbert (b3c4cf60aa) - remove bypass cache not fonud either in FF nor TF (3ed4056a27) - Missing bit Bug 1102048 (Part 25, header guards) - Make image/src files comply (cb8ed2428f) - No bug - Remove obsolete comment in SourceBuffer.h. r=me (6e9c233448) - coding style (94b7269690) - Bug 1157065 - GFX: 2D: Add Loongson3 MMI helpers. r=jrmuizel (ebce946c91) - reverto to FF52 and TFF settings (e147a8c7b5) - Bug 1134599 - Fix rpi build target. r=jrmuizel, r=shuang (b9722f860c) - Bug 1129147 - Part 1. Take CanvasPath into a separate file, to avoid circular dependency. r=roc (859bcad807) - Bug 1129147 - Part 2. Path option to addHitRegion. r=ehsan r=gw280 (b2ab08a8a1) - Bug 1206076: Use a specialized PersistentBufferProvider for Canvas2D when using a SkiaGL DrawTarget. r=jrmuizel (859589caf8) - Bug 1188752 - Addendum: Make PersistentBufferProviderBasic constructor explicit. r=bustage on a CLOSED TREE (a27a4dc974) - style (72a65dcb26) - Bug 1198574 - Remove unnecessary argument for PersistentBufferProvider. r=bas (dca718bba8) - Bug 1163124 - The initial value of the canvas filter property should be "none". r=roc (59df6a01d8)
152 lines
4.3 KiB
C++
152 lines
4.3 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
/* This class wraps an SVG document, for use by VectorImage objects. */
|
|
|
|
#ifndef mozilla_image_SVGDocumentWrapper_h
|
|
#define mozilla_image_SVGDocumentWrapper_h
|
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
#include "nsIStreamListener.h"
|
|
#include "nsIObserver.h"
|
|
#include "nsIContentViewer.h"
|
|
#include "nsWeakReference.h"
|
|
#include "nsSize.h"
|
|
|
|
class nsIPresShell;
|
|
class nsIRequest;
|
|
class nsILoadGroup;
|
|
class nsIFrame;
|
|
|
|
#define OBSERVER_SVC_CID "@mozilla.org/observer-service;1"
|
|
|
|
// undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK
|
|
#undef GetCurrentTime
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
class SVGSVGElement;
|
|
} // namespace dom
|
|
|
|
namespace image {
|
|
|
|
class SVGDocumentWrapper final : public nsIStreamListener,
|
|
public nsIObserver,
|
|
nsSupportsWeakReference
|
|
{
|
|
public:
|
|
SVGDocumentWrapper();
|
|
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSISTREAMLISTENER
|
|
NS_DECL_NSIREQUESTOBSERVER
|
|
NS_DECL_NSIOBSERVER
|
|
|
|
enum Dimension {
|
|
eWidth,
|
|
eHeight
|
|
};
|
|
|
|
/**
|
|
* Returns the wrapped document, or nullptr on failure. (No AddRef.)
|
|
*/
|
|
nsIDocument* GetDocument();
|
|
|
|
/**
|
|
* Returns the root <svg> element for the wrapped document, or nullptr on
|
|
* failure.
|
|
*/
|
|
mozilla::dom::SVGSVGElement* GetRootSVGElem();
|
|
|
|
/**
|
|
* Returns the root nsIFrame* for the wrapped document, or nullptr on failure.
|
|
*
|
|
* @return the root nsIFrame* for the wrapped document, or nullptr on failure.
|
|
*/
|
|
nsIFrame* GetRootLayoutFrame();
|
|
|
|
/**
|
|
* Returns (by reference) the nsIPresShell for the wrapped document.
|
|
*
|
|
* @param[out] aPresShell On success, this will be populated with a pointer
|
|
* to the wrapped document's nsIPresShell.
|
|
*
|
|
* @return NS_OK on success, or an error code on failure.
|
|
*/
|
|
inline nsresult GetPresShell(nsIPresShell** aPresShell)
|
|
{ return mViewer->GetPresShell(aPresShell); }
|
|
|
|
/**
|
|
* Modifier to update the viewport dimensions of the wrapped document. This
|
|
* method performs a synchronous "Flush_Layout" on the wrapped document,
|
|
* since a viewport-change affects layout.
|
|
*
|
|
* @param aViewportSize The new viewport dimensions.
|
|
*/
|
|
void UpdateViewportBounds(const nsIntSize& aViewportSize);
|
|
|
|
/**
|
|
* If an SVG image's helper document has a pending notification for an
|
|
* override on the root node's "preserveAspectRatio" attribute, then this
|
|
* method will flush that notification so that the image can paint correctly.
|
|
* (First, though, it sets the mIgnoreInvalidation flag so that we won't
|
|
* notify the image's observers and trigger unwanted repaint-requests.)
|
|
*/
|
|
void FlushImageTransformInvalidation();
|
|
|
|
/**
|
|
* Returns a bool indicating whether the document has any SMIL animations.
|
|
*
|
|
* @return true if the document has any SMIL animations. Else, false.
|
|
*/
|
|
bool IsAnimated();
|
|
|
|
/**
|
|
* Indicates whether we should currently ignore rendering invalidations sent
|
|
* from the wrapped SVG doc.
|
|
*
|
|
* @return true if we should ignore invalidations sent from this SVG doc.
|
|
*/
|
|
bool ShouldIgnoreInvalidation() { return mIgnoreInvalidation; }
|
|
|
|
/**
|
|
* Methods to control animation.
|
|
*/
|
|
void StartAnimation();
|
|
void StopAnimation();
|
|
void ResetAnimation();
|
|
float GetCurrentTime();
|
|
void SetCurrentTime(float aTime);
|
|
void TickRefreshDriver();
|
|
|
|
/**
|
|
* Force a layout flush of the underlying SVG document.
|
|
*/
|
|
void FlushLayout();
|
|
|
|
private:
|
|
~SVGDocumentWrapper();
|
|
|
|
nsresult SetupViewer(nsIRequest* aRequest,
|
|
nsIContentViewer** aViewer,
|
|
nsILoadGroup** aLoadGroup);
|
|
void DestroyViewer();
|
|
void RegisterForXPCOMShutdown();
|
|
void UnregisterForXPCOMShutdown();
|
|
|
|
nsCOMPtr<nsIContentViewer> mViewer;
|
|
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
|
nsCOMPtr<nsIStreamListener> mListener;
|
|
bool mIgnoreInvalidation;
|
|
bool mRegisteredForXPCOMShutdown;
|
|
};
|
|
|
|
} // namespace image
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_image_SVGDocumentWrapper_h
|