if (!supportedProperties.contains(BACKGROUND_IMAGE)) {
return;
}
// Get the value of the background dynamic visual.
StyleValue inputVideoValue = inputValues.getStyleValue(
StylePropertyDetails.MCS_BACKGROUND_DYNAMIC_VISUAL);
StyleValue inputImageValue = getSupportedStyleValue(
inputValues, BACKGROUND_IMAGE);
StyleValue resolvedImage = null;
if (inputVideoValue != null) {
resolvedImage = resolveVideo(
StylePropertyDetails.MCS_BACKGROUND_DYNAMIC_VISUAL,
inputVideoValue);
}
// If the background-image has not been overridden by the background
// dynamic visual then try and resolve it too.
if (resolvedImage == null ||
resolvedImage == BackgroundImageKeywords.NONE) {
if (inputImageValue != null) {
resolvedImage = resolveImage(BACKGROUND_IMAGE, inputImageValue);
}
}
// Set the property if the image has not changed.
if (resolvedImage != null && !resolvedImage.equals(inputImageValue)) {
inputValues.setComputedValue(BACKGROUND_IMAGE, resolvedImage);
}
}