Closed annevk closed 7 years ago
We need at least some of them, for example CSSImageValue and CSSFontFaceValue objects. I think it makes sense to expose the rest too.
The other question is whether the various setters are needed in worklets.
@shans well... Do we really want those to be constructed based on a URL? I don't think we can wait on network in short-lived Worklets. That doesn't make much sense.
@annevk right, Worklets don't permit network access. But there are procedurally generated images (e.g. gradients, etc.) that we really should allow authors to construct directly inside the worklet rather than having to pass in through a custom property. Issue #186 is there to address the network issue.
Also, LayoutWorklets are expected to output style information, so they need to be able to construct lengths and so on.
@bzbarsky the style map provided to the paint worklet is read-only and won't have setters. I don't know what will end up being specced for layout.
But should you construct lengths from strings or integers?
is read-only and won't have setters
In that they will be hidden via appropriate [Exposed] annotations, presumably?
@annevk
But should you construct lengths from strings or integers?
I don't understand the context of the question.
@bzbarsky
In that they will be hidden via appropriate [Exposed] annotations, presumably?
Or it should be receiveing a StylePropertyMapReadOnly.
The CSS Working Group just discussed Issue 238, and agreed to the following resolutions:
RESOLVED: don't expose constructor and parse methods
On review, this seems to contradict #237.
See discussion in #237. Merging this issue with that.
It seems like maybe those should not, if we want to keep things lightweight?
@bzbarsky