- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Fri, 31 Jul 2020 17:09:26 +0000
- To: public-houdini-archive@w3.org
The CSS Working Group just discussed `Concern about attributeStyleMap updating the style attribute`. <details><summary>The full IRC log of that discussion</summary> <TabAtkins> Topic: Concern about attributeStyleMap updating the style attribute<br> <TabAtkins> github: https://github.com/w3c/css-houdini-drafts/issues/997<br> <fantasai> TabAtkins: I'm not sure if this is an actual concern to worry about<br> <fantasai> TabAtkins: wanted impl advice<br> <fantasai> TabAtkins: when doing high-frequency updates, like during TypedOM<br> <fantasai> TabAtkins: use single transform object, setting over and over again<br> <fantasai> TabAtkins: but are seeing the style attr get updated in real time as well<br> <fantasai> TabAtkins: so reserialization happening constantly as well<br> <fantasai> TabAtkins: we saw as a perf concern<br> <fantasai> TabAtkins: So is this actually causing trouble?<br> <fantasai> TabAtkins: person seems to believe causing perf issues, I'm not sure myself<br> <fantasai> TabAtkins: but if we are eagerly reserializing to style attr, not great. Negates a major advantage of TypedOM<br> <fantasai> TabAtkins: Apparently we don't ???<br> <fantasai> TabAtkins: but if you look in inspector, do see it being constantly updated<br> <fantasai> TabAtkins: But either way..<br> <jensimmons> present-<br> <fantasai> emilio: Mutation observer thing, it should fire mutation observer callbacks exceptin some cases<br> <fantasai> emilio: afaict, internally we don't serialize until asked for<br> <fantasai> emilio: if that's devtools, then we reserialize all the time<br> <fantasai> TabAtkins: if that's true across browsers, then I can close as no change, browsers are smart enough to handle appropriately don't worry about it<br> <fantasai> fremy: meaning?<br> <fantasai> TabAtkins: browsers aren't eagerly serializing<br> <fantasai> iank_: file a bug against Chrome? we should investigate this<br> <fantasai> TabAtkins: apparently Chrome doesn't fire mutation events<br> <fantasai> TabAtkins: that's a bug in chrome<br> <fantasai> fremy: Because we still want to update the style attr, every single time<br> <fantasai> fremy: can we put something in the spec that says when?<br> <fantasai> AmeliaBR: it's on demand<br> <fantasai> TabAtkins: when someone asks for it, or is observing the style attr<br> <fantasai> fremy: so flag it?<br> <fantasai> fremy: ok<br> <Rossen___> q?<br> <fantasai> TabAtkins: sounds like the resolution should be, browsers should be smart enough to lazily serialize style attr when necessary<br> <Zakim> fantasai, you wanted to suggest a note in the spec<br> <fantasai> TabAtkins: I can put a note in the spec<br> <fantasai> AmeliaBR: One thing to consider, should this be a general thing for DOM attributes reflected?<br> <fantasai> AmeliaBR: working with CSSOM or other things to be consistent?<br> <fantasai> TabAtkins: yeah.....<br> <smfr> q+<br> <fantasai> TabAtkins: existing string OM, not doing any restringifying, but sure there are some reflected attrs<br> <fantasai> TabAtkins: in HTML... I'll check if HTML has wording on that<br> <fantasai> ACTION: TabAtkins investigate restringification of reflected attrs across OMs<br> <fantasai> fremy: Not always the user that gets the style attr<br> <fantasai> fremy: e.g. ??<br> <fantasai> fremy: Should never happen. Shouldn't change the DOM when recomputing CSS<br> <TabAtkins> s/??/if you have a selector that depends on the style attribute's contents/<br> <fantasai> TabAtkins: DOM has it internally tracked, doesn't need to update everything to keep consistent except on demand<br> <fantasai> emilio: style attr keep not a string, but a CSS declaration and an attached string<br> <fantasai> emilio: when request string, we serialize it<br> <fantasai> emilio: Someon requests DOM attr, will get the correct value<br> <TabAtkins> ack smfr<br> <fantasai> smfr: Normally we don't specify internal details<br> <fantasai> smfr: Would just be a QoI issue about when serialization happens<br> <fantasai> smfr: Spec shouldn't say anything, should just specify web-exposed behavior<br> <fantasai> TabAtkins: agree<br> <fantasai> TabAtkins: I will close no change, review HTML to see if they have any particular wording<br> <fantasai> AmeliaBR: only other thing is to make sure wording is clear wrt event hooks<br> <fantasai> AmeliaBR: should trigger mutation observers even if not serialized until asked for<br> <fantasai> ACTION TabAtkins write a test for mutation observer for style attr changes via TYpedOM<br> <fantasai> ACTION: TabAtkins write a test for mutation observer for style attr changes via TYpedOM<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/997#issuecomment-667233997 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 31 July 2020 17:09:29 UTC