Closed
Bug 1498445
Opened 6 years ago
Closed 6 years ago
cssstyledeclaration-mutationrecord-002.html is not testing what it wants to test.
Categories
(Core :: DOM: CSS Object Model, enhancement)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 file)
It's trying to test that setting an invalid CSS value for a property doesn't fire a mutation record. But the element doesn't have an existing style attribute, and as it turns out that given the following:
let div = document.createElement("div");
div.style.display = "bogus";
div.hasAttribute("style") will be true in Firefox, Blink and Webkit, but false in Edge.
So we do fire a mutation record, but due to the attribute creation, not the mutation.
I think only Edge matches the spec, and I want to update Firefox to do the same, and add another test to test what this wants to test.
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(emilio)
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(emilio)
Assignee | ||
Comment 1•6 years ago
|
||
This matches Edge, and the spec.
Added an explicit test for this, and a test that tests what
cssstyledeclaration-mutationrecord-002.html wanted to test, which is that
changing an existing declaration doesn't generate a mutation record.
Assignee | ||
Comment 2•6 years ago
|
||
Actually I was testing it wrong, and other browsers are correct here as well. I just happened to test with a page which had a style="" attribute in <body> instead.
So the good news is that this change is even less risky.
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/ccdfe4ca1f88
Stop creating a style attribute for invalid property values. r=smaug
Comment 4•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/13494 for changes under testing/web-platform/tests
Can't merge web-platform-tests PR due to failing upstream checks:
Github PR https://github.com/web-platform-tests/wpt/pull/13494
* Taskcluster (pull_request) (https://tools.taskcluster.net/task-group-inspector/#/OiEFwATlQK6gWHjeKdwB-A)
Upstream PR merged
You need to log in
before you can comment on or make changes to this bug.
Description
•