From d869a580cc35e90a621d76064a2c304bc3beabef Mon Sep 17 00:00:00 2001 From: cku Date: Thu, 20 Jul 2017 01:02:17 +0800 Subject: [PATCH] Bug 1301245 - Part 1. Implement nsStyleImage::IsResolved. r=heycam We need this new API in the following patch. MozReview-Commit-ID: JSoCgzKWrfs --HG-- extra : rebase_source : e7da0a990b991b1c417015a9cb4f9e2b1e98faae extra : source : 8f02c1ea8448315f9284939823d66e67cdc5ad87 --- layout/style/nsStyleStruct.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 781a0727029e..274a1e07750c 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -463,6 +463,9 @@ struct nsStyleImage 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;