New issue
Advanced search Search tips

Issue 801935 link

Starred by 5 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 545318



Sign in to add a comment

[css-typed-om] Implement serialization of CSSStyleValues created from strings.

Project Member Reported by shend@chromium.org, Jan 15 2018

Issue description

When we serialize a CSSStyleValue created from a string, we need to preserve the original input [1]. Still clarifying the expected behaviour when multiple CSSStyleValues are created from a single string [2]

[1] https://drafts.css-houdini.org/css-typed-om-1/#stylevalue-serialization

[2] https://github.com/w3c/css-houdini-drafts/issues/556
 

Comment 1 by shend@chromium.org, Feb 28 2018

This is implemented for base CSSStyleValues, but not any of the subclasses. Supporting this for subclasses requires dirtying the serialization when we modify the object or its subobjects. It should be simple to support in theory, but it just requires meticulous testing so that we don't miss any cases where we need to dirty.

Not retaining the exact string for subclasses shouldn't be too bad; I think the only cases where it matters are things like trailing zeros or calcs.
Cc: futhark@chromium.org
Why was it specified that way? It sounds inconvenient from an implementors POV. Also, other CSSOM apis don't require the original input to be preserved.

Comment 3 by shend@chromium.org, Mar 8 2018

Hi Rune, I'm not exactly sure why. You're right that it's inconvenient to implement (and also to inconvenient to spec out). I've filed an issue here: https://github.com/w3c/css-houdini-drafts/issues/728

Comment 5 by shend@chromium.org, May 3 2018

Status: Available (was: Started)
No longer working on Typed OM, marking as Available. Should be straightforward to implement (see #c1), but not fun to test. Tab also mentioned that he'll add the dirtying mechanism explicitly in the spec language.

Comment 6 by shend@chromium.org, May 3 2018

Cc: shend@chromium.org
Owner: ----

Sign in to add a comment