Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@harryterkelsen
Copy link
Contributor

Adds the crossOrigin property to the <img> tag used for decoding. This allows us to use cross-origin images in CanvasKit as if it were loaded from the same origin, as long as the CORS headers are properly set on the server hosting the image.

In the case where the image doesn't have proper CORS headers, this change causes an error to occur while attempting to decode, rather than later on in Skia when the image is converted into a texture. Hitting the cross-origin error later causes Skia to behave in undefined ways.

Progress towards flutter/flutter#149843

Pre-launch Checklist

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

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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Sep 4, 2024
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this testable? LGTM otherwise.

@harryterkelsen harryterkelsen added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 5, 2024
@auto-submit auto-submit bot merged commit 4844cb4 into flutter:main Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 5, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 5, 2024
…154655)

flutter/engine@652a43b...4844cb4

2024-09-05 1961493+harryterkelsen@users.noreply.github.com Add `crossOrigin` property to <img> tag used for decoding (flutter/engine#54961)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC codefu@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@jacobsimionato
Copy link

jacobsimionato commented Sep 9, 2024

Can we roll this change back? It broke a customer using the HTML renderer in google3 - see flutter/flutter#154809 and b/365475814

@eyebrowsoffire eyebrowsoffire added the revert Label used to revert changes in a closed and merged pull request. label Sep 9, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Sep 9, 2024

Time to revert pull request flutter/engine/54961 has elapsed.
You need to open the revert manually and process as a regular pull request.

@auto-submit auto-submit bot removed the revert Label used to revert changes in a closed and merged pull request. label Sep 9, 2024
eyebrowsoffire added a commit to eyebrowsoffire/engine that referenced this pull request Sep 9, 2024
@eyebrowsoffire
Copy link
Contributor

Created a manual revert here: #55042

auto-submit bot pushed a commit that referenced this pull request Sep 9, 2024
…4961)" (#55042)

This reverts commit 4844cb4.

Reason for revert: We broke users (including a Google internal customer) that depend on credentialed image requests. See flutter/flutter#154809

Fixes flutter/flutter#154809
jesswrd pushed a commit to jesswrd/engine that referenced this pull request Sep 11, 2024
…utter#54961)" (flutter#55042)

This reverts commit 4844cb4.

Reason for revert: We broke users (including a Google internal customer) that depend on credentialed image requests. See flutter/flutter#154809

Fixes flutter/flutter#154809
auto-submit bot pushed a commit that referenced this pull request Dec 17, 2024
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants