WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
129476
StyledElement::attributeChanged shouldn't do any work when the attribute value didn't change
https://bugs.webkit.org/show_bug.cgi?id=129476
Summary
StyledElement::attributeChanged shouldn't do any work when the attribute valu...
Ryosuke Niwa
Reported
2014-02-28 01:57:23 PST
StyledElement::attributeChanged shouldn't do any work when the attribute value didn't change
Attachments
Fixes the bug
(1.81 KB, patch)
2014-02-28 01:58 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Patch for landing
(1.84 KB, patch)
2016-11-02 14:59 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Patch for landing
(1.81 KB, patch)
2016-11-09 13:43 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2014-02-28 01:58:17 PST
Created
attachment 225446
[details]
Fixes the bug
Alexey Proskuryakov
Comment 2
2014-02-28 09:23:05 PST
Comment on
attachment 225446
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=225446&action=review
> Source/WebCore/ChangeLog:8 > + Exit early in attributeChanged when the attribute value didn't change like
r164856
.
This description doesn't quite match the code change, there is no early exit.
Andreas Kling
Comment 3
2014-02-28 22:20:29 PST
Comment on
attachment 225446
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=225446&action=review
r=me
>> Source/WebCore/ChangeLog:8 >> + Exit early in attributeChanged when the attribute value didn't change like
r164856
. > > This description doesn't quite match the code change, there is no early exit.
Yeah, could be worded better.
Ryosuke Niwa
Comment 4
2014-02-28 22:21:15 PST
Comment on
attachment 225446
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=225446&action=review
>>> Source/WebCore/ChangeLog:8 >>> + Exit early in attributeChanged when the attribute value didn't change like
r164856
. >> >> This description doesn't quite match the code change, there is no early exit. > > Yeah, could be worded better.
Oops, yeah. We still need to call Element::attributeChanged.
Ryosuke Niwa
Comment 5
2016-11-02 14:59:36 PDT
Created
attachment 293700
[details]
Patch for landing
Ryosuke Niwa
Comment 6
2016-11-02 15:13:18 PDT
Comment on
attachment 293700
[details]
Patch for landing Wait for EWS first.
Antti Koivisto
Comment 7
2016-11-02 15:32:51 PDT
Comment on
attachment 293700
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=293700&action=review
> Source/WebCore/dom/StyledElement.cpp:158 > + if (oldValue != newValue) {
Can't we just not call attributeChanged() when nothing changed?
Ryosuke Niwa
Comment 8
2016-11-02 16:00:47 PDT
(In reply to
comment #7
)
> Comment on
attachment 293700
[details]
> Patch for landing > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=293700&action=review
> > > Source/WebCore/dom/StyledElement.cpp:158 > > + if (oldValue != newValue) { > > Can't we just not call attributeChanged() when nothing changed?
No, unfortunately, parseAttribute needs to be called even when the attribute value didn't change because some attributes on some elements can have a side effect. And Element::attributeChanged also creates a mutation record for mutation observer, which is pretty important.
Ryosuke Niwa
Comment 9
2016-11-09 13:43:02 PST
Created
attachment 294279
[details]
Patch for landing
WebKit Commit Bot
Comment 10
2016-11-09 14:18:09 PST
Comment on
attachment 294279
[details]
Patch for landing Clearing flags on attachment: 294279 Committed
r208485
: <
http://trac.webkit.org/changeset/208485
>
WebKit Commit Bot
Comment 11
2016-11-09 14:18:15 PST
All reviewed patches have been landed. Closing bug.
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