Hanging an empty attribute style on a StyledElement is a waste of resources. If updateAttributeStyle() doesn't find any presentation attributes we should set a null attributeStyle.
Created attachment 127377 [details] Patch
Comment on attachment 127377 [details] Patch We can avoid the heap allocation altogether if we don't have any presentation attributes..
Comment on attachment 127377 [details] Patch Actually, calling the isPresentationAttribute() virtual on every attribute is more expensive than avoiding the temporary StylePropertySet.
So this is a performance fix? Memory fix? Or is this in any way visible to the web?
Committed r108049: <http://trac.webkit.org/changeset/108049>
(In reply to comment #4) > So this is a performance fix? Memory fix? Or is this in any way visible to the web? It's a small performance and memory fix for cases where removing an attribute on an element and causing it to no longer have any presentation attributes is slightly more efficient.