| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index b35cf9138e2167da918498afdff7768617eb222b..8bc753a37cd0e2536712d01d49331f75aa48a223 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -1194,7 +1194,7 @@ void Element::attributeChanged(const QualifiedName& name, const AtomicString& ol
|
| if (!document().styleResolver())
|
| setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::fromAttribute(name));
|
|
|
| - if (inShadowIncludingDocument()) {
|
| + if (isConnected()) {
|
| if (AXObjectCache* cache = document().existingAXObjectCache())
|
| cache->handleAttributeChanged(name, this);
|
| }
|
| @@ -1345,7 +1345,7 @@ void Element::stripScriptingAttributes(Vector<Attribute>& attributeVector) const
|
|
|
| void Element::parserSetAttributes(const Vector<Attribute>& attributeVector)
|
| {
|
| - DCHECK(!inShadowIncludingDocument());
|
| + DCHECK(!isConnected());
|
| DCHECK(!parentNode());
|
| DCHECK(!m_elementData);
|
|
|
| @@ -1415,7 +1415,7 @@ LayoutObject* Element::createLayoutObject(const ComputedStyle& style)
|
|
|
| Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertionPoint)
|
| {
|
| - // need to do superclass processing first so inShadowIncludingDocument() is true
|
| + // need to do superclass processing first so isConnected() is true
|
| // by the time we reach updateId
|
| ContainerNode::insertedInto(insertionPoint);
|
|
|
| @@ -1434,7 +1434,7 @@ Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio
|
| rareData->intersectionObserverData()->activateValidIntersectionObservers(*this);
|
| }
|
|
|
| - if (inShadowIncludingDocument()) {
|
| + if (isConnected()) {
|
| if (getCustomElementState() == CustomElementState::Custom)
|
| CustomElement::enqueueConnectedCallback(this);
|
| else if (isUpgradedV0CustomElement())
|
| @@ -1463,7 +1463,7 @@ Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio
|
|
|
| void Element::removedFrom(ContainerNode* insertionPoint)
|
| {
|
| - bool wasInDocument = insertionPoint->inShadowIncludingDocument();
|
| + bool wasInDocument = insertionPoint->isConnected();
|
|
|
| DCHECK(!hasRareData() || !elementRareData()->hasPseudoElements());
|
|
|
| @@ -2389,7 +2389,7 @@ bool Element::hasAttributeNS(const AtomicString& namespaceURI, const AtomicStrin
|
|
|
| void Element::focus(const FocusParams& params)
|
| {
|
| - if (!inShadowIncludingDocument())
|
| + if (!isConnected())
|
| return;
|
|
|
| if (document().focusedElement() == this)
|
| @@ -2502,7 +2502,7 @@ bool Element::isFocusable() const
|
| // Style cannot be cleared out for non-active documents, so in that case the
|
| // needsLayoutTreeUpdateForNode check is invalid.
|
| DCHECK(!document().isActive() || !document().needsLayoutTreeUpdateForNode(*this));
|
| - return inShadowIncludingDocument() && supportsFocus() && !isInert() && layoutObjectIsFocusable();
|
| + return isConnected() && supportsFocus() && !isInert() && layoutObjectIsFocusable();
|
| }
|
|
|
| bool Element::isKeyboardFocusable() const
|
| @@ -2694,7 +2694,7 @@ void Element::setPointerCapture(int pointerId, ExceptionState& exceptionState)
|
| if (document().frame()) {
|
| if (!document().frame()->eventHandler().isPointerEventActive(pointerId))
|
| exceptionState.throwDOMException(InvalidPointerId, "InvalidPointerId");
|
| - else if (!inShadowIncludingDocument())
|
| + else if (!isConnected())
|
| exceptionState.throwDOMException(InvalidStateError, "InvalidStateError");
|
| else
|
| document().frame()->eventHandler().setPointerCapture(pointerId, this);
|
| @@ -3170,7 +3170,7 @@ bool Element::hasNamedNodeMap() const
|
|
|
| inline void Element::updateName(const AtomicString& oldName, const AtomicString& newName)
|
| {
|
| - if (!inShadowIncludingDocument() || isInShadowTree())
|
| + if (!isConnected() || isInShadowTree())
|
| return;
|
|
|
| if (oldName == newName)
|
| @@ -3678,7 +3678,7 @@ bool Element::supportsStyleSharing() const
|
|
|
| void Element::logAddElementIfIsolatedWorldAndInDocument(const char element[], const QualifiedName& attr1)
|
| {
|
| - if (!inShadowIncludingDocument())
|
| + if (!isConnected())
|
| return;
|
| V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivityLoggerIfIsolatedWorld();
|
| if (!activityLogger)
|
| @@ -3691,7 +3691,7 @@ void Element::logAddElementIfIsolatedWorldAndInDocument(const char element[], co
|
|
|
| void Element::logAddElementIfIsolatedWorldAndInDocument(const char element[], const QualifiedName& attr1, const QualifiedName& attr2)
|
| {
|
| - if (!inShadowIncludingDocument())
|
| + if (!isConnected())
|
| return;
|
| V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivityLoggerIfIsolatedWorld();
|
| if (!activityLogger)
|
| @@ -3705,7 +3705,7 @@ void Element::logAddElementIfIsolatedWorldAndInDocument(const char element[], co
|
|
|
| void Element::logAddElementIfIsolatedWorldAndInDocument(const char element[], const QualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3)
|
| {
|
| - if (!inShadowIncludingDocument())
|
| + if (!isConnected())
|
| return;
|
| V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivityLoggerIfIsolatedWorld();
|
| if (!activityLogger)
|
| @@ -3720,7 +3720,7 @@ void Element::logAddElementIfIsolatedWorldAndInDocument(const char element[], co
|
|
|
| void Element::logUpdateAttributeIfIsolatedWorldAndInDocument(const char element[], const QualifiedName& attributeName, const AtomicString& oldValue, const AtomicString& newValue)
|
| {
|
| - if (!inShadowIncludingDocument())
|
| + if (!isConnected())
|
| return;
|
| V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivityLoggerIfIsolatedWorld();
|
| if (!activityLogger)
|
|
|