Closed
Bug 1428244
Opened 7 years ago
Closed 7 years ago
The attributeChangedCallback for style attribute is always fired with null as oldValue and empty string as newValue
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
Details
Attachments
(2 files)
(See Bug #1419322 comment #14)
This bug is fired to fix
- We are missing [CEReactions] annotation on the attributes of CSSStyleDeclaration [1].
- The attributeChangedCallback for style attribute is always fired with null as oldValue and empty string as newValue [2].
[1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-camel-cased-attribute
[2] https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5663
Assignee | ||
Comment 1•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Comment 5•7 years ago
|
||
This also fixes some WPT failures in custom-elements/reactions/CSSStyleDeclaration.html.
Blocks: 1419308
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8940108 -
Flags: review?(bugs)
Attachment #8940109 -
Flags: review?(bugs)
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8940108 [details]
Bug 1428244 - Part 1: Add [CEReactions] in CSSStyleDeclaration;
https://reviewboard.mozilla.org/r/210388/#review216616
Attachment #8940108 -
Flags: review?(bugs) → review+
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8940109 [details]
Bug 1428244 - Part 2: Set correct oldValue/newValue for the attributeChangedCallback which is fired from style attribute change;
https://reviewboard.mozilla.org/r/210390/#review216628
I guess we can do it this way, at least for now.
As I asked on IRC:
edgar: has anyone considered using nsIMutationObserver for CE attribute change notifications
12:19 and using its AttributeWillChange callback
12:19 That is how (DOM) MutationObserver works
Attachment #8940109 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 10•7 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #9)
> has anyone considered using nsIMutationObserver for CE attribute
> change notifications
> 12:19 and using its AttributeWillChange callback
> 12:19 That is how (DOM) MutationObserver works
Not yet, but if it makes implementation simper and less error prone, I am happy doing that :).
Filed bug 1428784.
Comment 11•7 years ago
|
||
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b89800bcb8b9
Part 1: Add [CEReactions] in CSSStyleDeclaration; r=smaug
https://hg.mozilla.org/integration/autoland/rev/ac75fed1265f
Part 2: Set correct oldValue/newValue for the attributeChangedCallback which is fired from style attribute change; r=smaug
Comment 12•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b89800bcb8b9
https://hg.mozilla.org/mozilla-central/rev/ac75fed1265f
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 13•6 years ago
|
||
this wouldn't really solve the style attribute issue, since if we do this, then attribute changes coming from the parser aren't triggered.
Comment 14•6 years ago
|
||
er, wrong bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•