WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
78812
Removing the last presentation attribute should result in a null attributeStyle().
https://bugs.webkit.org/show_bug.cgi?id=78812
Summary
Removing the last presentation attribute should result in a null attributeSty...
Andreas Kling
Reported
2012-02-16 07:40:50 PST
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.
Attachments
Patch
(2.65 KB, patch)
2012-02-16 07:45 PST
,
Andreas Kling
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2012-02-16 07:45:48 PST
Created
attachment 127377
[details]
Patch
Andreas Kling
Comment 2
2012-02-16 08:18:01 PST
Comment on
attachment 127377
[details]
Patch We can avoid the heap allocation altogether if we don't have any presentation attributes..
Andreas Kling
Comment 3
2012-02-16 08:33:12 PST
Comment on
attachment 127377
[details]
Patch Actually, calling the isPresentationAttribute() virtual on every attribute is more expensive than avoiding the temporary StylePropertySet.
Eric Seidel (no email)
Comment 4
2012-02-16 15:09:58 PST
So this is a performance fix? Memory fix? Or is this in any way visible to the web?
Andreas Kling
Comment 5
2012-02-17 01:02:05 PST
Committed
r108049
: <
http://trac.webkit.org/changeset/108049
>
Andreas Kling
Comment 6
2012-02-17 01:21:01 PST
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug