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

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

Issue 2146973004: Add Node::isInDocumentTree() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@is-connected
Patch Set: inDocumentTree -> isInDocumentTree 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLTitleElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp b/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp
index 824c66b410f49e51d6d9d4c4362a63ba0d84c808..29b510603a4f21a4f81b7547c16bb795c1ce5353 100644
--- a/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp
@@ -46,7 +46,7 @@ DEFINE_NODE_FACTORY(HTMLTitleElement)
Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLElement::insertedInto(insertionPoint);
- if (isConnected() && !isInShadowTree())
+ if (isInDocumentTree())
document().setTitleElement(this);
return InsertionDone;
}
@@ -54,14 +54,14 @@ Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
void HTMLTitleElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLElement::removedFrom(insertionPoint);
- if (insertionPoint->isConnected() && !insertionPoint->isInShadowTree())
+ if (insertionPoint->isInDocumentTree())
document().removeTitle(this);
}
void HTMLTitleElement::childrenChanged(const ChildrenChange& change)
{
HTMLElement::childrenChanged(change);
- if (isConnected() && !isInShadowTree() && !m_ignoreTitleUpdatesWhenChildrenChange)
+ if (isInDocumentTree() && !m_ignoreTitleUpdatesWhenChildrenChange)
document().setTitleElement(this);
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698