Bug 1301245 - Part 1. Implement nsStyleImage::IsResolved.
We need this new API in the following patch.
MozReview-Commit-ID: JSoCgzKWrfs
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -458,16 +458,19 @@ struct nsStyleImage
}
imgRequestProxy* GetImageData() const {
return GetImageRequest()->get();
}
nsStyleGradient* GetGradientData() const {
NS_ASSERTION(mType == eStyleImageType_Gradient, "Data is not a gradient!");
return mGradient;
}
+ bool IsResolved() const {
+ return mType != eStyleImageType_Image || GetImageRequest()->IsResolved();
+ }
const nsIAtom* GetElementId() const {
NS_ASSERTION(mType == eStyleImageType_Element, "Data is not an element!");
return mElementId;
}
const mozilla::UniquePtr<nsStyleSides>& GetCropRect() const {
NS_ASSERTION(mType == eStyleImageType_Image,
"Only image data can have a crop rect");
return mCropRect;