RESOLVED WONTFIX 190274
DOMCSSNamespace (window.CSS) should be a
https://bugs.webkit.org/show_bug.cgi?id=190274
Summary DOMCSSNamespace (window.CSS) should be a
Justin Michaud
Reported 2018-10-03 20:53:04 PDT
Make all the CSS.* methods instance methods. This matches a recent change to <https://drafts.csswg.org/cssom-1/#namespacedef-css>, although no other browsers implement this yet. This will be required to make the CSS.paintWorklet attribute work.
Attachments
Patch (9.55 KB, patch)
2018-10-03 21:04 PDT, Justin Michaud
rniwa: review-
ews-watchlist: commit-queue-
Archive of layout-test-results from ews102 for mac-sierra (2.32 MB, application/zip)
2018-10-03 22:14 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.86 MB, application/zip)
2018-10-03 22:22 PDT, EWS Watchlist
no flags
Justin Michaud
Comment 1 2018-10-03 21:04:14 PDT
EWS Watchlist
Comment 2 2018-10-03 22:13:59 PDT
Comment on attachment 351580 [details] Patch Attachment 351580 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9450533 New failing tests: fast/css/css-prototype.html
EWS Watchlist
Comment 3 2018-10-03 22:14:00 PDT
Created attachment 351584 [details] Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 4 2018-10-03 22:22:30 PDT
Comment on attachment 351580 [details] Patch Attachment 351580 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9450555 New failing tests: fast/css/css-prototype.html
EWS Watchlist
Comment 5 2018-10-03 22:22:32 PDT
Created attachment 351585 [details] Archive of layout-test-results from ews104 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Ryosuke Niwa
Comment 6 2018-10-03 22:25:03 PDT
Comment on attachment 351580 [details] Patch Looks like the test is failing. The patch looks good otherwise. r- for the failing tests.
Chris Dumez
Comment 7 2018-10-04 08:54:00 PDT
Comment on attachment 351580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351580&action=review > Source/WebCore/ChangeLog:3 > + DOMCSSNamespace (window.CSS) should be a Title seems wrong. > Source/WebCore/ChangeLog:9 > + This matches <https://drafts.csswg.org/cssom-1/#namespacedef-css>, although no other browsers To be clear, the spec indicate a namespace should be used, which is not what you did. Our bindings generator does not support namespaces yet AFAIK and your implementation does not seem to mimic a namespace either. > Source/WebCore/css/DOMCSSNamespace.idl:34 > + NoInterfaceObject Exposed=Window and NoInterfaceObject at the same time make no sense. I would suggest dropping Exposed=Window. > Source/WebCore/page/DOMWindow.cpp:1576 > +Ref<DOMCSSNamespace> DOMWindow::css() const We do not normally return Ref<> / RefPtr<> expect for factories (where ownership is transferred). This should return a DOMCSSNamespace&. > Source/WebCore/page/DOMWindow.idl:147 > + [Replaceable] readonly attribute DOMCSSNamespace CSS; Please add testing to confirm that the CSS property has the following attributes (as per Web IDL spec): { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } Also, CSS.__proto__ should be Object.prototype as per Web IDL. I doubt this is correct with your implementation. > LayoutTests/fast/css/css-prototype-expected.txt:7 > +PASS Object.getOwnPropertyNames(CSS.__proto__).includes('supports') is true I might be misinterpreting the Web IDL specs but it looks to me like the properties should be on the instance, not the prototype. As a matter of fact, the prototype is supposed to be the regular ObjectPrototype.
Chris Dumez
Comment 8 2018-10-04 08:54:57 PDT
Comment on attachment 351580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351580&action=review >> Source/WebCore/ChangeLog:9 >> + This matches <https://drafts.csswg.org/cssom-1/#namespacedef-css>, although no other browsers > > To be clear, the spec indicate a namespace should be used, which is not what you did. Our bindings generator does not support namespaces yet AFAIK and your implementation does not seem to mimic a namespace either. Relevant spec: - https://heycam.github.io/webidl/#es-namespaces
Simon Fraser (smfr)
Comment 9 2018-10-04 12:49:04 PDT
Should be a what?
Note You need to log in before you can comment on or make changes to this bug.