Intent to Ship: CanvasRenderingContext2D.getContextAttributes()

44 views
Skip to first unread message

Miguel Casas-Sanchez

unread,
Jan 5, 2019, 2:46:59 PM1/5/19
to blink-dev

Contact emails

mca...@chromium.org


Explainer

foolip@ summarised the situation in the WhatWG Issue [0]; essentially:

- this functionality is present in WebGL, and we're just talking about alignment for Canvas 2D.

- this method was removed from Chrome [1], but now the arrival of new Attributes such as, e.g. lowLatency [2] or the ColorManagement [3], makes it necessary again (only this time around the method is part of the WhatWG Spec).


[0] https://github.com/whatwg/html/issues/2563#issue-222951347

[1] https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/7r0SshfEWgQ/KrJJNeFDBgAJ

[2] https://www.chromestatus.com/features/6360971442388992

Spec

https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-canvas-getcontextattributes

Reviewed in https://github.com/whatwg/html/pull/4253


Summary

See the Explainer.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Demo link

This is a trivial feature, see the test in https://chromium-review.googlesource.com/c/chromium/src/+/1395882/2/third_party/blink/web_tests/external/wpt/2dcontext/context-attributes/getContextAttributes.html


Debuggability

Doesn't apply.


Risks

Interoperability and Compatibility

Low because this is a nice-to-have feature for developers, and other browsers' showed support:


Edge: No signals

Firefox: Positive signals during spec review. Implementation bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1517786

Safari: No signals but looped in the spec patch and weren't opposed. Implementation bug https://bugs.webkit.org/show_bug.cgi?id=193144.

Web / Framework developers: Google Ink team communicated offline that this made sense for them.


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

Trivial, working on those in https://crrev.com/c/1395882 

Entry on the feature dashboard:

https://www.chromestatus.com/feature/6545516187877376


Rick Byers

unread,
Jan 7, 2019, 5:40:12 PM1/7/19
to Miguel Casas-Sanchez, blink-dev
LGTM1, seems pretty trivial to me.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPUS086-%2BvzfpyPY9dysTUfykdNRBKbzhVeWo4gYYXRrcBT0PQ%40mail.gmail.com.

Philip Jägenstedt

unread,
Jan 8, 2019, 6:17:37 AM1/8/19
to Rick Byers, Miguel Casas-Sanchez, blink-dev
LGTM2, thanks for closing the loop on this, tests and all!

Yoav Weiss

unread,
Jan 8, 2019, 6:30:28 AM1/8/19
to Philip Jägenstedt, Rick Byers, Miguel Casas-Sanchez, blink-dev
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYfmeq4kN%3DEMkjrAxBVLykNwT%3Dhpk_%2Bkct-hbndGBj2vjw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages