зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1463386: Remove dead nsStyleImageRequest constructor. r=heycam
MozReview-Commit-ID: 3mF3PPQbS5O --HG-- extra : rebase_source : cfa68ed71cba86f644ac1592b4b8ba1f442b20a8
This commit is contained in:
Родитель
303da2c6c2
Коммит
b6d8737188
|
@ -2100,27 +2100,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
nsStyleImageRequest::nsStyleImageRequest(Mode aModeFlags,
|
nsStyleImageRequest::nsStyleImageRequest(Mode aModeFlags,
|
||||||
imgRequestProxy* aRequestProxy,
|
css::ImageValue* aImageValue)
|
||||||
css::ImageValue* aImageValue,
|
|
||||||
ImageTracker* aImageTracker)
|
|
||||||
: mRequestProxy(aRequestProxy)
|
|
||||||
, mImageValue(aImageValue)
|
|
||||||
, mImageTracker(aImageTracker)
|
|
||||||
, mModeFlags(aModeFlags)
|
|
||||||
, mResolved(true)
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
|
||||||
MOZ_ASSERT(aImageValue);
|
|
||||||
MOZ_ASSERT(!!(aModeFlags & Mode::Track) == !!aImageTracker);
|
|
||||||
|
|
||||||
if (mRequestProxy) {
|
|
||||||
MaybeTrackAndLock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nsStyleImageRequest::nsStyleImageRequest(
|
|
||||||
Mode aModeFlags,
|
|
||||||
mozilla::css::ImageValue* aImageValue)
|
|
||||||
: mImageValue(aImageValue)
|
: mImageValue(aImageValue)
|
||||||
, mModeFlags(aModeFlags)
|
, mModeFlags(aModeFlags)
|
||||||
, mResolved(false)
|
, mResolved(false)
|
||||||
|
|
|
@ -216,30 +216,21 @@ private:
|
||||||
* A wrapper for an imgRequestProxy that supports off-main-thread creation
|
* A wrapper for an imgRequestProxy that supports off-main-thread creation
|
||||||
* and equality comparison.
|
* and equality comparison.
|
||||||
*
|
*
|
||||||
* An nsStyleImageRequest can be created in two ways:
|
* An nsStyleImageRequest can be created using the constructor that takes the
|
||||||
|
* URL, base URI, referrer and principal that can be used to initiate an image
|
||||||
|
* load and produce an imgRequestProxy later.
|
||||||
*
|
*
|
||||||
* 1. Using the constructor that takes an imgRequestProxy. This must
|
* This can be called from any thread. The nsStyleImageRequest is not
|
||||||
* be called from the main thread. The nsStyleImageRequest is
|
* considered "resolved" at this point, and the Resolve() method must be called
|
||||||
* immediately considered "resolved", and the get() method that
|
* later to initiate the image load and make calls to get() valid.
|
||||||
* returns the imgRequestProxy can be called.
|
|
||||||
*
|
|
||||||
* 2. Using the constructor that takes the URL, base URI, referrer
|
|
||||||
* and principal that can be used to inititiate an image load and
|
|
||||||
* produce an imgRequestProxy later. This can be called from
|
|
||||||
* any thread. The nsStyleImageRequest is not considered "resolved"
|
|
||||||
* at this point, and the Resolve() method must be called later
|
|
||||||
* to initiate the image load and make calls to get() valid.
|
|
||||||
*
|
*
|
||||||
* Calls to TrackImage(), UntrackImage(), LockImage(), UnlockImage() and
|
* Calls to TrackImage(), UntrackImage(), LockImage(), UnlockImage() and
|
||||||
* RequestDiscard() are made to the imgRequestProxy and ImageTracker as
|
* RequestDiscard() are made to the imgRequestProxy and ImageTracker as
|
||||||
* appropriate, according to the mode flags passed in to the constructor.
|
* appropriate, according to the mode flags passed in to the constructor.
|
||||||
*
|
*
|
||||||
* The main thread constructor takes a pointer to the css::ImageValue that
|
* The constructor receives a css::ImageValue to represent the url()
|
||||||
* is the specified url() value, while the off-main-thread constructor
|
* information, which is held on to for the comparisons done in
|
||||||
* creates a new css::ImageValue to represent the url() information passed
|
* DefinitelyEquals().
|
||||||
* to the constructor. This ImageValue is held on to for the comparisons done
|
|
||||||
* in DefinitelyEquals(), so that we don't need to call into the non-OMT-safe
|
|
||||||
* Equals() on the nsIURI objects returned from imgRequestProxy::GetURI().
|
|
||||||
*/
|
*/
|
||||||
class nsStyleImageRequest
|
class nsStyleImageRequest
|
||||||
{
|
{
|
||||||
|
@ -267,19 +258,9 @@ public:
|
||||||
Discard = 0x2,
|
Discard = 0x2,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Must be called from the main thread.
|
|
||||||
//
|
|
||||||
// aImageTracker must be non-null iff aModeFlags contains Track.
|
|
||||||
nsStyleImageRequest(Mode aModeFlags,
|
|
||||||
imgRequestProxy* aRequestProxy,
|
|
||||||
mozilla::css::ImageValue* aImageValue,
|
|
||||||
mozilla::dom::ImageTracker* aImageTracker);
|
|
||||||
|
|
||||||
// Can be called from any thread, but Resolve() must be called later
|
// Can be called from any thread, but Resolve() must be called later
|
||||||
// on the main thread before get() can be used.
|
// on the main thread before get() can be used.
|
||||||
nsStyleImageRequest(
|
nsStyleImageRequest(Mode aModeFlags, mozilla::css::ImageValue* aImageValue);
|
||||||
Mode aModeFlags,
|
|
||||||
mozilla::css::ImageValue* aImageValue);
|
|
||||||
|
|
||||||
bool Resolve(nsPresContext*, const nsStyleImageRequest* aOldImageRequest);
|
bool Resolve(nsPresContext*, const nsStyleImageRequest* aOldImageRequest);
|
||||||
bool IsResolved() const { return mResolved; }
|
bool IsResolved() const { return mResolved; }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче