-
rniwa@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=74692 Reviewed by Sam Weinig. Source/WebCore: Call invalidateNodeListsCacheAfterAttributeChanged in Element::updateAfterAttributeChanged instead of parsedMappedAttribute of various elements. Also make invalidateNodeListsCacheAfterAttributeChanged take the qualified name of the changed attribute so that we can exit early when the changed attribute isn't one of attributes we care. In addition, added a missing call to invalidateNodeListsCacheAfterAttributeChanged in Attr::setValue. Test: fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html * dom/Attr.cpp: (WebCore::Attr::childrenChanged): * dom/Element.cpp: (WebCore::Element::updateAfterAttributeChanged): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::addAttribute): (WebCore::NamedNodeMap::removeAttribute): * dom/Node.cpp: (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): * dom/Node.h: * dom/StyledElement.cpp: (WebCore::StyledElement::classAttributeChanged): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseMappedAttribute): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::parseMappedAttribute): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseMappedAttribute): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::parseMappedAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::parseMappedAttribute): LayoutTests: Add a regression test for setting Attr's value. WebKit should invalidate the cache as needed. * fast/dom/Attr/invalidate-nodelist-after-attr-setvalue-expected.txt: Added. * fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6eda1074