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

Unified Diff: third_party/WebKit/Source/core/html/HTMLIFrameElement.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/dom/Node.h ('k') | third_party/WebKit/Source/core/html/HTMLTitleElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
index 06650b0a17907ec5cace4471563a75f51188d6f6..a68f5d7774d4e23cd38ff2668fc0550fc47c248b 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp
@@ -96,7 +96,7 @@ void HTMLIFrameElement::collectStyleForPresentationAttribute(const QualifiedName
void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
{
if (name == nameAttr) {
- if (isConnected() && document().isHTMLDocument() && !isInShadowTree()) {
+ if (isInDocumentTree() && document().isHTMLDocument()) {
HTMLDocument& document = toHTMLDocument(this->document());
document.removeExtraNamedItem(m_name);
document.addExtraNamedItem(value);
@@ -137,7 +137,7 @@ LayoutObject* HTMLIFrameElement::createLayoutObject(const ComputedStyle&)
Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode* insertionPoint)
{
InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(insertionPoint);
- if (insertionPoint->isConnected() && document().isHTMLDocument() && !insertionPoint->isInShadowTree())
+ if (insertionPoint->isInDocumentTree() && document().isHTMLDocument())
toHTMLDocument(document()).addExtraNamedItem(m_name);
logAddElementIfIsolatedWorldAndInDocument("iframe", srcAttr);
return result;
@@ -146,7 +146,7 @@ Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode
void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLFrameElementBase::removedFrom(insertionPoint);
- if (insertionPoint->isConnected() && document().isHTMLDocument() && !insertionPoint->isInShadowTree())
+ if (insertionPoint->isInDocumentTree() && document().isHTMLDocument())
toHTMLDocument(document()).removeExtraNamedItem(m_name);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/html/HTMLTitleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698