PassRefPtr<StyleImage> ElementStyleResources::styleImage(Document& document, const TextLinkColors& textLinkColors, Color currentColor, CSSPropertyID property, CSSValue* value) { if (value->isImageValue()) return cachedOrPendingFromValue(document, property, toCSSImageValue(value)); if (value->isImageGeneratorValue()) { if (value->isGradientValue()) return generatedOrPendingFromValue(property, toCSSGradientValue(value)->gradientWithStylesResolved(textLinkColors, currentColor).get()); return generatedOrPendingFromValue(property, toCSSImageGeneratorValue(value)); } if (value->isImageSetValue()) return setOrPendingFromValue(property, toCSSImageSetValue(value)); return nullptr; }
PassRefPtr<StyleImage> ElementStyleResources::styleImage(const TextLinkColors& textLinkColors, CSSPropertyID property, CSSValue* value) { if (value->isImageValue()) return cachedOrPendingFromValue(property, toCSSImageValue(value)); if (value->isImageGeneratorValue()) { if (value->isGradientValue()) return generatedOrPendingFromValue(property, static_cast<CSSGradientValue*>(value)->gradientWithStylesResolved(textLinkColors).get()); return generatedOrPendingFromValue(property, static_cast<CSSImageGeneratorValue*>(value)); } if (value->isImageSetValue()) return setOrPendingFromValue(property, static_cast<CSSImageSetValue*>(value)); if (value->isCursorImageValue()) return cursorOrPendingFromValue(property, static_cast<CSSCursorImageValue*>(value)); return 0; }
PassRefPtrWillBeRawPtr<StyleImage> ElementStyleResources::styleImage(CSSPropertyID property, const CSSValue& value) { if (value.isImageValue()) return cachedOrPendingFromValue(property, toCSSImageValue(value)); if (value.isImageGeneratorValue()) return generatedOrPendingFromValue(property, toCSSImageGeneratorValue(value)); if (value.isImageSetValue()) return setOrPendingFromValue(property, toCSSImageSetValue(value)); if (value.isCursorImageValue()) return cursorOrPendingFromValue(property, toCSSCursorImageValue(value)); return nullptr; }
PassRefPtrWillBeRawPtr<StyleImage> ElementStyleResources::styleImage(Document& document, const TextLinkColors& textLinkColors, Color currentColor, CSSPropertyID property, CSSValue* value) { if (value->isImageValue()) return cachedOrPendingFromValue(document, property, toCSSImageValue(value)); if (value->isImageGeneratorValue()) return generatedOrPendingFromValue(property, toCSSImageGeneratorValue(value)); if (value->isImageSetValue()) return setOrPendingFromValue(property, toCSSImageSetValue(value)); if (value->isCursorImageValue()) return cursorOrPendingFromValue(property, toCSSCursorImageValue(value)); return nullptr; }