-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Remove dart:html and drawImageScaled usages
#10411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request removes usages of the deprecated drawImageScaled method and migrates from dart:html to package:web. The migration to package:web in the pointer_interceptor example is done correctly, including updating the pubspec.yaml and adding final to the top-level element definition. However, the replacement of drawImageScaled in both camera_web and image_picker_for_web appears to be incorrect based on the provided diffs. The new drawImage calls are missing the width and height arguments, which will change the behavior from scaling the image to drawing it at its intrinsic size. This is a critical issue that needs to be addressed.
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't realize these were drop-in replacements or I would have just done the PR instead of filing the issues!
I didn't realize they were drop-in replacements either, until I started working on them 🙂 Thanks for the review! |
@stuartmorgan-g I'm only changing the example inside |
|
Nope, I think example/pubspec.yaml may not be auto-exempted which would trip the check, but it's fine to override. |
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor fixes
|
CHANGELOG override: this change to the pointer_interceptor example is not relevant to clients. |
flutter/packages@ce44ebb...34746bb 2025-11-18 mdebbar@google.com Remove `dart:html` and `drawImageScaled` usages (flutter/packages#10411) 2025-11-18 engine-flutter-autoroll@skia.org Manual roll Flutter from 9b5ad80 to cc14ef5 (143 revisions) (flutter/packages#10455) 2025-11-17 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump the test-dependencies group across 10 directories with 3 updates (flutter/packages#10457) 2025-11-17 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump exoplayer_version from 1.5.1 to 1.8.0 in /packages/video_player/video_player_android/android (flutter/packages#10309) 2025-11-17 magder@google.com Split dependabot gradle plugin (flutter/packages#10454) 2025-11-17 stuartmorgan@google.com [various] Update all packages to Pigeon 26 (flutter/packages#10450) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@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
…r#178734) flutter/packages@ce44ebb...34746bb 2025-11-18 mdebbar@google.com Remove `dart:html` and `drawImageScaled` usages (flutter/packages#10411) 2025-11-18 engine-flutter-autoroll@skia.org Manual roll Flutter from 9b5ad80 to cc14ef5 (143 revisions) (flutter/packages#10455) 2025-11-17 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump the test-dependencies group across 10 directories with 3 updates (flutter/packages#10457) 2025-11-17 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump exoplayer_version from 1.5.1 to 1.8.0 in /packages/video_player/video_player_android/android (flutter/packages#10309) 2025-11-17 magder@google.com Split dependabot gradle plugin (flutter/packages#10454) 2025-11-17 stuartmorgan@google.com [various] Update all packages to Pigeon 26 (flutter/packages#10450) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@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
Fixes flutter/flutter#178123
Fixes flutter/flutter#178129