Summary: | [WebIDL] `window.CSS` should be non-callable object with correct Symbol.toStringTag | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Philip Jägenstedt <philip> | ||||||
Component: | Bindings | Assignee: | Alexey Shvayka <ashvayka> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Minor | CC: | alecflett, ashvayka, beidson, cdumez, clopez, darin, dino, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, joepeck, jsbell, koivisto, kondapallykalyan, macpherson, menard, sabouhallawa, sam, webkit-bug-importer, youennf | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Philip Jägenstedt
2021-01-22 02:54:15 PST
Created attachment 424542 [details]
Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess (In reply to Philip Jägenstedt from comment #0) Thank you for raising the issue and creating the bug! > I can't find the test for WebAssembly, but it's an object as it should be. It is covered by https://wpt.fyi/results/wasm/jsapi/idlharness.any.html Comment on attachment 424542 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424542&action=review Awesome work. Please add a new bindings test for namespace and partial namespace, so we catch regressions quickly if they happen. > Source/WebCore/bindings/scripts/IDLParser.pm:316 > +sub convertNamespaceToInterface This could use a comment explaining why it exists. Ideally, we would keep namespace objects as IDLNamespace all the way through generation, but I gather that would require a lot of refactoring for little gain at this point. Created attachment 427181 [details]
Patch for landing
(In reply to Sam Weinig from comment #5) > Comment on attachment 424542 [details] > Patch I appreciate the review; thank you, Sam! > Ideally, we would keep namespace objects as IDLNamespace all the way through > generation, but I gather that would require a lot of refactoring for little > gain at this point. Right, that would be an enormous change just for `window.CSS`. (In reply to Alexey Shvayka from comment #6) > Created attachment 427181 [details] > Patch for landing Added a comment and bindings test for namespace / partial namespace. Committed r276656 (237083@main): <https://commits.webkit.org/237083@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427181 [details]. (In reply to Alexey Shvayka from comment #7) > (In reply to Sam Weinig from comment #5) > > Right, that would be an enormous change just for `window.CSS`. Do any other specs (e.g. ones that maybe we don't implement in WebKit) use "namespace" yet? (In reply to Sam Weinig from comment #9) > Do any other specs (e.g. ones that maybe we don't implement in WebKit) use "namespace" yet? According to comment #0 and quick search in WPT & CSSWG drafts: no (apart from `console` and `WebAssembly`, which aren't processed by code generator). There are more specs with `partial namespace CSS` beyond CSS Houdini though (like https://github.com/w3c/csswg-drafts/blob/b4eb312fc9de41f31952d4a4d922f4c9b7cf51c9/css-images-4/Overview.bs#L1013). To be certain, https://github.com/w3c/browser-specs could be scraped for all WebIDL definitions out there. On a bright side, https://bugs.webkit.org/show_bug.cgi?id=158557 will remove 2 checks for namespace objects, and I have an idea how to simplify it further (remove more checks around GenerateConstructorHelperMethods). |