| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 if (!insertionPoint->isInTreeScope()) | 1414 if (!insertionPoint->isInTreeScope()) |
| 1415 return InsertionDone; | 1415 return InsertionDone; |
| 1416 | 1416 |
| 1417 if (hasRareData()) { | 1417 if (hasRareData()) { |
| 1418 ElementRareData* rareData = elementRareData(); | 1418 ElementRareData* rareData = elementRareData(); |
| 1419 rareData->clearClassListValueForQuirksMode(); | 1419 rareData->clearClassListValueForQuirksMode(); |
| 1420 if (rareData->intersectionObserverData()) | 1420 if (rareData->intersectionObserverData()) |
| 1421 rareData->intersectionObserverData()->activateValidIntersectionObser
vers(*this); | 1421 rareData->intersectionObserverData()->activateValidIntersectionObser
vers(*this); |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 if (isUpgradedCustomElement() && inShadowIncludingDocument()) | 1424 if (isUpgradedV0CustomElement() && inShadowIncludingDocument()) |
| 1425 V0CustomElement::didAttach(this, document()); | 1425 V0CustomElement::didAttach(this, document()); |
| 1426 | 1426 |
| 1427 TreeScope& scope = insertionPoint->treeScope(); | 1427 TreeScope& scope = insertionPoint->treeScope(); |
| 1428 if (scope != treeScope()) | 1428 if (scope != treeScope()) |
| 1429 return InsertionDone; | 1429 return InsertionDone; |
| 1430 | 1430 |
| 1431 const AtomicString& idValue = getIdAttribute(); | 1431 const AtomicString& idValue = getIdAttribute(); |
| 1432 if (!idValue.isNull()) | 1432 if (!idValue.isNull()) |
| 1433 updateId(scope, nullAtom, idValue); | 1433 updateId(scope, nullAtom, idValue); |
| 1434 | 1434 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 } | 1475 } |
| 1476 | 1476 |
| 1477 ContainerNode::removedFrom(insertionPoint); | 1477 ContainerNode::removedFrom(insertionPoint); |
| 1478 if (wasInDocument) { | 1478 if (wasInDocument) { |
| 1479 if (this == document().cssTarget()) | 1479 if (this == document().cssTarget()) |
| 1480 document().setCSSTarget(nullptr); | 1480 document().setCSSTarget(nullptr); |
| 1481 | 1481 |
| 1482 if (hasPendingResources()) | 1482 if (hasPendingResources()) |
| 1483 document().accessSVGExtensions().removeElementFromPendingResources(t
his); | 1483 document().accessSVGExtensions().removeElementFromPendingResources(t
his); |
| 1484 | 1484 |
| 1485 if (isUpgradedCustomElement()) | 1485 if (isUpgradedV0CustomElement()) |
| 1486 V0CustomElement::didDetach(this, insertionPoint->document()); | 1486 V0CustomElement::didDetach(this, insertionPoint->document()); |
| 1487 | 1487 |
| 1488 if (needsStyleInvalidation()) | 1488 if (needsStyleInvalidation()) |
| 1489 document().styleEngine().styleInvalidator().clearInvalidation(*this)
; | 1489 document().styleEngine().styleInvalidator().clearInvalidation(*this)
; |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 document().removeFromTopLayer(this); | 1492 document().removeFromTopLayer(this); |
| 1493 | 1493 |
| 1494 clearElementFlag(IsInCanvasSubtree); | 1494 clearElementFlag(IsInCanvasSubtree); |
| 1495 | 1495 |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1924 return createShadowRootInternal(ShadowRootType::V0, exceptionState); | 1924 return createShadowRootInternal(ShadowRootType::V0, exceptionState); |
| 1925 } | 1925 } |
| 1926 | 1926 |
| 1927 ShadowRoot* Element::attachShadow(const ScriptState* scriptState, const ShadowRo
otInit& shadowRootInitDict, ExceptionState& exceptionState) | 1927 ShadowRoot* Element::attachShadow(const ScriptState* scriptState, const ShadowRo
otInit& shadowRootInitDict, ExceptionState& exceptionState) |
| 1928 { | 1928 { |
| 1929 DCHECK(RuntimeEnabledFeatures::shadowDOMV1Enabled()); | 1929 DCHECK(RuntimeEnabledFeatures::shadowDOMV1Enabled()); |
| 1930 | 1930 |
| 1931 OriginsUsingFeatures::countMainWorldOnly(scriptState, document(), OriginsUsi
ngFeatures::Feature::ElementAttachShadow); | 1931 OriginsUsingFeatures::countMainWorldOnly(scriptState, document(), OriginsUsi
ngFeatures::Feature::ElementAttachShadow); |
| 1932 | 1932 |
| 1933 const AtomicString& tagName = localName(); | 1933 const AtomicString& tagName = localName(); |
| 1934 bool tagNameIsSupported = isCustomElement() | 1934 bool tagNameIsSupported = isV0CustomElement() |
| 1935 || tagName == HTMLNames::articleTag | 1935 || tagName == HTMLNames::articleTag |
| 1936 || tagName == HTMLNames::asideTag | 1936 || tagName == HTMLNames::asideTag |
| 1937 || tagName == HTMLNames::blockquoteTag | 1937 || tagName == HTMLNames::blockquoteTag |
| 1938 || tagName == HTMLNames::bodyTag | 1938 || tagName == HTMLNames::bodyTag |
| 1939 || tagName == HTMLNames::divTag | 1939 || tagName == HTMLNames::divTag |
| 1940 || tagName == HTMLNames::footerTag | 1940 || tagName == HTMLNames::footerTag |
| 1941 || tagName == HTMLNames::h1Tag | 1941 || tagName == HTMLNames::h1Tag |
| 1942 || tagName == HTMLNames::h2Tag | 1942 || tagName == HTMLNames::h2Tag |
| 1943 || tagName == HTMLNames::h3Tag | 1943 || tagName == HTMLNames::h3Tag |
| 1944 || tagName == HTMLNames::h4Tag | 1944 || tagName == HTMLNames::h4Tag |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 } | 3172 } |
| 3173 | 3173 |
| 3174 void Element::willModifyAttribute(const QualifiedName& name, const AtomicString&
oldValue, const AtomicString& newValue) | 3174 void Element::willModifyAttribute(const QualifiedName& name, const AtomicString&
oldValue, const AtomicString& newValue) |
| 3175 { | 3175 { |
| 3176 if (name == HTMLNames::nameAttr) { | 3176 if (name == HTMLNames::nameAttr) { |
| 3177 updateName(oldValue, newValue); | 3177 updateName(oldValue, newValue); |
| 3178 } | 3178 } |
| 3179 | 3179 |
| 3180 if (oldValue != newValue) { | 3180 if (oldValue != newValue) { |
| 3181 document().styleEngine().attributeChangedForElement(name, *this); | 3181 document().styleEngine().attributeChangedForElement(name, *this); |
| 3182 if (isUpgradedCustomElement()) | 3182 if (isUpgradedV0CustomElement()) |
| 3183 V0CustomElement::attributeDidChange(this, name.localName(), oldValue
, newValue); | 3183 V0CustomElement::attributeDidChange(this, name.localName(), oldValue
, newValue); |
| 3184 } | 3184 } |
| 3185 | 3185 |
| 3186 if (MutationObserverInterestGroup* recipients = MutationObserverInterestGrou
p::createForAttributesMutation(*this, name)) | 3186 if (MutationObserverInterestGroup* recipients = MutationObserverInterestGrou
p::createForAttributesMutation(*this, name)) |
| 3187 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
name, oldValue)); | 3187 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
name, oldValue)); |
| 3188 | 3188 |
| 3189 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue); | 3189 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue); |
| 3190 } | 3190 } |
| 3191 | 3191 |
| 3192 void Element::didAddAttribute(const QualifiedName& name, const AtomicString& val
ue) | 3192 void Element::didAddAttribute(const QualifiedName& name, const AtomicString& val
ue) |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3707 | 3707 |
| 3708 DEFINE_TRACE_WRAPPERS(Element) | 3708 DEFINE_TRACE_WRAPPERS(Element) |
| 3709 { | 3709 { |
| 3710 if (hasRareData()) { | 3710 if (hasRareData()) { |
| 3711 visitor->traceWrappers(elementRareData()); | 3711 visitor->traceWrappers(elementRareData()); |
| 3712 } | 3712 } |
| 3713 ContainerNode::traceWrappers(visitor); | 3713 ContainerNode::traceWrappers(visitor); |
| 3714 } | 3714 } |
| 3715 | 3715 |
| 3716 } // namespace blink | 3716 } // namespace blink |
| OLD | NEW |