| 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 didModifyAttribute(existingAttributeName, existingAttributeValue, newVal
ue); | 1166 didModifyAttribute(existingAttributeName, existingAttributeValue, newVal
ue); |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 static inline AtomicString makeIdForStyleResolution(const AtomicString& value, b
ool inQuirksMode) | 1169 static inline AtomicString makeIdForStyleResolution(const AtomicString& value, b
ool inQuirksMode) |
| 1170 { | 1170 { |
| 1171 if (inQuirksMode) | 1171 if (inQuirksMode) |
| 1172 return value.lowerASCII(); | 1172 return value.lowerASCII(); |
| 1173 return value; | 1173 return value; |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 DISABLE_CFI_PERF |
| 1176 void Element::attributeChanged(const QualifiedName& name, const AtomicString& ol
dValue, const AtomicString& newValue, AttributeModificationReason reason) | 1177 void Element::attributeChanged(const QualifiedName& name, const AtomicString& ol
dValue, const AtomicString& newValue, AttributeModificationReason reason) |
| 1177 { | 1178 { |
| 1178 if (ElementShadow* parentElementShadow = shadowWhereNodeCanBeDistributedForV
0(*this)) { | 1179 if (ElementShadow* parentElementShadow = shadowWhereNodeCanBeDistributedForV
0(*this)) { |
| 1179 if (shouldInvalidateDistributionWhenAttributeChanged(parentElementShadow
, name, newValue)) | 1180 if (shouldInvalidateDistributionWhenAttributeChanged(parentElementShadow
, name, newValue)) |
| 1180 parentElementShadow->setNeedsDistributionRecalc(); | 1181 parentElementShadow->setNeedsDistributionRecalc(); |
| 1181 } | 1182 } |
| 1182 if (name == HTMLNames::slotAttr && oldValue != newValue) { | 1183 if (name == HTMLNames::slotAttr && oldValue != newValue) { |
| 1183 if (ShadowRoot* root = v1ShadowRootOfParent()) | 1184 if (ShadowRoot* root = v1ShadowRootOfParent()) |
| 1184 root->ensureSlotAssignment().hostChildSlotNameChanged(oldValue, newV
alue); | 1185 root->ensureSlotAssignment().hostChildSlotNameChanged(oldValue, newV
alue); |
| 1185 } | 1186 } |
| (...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3289 else if (isUpgradedV0CustomElement()) | 3290 else if (isUpgradedV0CustomElement()) |
| 3290 V0CustomElement::attributeDidChange(this, name.localName(), oldValue
, newValue); | 3291 V0CustomElement::attributeDidChange(this, name.localName(), oldValue
, newValue); |
| 3291 } | 3292 } |
| 3292 | 3293 |
| 3293 if (MutationObserverInterestGroup* recipients = MutationObserverInterestGrou
p::createForAttributesMutation(*this, name)) | 3294 if (MutationObserverInterestGroup* recipients = MutationObserverInterestGrou
p::createForAttributesMutation(*this, name)) |
| 3294 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
name, oldValue)); | 3295 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
name, oldValue)); |
| 3295 | 3296 |
| 3296 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue); | 3297 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue); |
| 3297 } | 3298 } |
| 3298 | 3299 |
| 3300 DISABLE_CFI_PERF |
| 3299 void Element::didAddAttribute(const QualifiedName& name, const AtomicString& val
ue) | 3301 void Element::didAddAttribute(const QualifiedName& name, const AtomicString& val
ue) |
| 3300 { | 3302 { |
| 3301 if (name == HTMLNames::idAttr) | 3303 if (name == HTMLNames::idAttr) |
| 3302 updateId(nullAtom, value); | 3304 updateId(nullAtom, value); |
| 3303 attributeChanged(name, nullAtom, value); | 3305 attributeChanged(name, nullAtom, value); |
| 3304 InspectorInstrumentation::didModifyDOMAttr(this, name, value); | 3306 InspectorInstrumentation::didModifyDOMAttr(this, name, value); |
| 3305 dispatchSubtreeModifiedEvent(); | 3307 dispatchSubtreeModifiedEvent(); |
| 3306 } | 3308 } |
| 3307 | 3309 |
| 3308 void Element::didModifyAttribute(const QualifiedName& name, const AtomicString&
oldValue, const AtomicString& newValue) | 3310 void Element::didModifyAttribute(const QualifiedName& name, const AtomicString&
oldValue, const AtomicString& newValue) |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3826 | 3828 |
| 3827 DEFINE_TRACE_WRAPPERS(Element) | 3829 DEFINE_TRACE_WRAPPERS(Element) |
| 3828 { | 3830 { |
| 3829 if (hasRareData()) { | 3831 if (hasRareData()) { |
| 3830 visitor->traceWrappers(elementRareData()); | 3832 visitor->traceWrappers(elementRareData()); |
| 3831 } | 3833 } |
| 3832 ContainerNode::traceWrappers(visitor); | 3834 ContainerNode::traceWrappers(visitor); |
| 3833 } | 3835 } |
| 3834 | 3836 |
| 3835 } // namespace blink | 3837 } // namespace blink |
| OLD | NEW |