|
Lines 535-541
void Element::setAttribute(const AtomicString& name, const AtomicString& value,
a/WebCore/dom/Element.cpp_sec1
|
| 535 |
|
535 |
|
| 536 |
if (localName == idAttributeName().localName()) |
536 |
if (localName == idAttributeName().localName()) |
| 537 |
updateId(old ? old->value() : nullAtom, value); |
537 |
updateId(old ? old->value() : nullAtom, value); |
| 538 |
|
538 |
|
| 539 |
if (old && value.isNull()) |
539 |
if (old && value.isNull()) |
| 540 |
namedAttrMap->removeAttribute(old->name()); |
540 |
namedAttrMap->removeAttribute(old->name()); |
| 541 |
else if (!old && !value.isNull()) |
541 |
else if (!old && !value.isNull()) |
|
Lines 544-549
void Element::setAttribute(const AtomicString& name, const AtomicString& value,
a/WebCore/dom/Element.cpp_sec2
|
| 544 |
old->setValue(value); |
544 |
old->setValue(value); |
| 545 |
attributeChanged(old); |
545 |
attributeChanged(old); |
| 546 |
} |
546 |
} |
|
|
547 |
|
| 548 |
#if ENABLE(INSPECTOR) |
| 549 |
if (Page* page = document()->page()) { |
| 550 |
if (InspectorController* inspectorController = page->inspectorController()) |
| 551 |
inspectorController->didModifyDOMAttr(this); |
| 552 |
} |
| 553 |
#endif |
| 547 |
} |
554 |
} |
| 548 |
|
555 |
|
| 549 |
void Element::setAttribute(const QualifiedName& name, const AtomicString& value, ExceptionCode&) |
556 |
void Element::setAttribute(const QualifiedName& name, const AtomicString& value, ExceptionCode&) |
|
Lines 555-561
void Element::setAttribute(const QualifiedName& name, const AtomicString& value,
a/WebCore/dom/Element.cpp_sec3
|
| 555 |
|
562 |
|
| 556 |
if (name == idAttributeName()) |
563 |
if (name == idAttributeName()) |
| 557 |
updateId(old ? old->value() : nullAtom, value); |
564 |
updateId(old ? old->value() : nullAtom, value); |
| 558 |
|
565 |
|
| 559 |
if (old && value.isNull()) |
566 |
if (old && value.isNull()) |
| 560 |
namedAttrMap->removeAttribute(name); |
567 |
namedAttrMap->removeAttribute(name); |
| 561 |
else if (!old && !value.isNull()) |
568 |
else if (!old && !value.isNull()) |
|
Lines 564-569
void Element::setAttribute(const QualifiedName& name, const AtomicString& value,
a/WebCore/dom/Element.cpp_sec4
|
| 564 |
old->setValue(value); |
571 |
old->setValue(value); |
| 565 |
attributeChanged(old); |
572 |
attributeChanged(old); |
| 566 |
} |
573 |
} |
|
|
574 |
|
| 575 |
#if ENABLE(INSPECTOR) |
| 576 |
if (Page* page = document()->page()) { |
| 577 |
if (InspectorController* inspectorController = page->inspectorController()) |
| 578 |
inspectorController->didModifyDOMAttr(this); |
| 579 |
} |
| 580 |
#endif |
| 567 |
} |
581 |
} |
| 568 |
|
582 |
|
| 569 |
PassRefPtr<Attribute> Element::createAttribute(const QualifiedName& name, const AtomicString& value) |
583 |
PassRefPtr<Attribute> Element::createAttribute(const QualifiedName& name, const AtomicString& value) |
|
Lines 1007-1019
void Element::dispatchAttrRemovalEvent(Attribute*)
a/WebCore/dom/Element.cpp_sec5
|
| 1007 |
{ |
1021 |
{ |
| 1008 |
ASSERT(!eventDispatchForbidden()); |
1022 |
ASSERT(!eventDispatchForbidden()); |
| 1009 |
|
1023 |
|
| 1010 |
#if ENABLE(INSPECTOR) |
|
|
| 1011 |
if (Page* page = document()->page()) { |
| 1012 |
if (InspectorController* inspectorController = page->inspectorController()) |
| 1013 |
inspectorController->didModifyDOMAttr(this); |
| 1014 |
} |
| 1015 |
#endif |
| 1016 |
|
| 1017 |
#if 0 |
1024 |
#if 0 |
| 1018 |
if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER)) |
1025 |
if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER)) |
| 1019 |
return; |
1026 |
return; |
|
Lines 1027-1039
void Element::dispatchAttrAdditionEvent(Attribute*)
a/WebCore/dom/Element.cpp_sec6
|
| 1027 |
{ |
1034 |
{ |
| 1028 |
ASSERT(!eventDispatchForbidden()); |
1035 |
ASSERT(!eventDispatchForbidden()); |
| 1029 |
|
1036 |
|
| 1030 |
#if ENABLE(INSPECTOR) |
|
|
| 1031 |
if (Page* page = document()->page()) { |
| 1032 |
if (InspectorController* inspectorController = page->inspectorController()) |
| 1033 |
inspectorController->didModifyDOMAttr(this); |
| 1034 |
} |
| 1035 |
#endif |
| 1036 |
|
| 1037 |
#if 0 |
1037 |
#if 0 |
| 1038 |
if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER)) |
1038 |
if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER)) |
| 1039 |
return; |
1039 |
return; |
|
Lines 1173-1178
void Element::removeAttribute(const String& name, ExceptionCode& ec)
a/WebCore/dom/Element.cpp_sec7
|
| 1173 |
if (ec == NOT_FOUND_ERR) |
1173 |
if (ec == NOT_FOUND_ERR) |
| 1174 |
ec = 0; |
1174 |
ec = 0; |
| 1175 |
} |
1175 |
} |
|
|
1176 |
|
| 1177 |
#if ENABLE(INSPECTOR) |
| 1178 |
if (Page* page = document()->page()) { |
| 1179 |
if (InspectorController* inspectorController = page->inspectorController()) |
| 1180 |
inspectorController->didModifyDOMAttr(this); |
| 1181 |
} |
| 1182 |
#endif |
| 1183 |
|
| 1176 |
} |
1184 |
} |
| 1177 |
|
1185 |
|
| 1178 |
void Element::removeAttributeNS(const String& namespaceURI, const String& localName, ExceptionCode& ec) |
1186 |
void Element::removeAttributeNS(const String& namespaceURI, const String& localName, ExceptionCode& ec) |