Bug 1463386: Remove dead nsStyleImageRequest constructor. r=heycam

MozReview-Commit-ID: 3mF3PPQbS5O

--HG--
extra : rebase_source : cfa68ed71cba86f644ac1592b4b8ba1f442b20a8
This commit is contained in:
Emilio Cobos Álvarez 2018-05-22 13:02:55 +02:00
Родитель 303da2c6c2
Коммит b6d8737188
2 изменённых файлов: 11 добавлений и 50 удалений

Просмотреть файл

@ -2100,27 +2100,7 @@ private:
};
nsStyleImageRequest::nsStyleImageRequest(Mode aModeFlags,
imgRequestProxy* aRequestProxy,
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)
css::ImageValue* aImageValue)
: mImageValue(aImageValue)
, mModeFlags(aModeFlags)
, mResolved(false)

Просмотреть файл

@ -216,30 +216,21 @@ private:
* A wrapper for an imgRequestProxy that supports off-main-thread creation
* 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
* be called from the main thread. The nsStyleImageRequest is
* immediately considered "resolved", and the get() method that
* 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.
* 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
* RequestDiscard() are made to the imgRequestProxy and ImageTracker as
* appropriate, according to the mode flags passed in to the constructor.
*
* The main thread constructor takes a pointer to the css::ImageValue that
* is the specified url() value, while the off-main-thread constructor
* creates a new css::ImageValue to represent the url() information passed
* 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().
* The constructor receives a css::ImageValue to represent the url()
* information, which is held on to for the comparisons done in
* DefinitelyEquals().
*/
class nsStyleImageRequest
{
@ -267,19 +258,9 @@ public:
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
// on the main thread before get() can be used.
nsStyleImageRequest(
Mode aModeFlags,
mozilla::css::ImageValue* aImageValue);
nsStyleImageRequest(Mode aModeFlags, mozilla::css::ImageValue* aImageValue);
bool Resolve(nsPresContext*, const nsStyleImageRequest* aOldImageRequest);
bool IsResolved() const { return mResolved; }