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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index f8861bd75c2ef7f316774ec627b4fe9c149b7b08..7b612eb2152bf5f5536e18d58372c4af0bbbc25b 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -94,7 +94,7 @@ void ScriptLoader::didNotifySubtreeInsertionsToDocument()
void ScriptLoader::childrenChanged()
{
- if (!m_parserInserted && m_element->inDocument())
+ if (!m_parserInserted && m_element->inShadowIncludingDocument())
prepareScript(); // FIXME: Provide a real starting line number here.
}
@@ -207,7 +207,7 @@ bool ScriptLoader::prepareScript(const TextPosition& scriptStartPosition, Legacy
if (!client->hasSourceAttribute() && !m_element->hasChildren())
return false;
- if (!m_element->inDocument())
+ if (!m_element->inShadowIncludingDocument())
return false;
if (!isScriptTypeSupported(supportLegacyTypes))
@@ -286,7 +286,7 @@ bool ScriptLoader::fetchScript(const String& sourceUrl, FetchRequest::DeferOptio
ASSERT(m_element);
RawPtr<Document> elementDocument(m_element->document());
- if (!m_element->inDocument() || m_element->document() != elementDocument)
+ if (!m_element->inShadowIncludingDocument() || m_element->document() != elementDocument)
return false;
ASSERT(!m_resource);
@@ -483,7 +483,7 @@ void ScriptLoader::notifyFinished(Resource* resource)
bool ScriptLoader::ignoresLoadRequest() const
{
- return m_alreadyStarted || m_isExternalScript || m_parserInserted || !element() || !element()->inDocument();
+ return m_alreadyStarted || m_isExternalScript || m_parserInserted || !element() || !element()->inShadowIncludingDocument();
}
bool ScriptLoader::isScriptForEventSupported() const

Powered by Google App Engine
This is Rietveld 408576698