engine icon indicating copy to clipboard operation
engine copied to clipboard

[web] Use TrustedTypes to load canvaskit (where available)

Open ditman opened this issue 3 years ago • 1 comments

Adds a small JS-Interop layer to use the TrustedTypes API from the flutter/engine code, and use it to download the CanvasKit JS.

Adds a test that runs the canvaskit_api tests with TT enabled.

Fixes https://github.com/flutter/flutter/issues/112654

Testing

  • Unit test included
  • Deployed test app: https://dit-tests.web.app

Pre-launch Checklist

  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [x] I read the Tree Hygiene wiki page, which explains my responsibilities.
  • [x] I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • [x] I listed at least one issue that this PR fixes in the description above.
  • [x] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • [x] I updated/added relevant documentation (doc comments with ///).
  • [x] I signed the CLA.
  • [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

ditman avatar Oct 05 '22 00:10 ditman

/cc @engelsdamien

ditman avatar Oct 05 '22 00:10 ditman

Marking this as "autosubmit", I think it's ready to go!

ditman avatar Oct 19 '22 00:10 ditman