Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MutationObserver: added test on special handling for inline styles #32022

Merged
merged 1 commit into from Dec 13, 2021

Conversation

just-boris
Copy link
Contributor

Context: it was originally found as a bug in JSDOM: jsdom/jsdom#3305

But I think, the test case for that issue belongs to this repo

@annevk
Copy link
Member

annevk commented Dec 13, 2021

It's great to have tests for this, but I worry this is not well-defined. @zcorpan @emilio do you know if CSSOM covers attribute mutations to this level of detail?

@just-boris
Copy link
Contributor Author

It is covered here: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty

If updated is true, update style attribute for the CSS declaration block.

When styles do not change, the attribute does not get set

@annevk
Copy link
Member

annevk commented Dec 13, 2021

Could you move this test into css/cssom?

@annevk annevk enabled auto-merge (rebase) December 13, 2021 11:47
@annevk annevk merged commit 8ab0c68 into web-platform-tests:master Dec 13, 2021
@emilio
Copy link
Contributor

emilio commented Dec 13, 2021

@annevk Don't we have already css/cssom/cssstyledeclaration-mutationrecord-*.html and css/cssom/css-style-attr-decl-block.html for this? At least some of these are covered there, if not all.

@annevk
Copy link
Member

annevk commented Dec 13, 2021

Sorry, I should have grepped. Nice to see we gained test coverage for this.

@just-boris
Copy link
Contributor Author

Checked the mentioned test suites. The cssText behavior is indeed covered by these lines:

style.cssText = "z-index: 42;";
assert_record_with_old_value("z-index: 42;", "changing cssText with the same content");

However, the primary part (no mutation records when style[something] gets set) was not covered before.

I can send a follow-up PR to restructure the tests if you will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants