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

Unified Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/html/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index 3bae4fa3238353a9ec0ba16dfa07b878634e5e05..c1e51f1117a4c44e1d1f00e5c81784ef1c929087 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -166,7 +166,7 @@ HTMLLinkElement::~HTMLLinkElement()
m_sizes->setObserver(nullptr);
m_relList->setObserver(nullptr);
m_link.clear();
- if (inDocument())
+ if (inShadowIncludingDocument())
document().styleEngine().removeStyleSheetCandidateNode(this);
linkLoadEventSender().cancelEvent(this);
#endif
@@ -212,7 +212,7 @@ void HTMLLinkElement::parseAttribute(const QualifiedName& name, const AtomicStri
bool HTMLLinkElement::shouldLoadLink()
{
- return inDocument();
+ return inShadowIncludingDocument();
}
bool HTMLLinkElement::loadLink(const String& type, const String& as, const String& media, const KURL& url)
@@ -222,7 +222,7 @@ bool HTMLLinkElement::loadLink(const String& type, const String& as, const Strin
LinkResource* HTMLLinkElement::linkResourceToProcess()
{
- bool visible = inDocument() && !m_isInShadowTree;
+ bool visible = inShadowIncludingDocument() && !m_isInShadowTree;
if (!visible) {
ASSERT(!linkStyle() || !linkStyle()->hasSheet());
return nullptr;
@@ -280,7 +280,7 @@ Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode*
{
HTMLElement::insertedInto(insertionPoint);
logAddElementIfIsolatedWorldAndInDocument("link", relAttr, hrefAttr);
- if (!insertionPoint->inDocument())
+ if (!insertionPoint->inShadowIncludingDocument())
return InsertionDone;
m_isInShadowTree = isInShadowTree();
@@ -303,7 +303,7 @@ Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode*
void HTMLLinkElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLElement::removedFrom(insertionPoint);
- if (!insertionPoint->inDocument())
+ if (!insertionPoint->inShadowIncludingDocument())
return;
m_linkLoader->released();
@@ -514,7 +514,7 @@ enum StyleSheetCacheStatus {
void LinkStyle::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource* cachedStyleSheet)
{
- if (!m_owner->inDocument()) {
+ if (!m_owner->inShadowIncludingDocument()) {
ASSERT(!m_sheet);
return;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLabelElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLMapElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698