Bug 217627

Summary: CSSStyleDeclaration includes descriptors
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: emilio, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, joepeck, koivisto, macpherson, menard, sam, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=217623
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

Description Sam Sneddon [:gsnedders] 2020-10-12 11:46:57 PDT
e.g.:

> "unicode-range" in document.body.style
< true

CSSStyleDeclaration should just contain properties, not descriptors.
Comment 1 Sam Sneddon [:gsnedders] 2020-10-15 20:03:13 PDT
If you want more to fix around CSSStyleDeclaration Sam, there's more :)

CSS.supports gets this right, but the IDL generation doesn't.
Comment 2 Sam Weinig 2020-10-16 10:20:53 PDT
Sam, can you point me to where the difference between properties and descriptors is defined? Our current CSSProperties.json does not seem to differentiate (or I don't understand how it is), so I would need a better understanding of what to change.
Comment 3 Sam Sneddon [:gsnedders] 2020-10-19 10:39:35 PDT
Sam, I filed https://github.com/w3c/csswg-drafts/issues/5633 about the fact that this is pretty unclear currently.

A bunch of these have "skip-builder": true currently, so maybe we just want that more?
Comment 4 Radar WebKit Bug Importer 2020-10-19 11:47:16 PDT
<rdar://problem/70449709>
Comment 5 Sam Weinig 2020-10-19 13:15:31 PDT
(In reply to Sam Sneddon [:gsnedders] from comment #3)
> Sam, I filed https://github.com/w3c/csswg-drafts/issues/5633 about the fact
> that this is pretty unclear currently.
> 
> A bunch of these have "skip-builder": true currently, so maybe we just want
> that more?

There are ~40 marked with "skip-builder". If that is the set, perhaps we can rename skip-builder to be something semantic about the property rather than an action and use it, but I am not clear if that is the correct set.
Comment 6 Sam Weinig 2020-10-21 15:51:37 PDT
Created attachment 412038 [details]
Patch
Comment 7 Sam Weinig 2020-10-21 15:52:47 PDT
Turns out there was a function on CSSProperty called isDescriptorOnly, so I'm going to use that as the guide.
Comment 8 Sam Weinig 2020-10-21 17:32:13 PDT
Hm, seems at least on rest expects some descriptors sometimes.
Comment 9 Sam Weinig 2020-10-21 19:23:01 PDT
The test, imported/w3c/web-platform-tests/css/cssom/cssom-fontfacerule.html, seems to indicate that when you get a CSSStyleDeclaration from a CSSFontFaceRule, it should include the descriptor "src".
Comment 10 Sam Weinig 2020-10-25 09:22:19 PDT
Reseting to default assignee while we work out what the behavior here should really be.
Comment 11 Sam Sneddon [:gsnedders] 2020-10-26 16:47:07 PDT
(In reply to Sam Weinig from comment #9)
> The test, imported/w3c/web-platform-tests/css/cssom/cssom-fontfacerule.html,
> seems to indicate that when you get a CSSStyleDeclaration from a
> CSSFontFaceRule, it should include the descriptor "src".

(In reply to Sam Weinig from comment #10)
> Reseting to default assignee while we work out what the behavior here should
> really be.

See also: https://github.com/w3c/csswg-drafts/issues/5649