Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Unified Diff: Source/core/html/HTMLImageFallbackHelper.cpp

Issue 935283002: Rename {Author,UserAgent}ShadowRoot to {Open,Closed}ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix inspector tests Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
-
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698