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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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 edb8edc34a2f2cac9076bb88f7d9c94f89d30c66..ea786f0c5fddcc5fbd0a16715c34d8556e14e60b 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -96,7 +96,7 @@ void ScriptLoader::didNotifySubtreeInsertionsToDocument()
void ScriptLoader::childrenChanged()
{
- if (!m_parserInserted && m_element->inShadowIncludingDocument())
+ if (!m_parserInserted && m_element->isConnected())
prepareScript(); // FIXME: Provide a real starting line number here.
}
@@ -208,7 +208,7 @@ bool ScriptLoader::prepareScript(const TextPosition& scriptStartPosition, Legacy
if (!client->hasSourceAttribute() && !m_element->hasChildren())
return false;
- if (!m_element->inShadowIncludingDocument())
+ if (!m_element->isConnected())
return false;
if (!isScriptTypeSupported(supportLegacyTypes))
@@ -287,7 +287,7 @@ bool ScriptLoader::fetchScript(const String& sourceUrl, FetchRequest::DeferOptio
DCHECK(m_element);
Document* elementDocument = &(m_element->document());
- if (!m_element->inShadowIncludingDocument() || m_element->document() != elementDocument)
+ if (!m_element->isConnected() || m_element->document() != elementDocument)
return false;
DCHECK(!m_resource);
@@ -480,7 +480,7 @@ void ScriptLoader::notifyFinished(Resource* resource)
bool ScriptLoader::ignoresLoadRequest() const
{
- return m_alreadyStarted || m_isExternalScript || m_parserInserted || !element() || !element()->inShadowIncludingDocument();
+ return m_alreadyStarted || m_isExternalScript || m_parserInserted || !element() || !element()->isConnected();
}
bool ScriptLoader::isScriptForEventSupported() const
« no previous file with comments | « third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h ('k') | third_party/WebKit/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698