[Webkit-unassigned] [Bug 70810] nameNodeListCache should be invalidated when name attribute changes/modified.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 28 06:26:18 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=70810





--- Comment #9 from Arko Saha <nghq36 at motorola.com>  2011-10-28 06:26:18 PST ---
After investigating more, following are the observations:

When we do: element.className = 'myClass';

If the element doesn't have a content attribute "class" specified, then it fires two DOMSubTreeMidified events. If specified then it fires only one event.

1. In Element::setAttribute() if element doesn't have a content attribute "class" present, then it calls NamedNodeMap::addAttribute() which fires the first DOMSubTreeMidified event. And second event is fired from StyledElement::classAttributeChanged().

2. Now if the element has a content attribute "class" present, then Element::setAttribute() calls setValue() to update the value of the old "class" attribute. And only one DOMSubTreeMidified gets fired from StyledElement::classAttributeChanged().

In the case of "name" attribute DOMSubTreeMidified event is fired only if element doesn't have a content attribute "name" specified.

So, we should not send the DOMSubTreeMidified event from StyledElement::classAttributeChanged(). Rather we need to send the event irrespective of "adding attribute" or "updating attribute's value".
This will fix both class and name attribute issue. Please let me know your comments.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list