Index: Source/core/html/HTMLImageFallbackHelper.cpp |
diff --git a/Source/core/html/HTMLImageFallbackHelper.cpp b/Source/core/html/HTMLImageFallbackHelper.cpp |
index 2ecac04424d190b79673a371d8f4ebac2c6e635c..7695992c4776a573be346d1c84dc1622d1713680 100644 |
--- a/Source/core/html/HTMLImageFallbackHelper.cpp |
+++ b/Source/core/html/HTMLImageFallbackHelper.cpp |
@@ -34,7 +34,7 @@ static bool noImageSourceSpecified(const Element& element) |
void HTMLImageFallbackHelper::createAltTextShadowTree(Element& element) |
{ |
- ShadowRoot& root = element.ensureUserAgentShadowRoot(); |
+ ShadowRoot& root = element.ensureClosedShadowRoot(); |
RefPtrWillBeRawPtr<HTMLDivElement> container = HTMLDivElement::create(element.document()); |
root.appendChild(container); |
@@ -69,12 +69,12 @@ void HTMLImageFallbackHelper::createAltTextShadowTree(Element& element) |
PassRefPtr<LayoutStyle> HTMLImageFallbackHelper::customStyleForAltText(Element& element, PassRefPtr<LayoutStyle> newStyle) |
{ |
// If we have an author shadow root or have not created the UA shadow root yet, bail early. We can't |
- // use ensureUserAgentShadowRoot() here because that would alter the DOM tree during style recalc. |
- if (element.shadowRoot() || !element.userAgentShadowRoot()) |
+ // use ensureClosedShadowRoot() here because that would alter the DOM tree during style recalc. |
+ if (element.shadowRoot() || !element.closedShadowRoot()) |
return newStyle; |
- Element* placeHolder = element.userAgentShadowRoot()->getElementById("alttext-container"); |
- Element* brokenImage = element.userAgentShadowRoot()->getElementById("alttext-image"); |
+ Element* placeHolder = element.closedShadowRoot()->getElementById("alttext-container"); |
+ Element* brokenImage = element.closedShadowRoot()->getElementById("alttext-image"); |
// Input elements have a UA shadow root of their own. We may not have replaced it with fallback content yet. |
if (!placeHolder || !brokenImage) |
return newStyle; |
@@ -114,4 +114,3 @@ PassRefPtr<LayoutStyle> HTMLImageFallbackHelper::customStyleForAltText(Element& |
} |
} // namespace blink |
- |