WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
100395
Avoid unnecessary style recalcs on id attribute mutation
https://bugs.webkit.org/show_bug.cgi?id=100395
Summary
Avoid unnecessary style recalcs on id attribute mutation
Antti Koivisto
Reported
2012-10-25 10:32:13 PDT
There is no need to invalidate element style on id attribute change if neither the old nor the new id were mentioned in any stylesheet. This is similar to the optimization we already have for class attributes.
Attachments
patch
(4.30 KB, patch)
2012-10-25 10:47 PDT
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2012-10-25 10:47:13 PDT
Created
attachment 170690
[details]
patch
Andreas Kling
Comment 2
2012-10-25 10:55:21 PDT
Comment on
attachment 170690
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170690&action=review
Why didn't we do this already? r=me
> Source/WebCore/css/StyleResolver.cpp:4241 > +bool StyleResolver::hasSelectorForId(const AtomicString &idValue) const
OH GOD & PLACEMENT
> Source/WebCore/dom/Element.cpp:716 > + StyleResolver* styleResolver = document()->styleResolverIfExists();
Indentation derp.
Antti Koivisto
Comment 3
2012-10-25 12:35:32 PDT
http://trac.webkit.org/changeset/132516
Alexey Proskuryakov
Comment 4
2012-11-02 12:38:03 PDT
This has caused
bug 101047
.
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