Summary: | Removing the last presentation attribute should result in a null attributeStyle(). | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
Component: | DOM | Assignee: | Andreas Kling <kling> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | eric, koivisto | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 78798 | ||||||
Attachments: |
|
Description
Andreas Kling
2012-02-16 07:40:50 PST
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. |