-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[Web] Allow specifying the strategy on when to use <img> element to display images #159917
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 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. |
@dkwingsmt thank you for working on this, it is definitely the right thing to add. |
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
This is great. Making this behavior opt in will save a lot of frustration. Nice callout in the docs about the potential pitfalls and limitations. |
} catch (e) { | ||
return loadViaImgElement(); | ||
} |
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.
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.
I kind of get the idea but not completely... Can you provide a suggestion?
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.
Probably using some special Flutter logging function, not print, but something like this:
} catch (error) {
if (WebImgElementStrategy.warnOnCors) {
print("Warning: Could not load the network image at the following URL: $url");
print(" The error was: $error");
print("");
print(" This could indicate that the CORS on the image or server is not configured properly.");
print(" To load your image, Flutter used a native HTML <img> element to render the image without CORS.");
print(" However, this is not without its drawbacks. For more details, see <url to Image.network docs>");
print("");
print(" Consider instead: ");
print(" - Configuring CORS correctly on your server, and pass WebImgElementStrategy.never. See <url to web.dev>");
print(" - Explicitly setting WebImgElementStrategy.always to save Flutter time deciding which strategy to use");
print("");
print(" To suppress this warning in the future, set WebImgElementStrategy.warnOnCors = false");
}
return loadViaImgElement();
}
With this log statement, I'd recommend:
- setting the default strategy to
WebImgElementStrategy.whenNecessary
- setting the default
WebImgElementStrategy.warnOnCors = true
@jezell @slavap I know you both want to avoid slow or buggy behavior by default, but I'm still really concerned that plenty of devs, especially those that come from the mobile world, won't understand what's happening and might not know to use this option if there is no explanation. I think this gives a nice middle ground where:
- the default behavior is images mostly "just work"
- developers are warned about potentially slow or buggy behavior
- we give a link to explain CORS (eg, this one from web.dev)
- we give a link explaining the drawbacks (the
Image.network
docs) - developers are first advised to fix CORS properly
- developers are given a fallback option to use the workaround and disable the warning
Would you agree this is a good compromise?
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.
@Levi-Lesches No, I don't think it's not a good compromise to turn it on by default because platform views themselves don't just work. Platform views are a hack with too many downsides to enable by default. I've spent hundreds of hours dealing with fallout from using them. They are by far the most error prone part of Flutter web. We'd be far better off if time if the entire HtmlElementView widget was deleted and people were forced to use the web package to insert html elements in the page when that's what they want (which they can already do today).
Unfortunately, CORS is a part of the web. People need to learn to deal with it, or they need to not ship web apps.
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.
@Levi-Lesches while I understand while you are coming from, I think its very important that usability never comes at the expense of stability or reliability. Any feature that breaks other features, or potentially puts the stability of your app at risk shouldn't be the default path.
I think maybe something that would be a middle ground would be to do something like those overflow graphics that appear in dev mode, and maybe render yellow text over a background color that explains that the image was blocked by the CORS policy and writes a warning to the console with a link to the docs about this feature. Providing additional guidance at dev time can be very helpful for new developers.
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.
So instead of defaulting to whenNecessary
, still default to .never
, but print a warning like the above when CORS fails so that devs have an actionable next step. If that's what you're saying, I agree
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.
This is a nice idea, but I think I'd better make it a separate PR so that we can focus on changing the default behavior in this PR. Thanks for the suggestion!
/// This option is only effective on the Web platform. Other platforms always | ||
/// display network images by fetching bytes. | ||
enum WebImgElementStrategy { | ||
/// Never use <img> elements. |
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.
Consider documenting what happens if an image fails to load through a fetch.
/// | ||
/// This strategy still fetches bytes if `header` is not empty, since <img> | ||
/// elements do not support headers. | ||
always, |
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.
Since it's not guaranteed that an img tag will be used, I'd call this one prefer
(or preferPlatformView
for more specificity). If we call this prefer
, then whenNecessary
could be called avoid
. Essentially the full scale of options could be: never
(fails on cross-origin images), avoid
, prefer
, always
(fails if headers are not empty).
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.
I agree with prefer
or something similar. But I'm not sure about avoid
. It seems a little ambiguous and could be interpreted as never
. I prefer fallback
.
Another option is whenNecessary
(only use img when necessary) and whenPossible
(use img whenever possible). But I don't like the extra verbosity.
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.
Regardless of the name, I think we should print a warning when headers
is present but we can't fetch image bytes. Let's make it easier for users to know why their images are not showing up.
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.
Agreed, fallback
sounds better.
/// | ||
/// This option is only effective on the Web platform. Other platforms always | ||
/// display network images by fetching bytes. | ||
enum WebImgElementStrategy { |
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.
img
is a bit of a implementation detail that could theoretically change. For example, we could switch to <picture>
, SVG, or tainted 2D canvas for rendering CORS images. I'd therefore avoid putting "Img" in the name of the enum.
How about we call it just SameOriginStrategy
?
/// Defaults to [WebImgElementStrategy.never]. | ||
/// | ||
/// Has no effect on other platforms, which always fetch bytes. | ||
WebImgElementStrategy get useImgElement; |
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.
useImageElement
sounds like a boolean property. I'd call it *Strategy
, e.g. sameOriginStrategy
(especially if we rename the enum to SameOriginStrategy
.
/// | ||
/// This strategy still fetches bytes if `header` is not empty, since <img> | ||
/// elements do not support headers. | ||
always, |
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.
I agree with prefer
or something similar. But I'm not sure about avoid
. It seems a little ambiguous and could be interpreted as never
. I prefer fallback
.
Another option is whenNecessary
(only use img when necessary) and whenPossible
(use img whenever possible). But I don't like the extra verbosity.
/// | ||
/// This strategy still fetches bytes if `header` is not empty, since <img> | ||
/// elements do not support headers. | ||
always, |
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.
Regardless of the name, I think we should print a warning when headers
is present but we can't fetch image bytes. Let's make it easier for users to know why their images are not showing up.
I've addressed all the other comments, and what remains is naming. I'm summarizing the current options as follows: If we use enum SameOriginStrategy {
neverUsePlatformView,
fallbackToPlatformView,
preferPlatformView,
} If we want to have simpler names, then I think the "platform view" part should be part of the type name, which is something like: enum WebPlatformViewStrategy {
never,
fallback,
prefer,
} (I prefer "never" over "avoid" because "avoid" sounds like there are unavoidable cases that still use platform views.) |
@dkwingsmt I like both suggestions and I don't have a preference. But given that platform views are the main concern leading to this PR, I would say let's go with the name that mentions platform views? |
@dkwingsmt @mdebbar
|
That's a good point. What do you think if we use "HTML Element" as the name? No matter whether we use platform views or not, or whatever tags, we're using an HTML element to work around the CORS restriction (if I understand correctly).
|
@dkwingsmt definitely better. |
781a3c8
to
6bcb0a6
Compare
auto label is removed for flutter/flutter/159917, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…ent to display images (flutter/flutter#159917)
…ent to display images (flutter/flutter#159917)
…ent to display images (flutter/flutter#159917)
…ent to display images (flutter/flutter#159917)
Roll Flutter from 72db8f6 to 40c2b86 (33 revisions) flutter/flutter@72db8f6...40c2b86 2025-01-14 christopherfujino@gmail.com update changelog for 3.27.2 release (flutter/flutter#161569) 2025-01-14 tessertaha@gmail.com Fix `showLicensePage` does not inherit ambient `Theme` (flutter/flutter#161599) 2025-01-14 30870216+gaaclarke@users.noreply.github.com Added special case for fat width arcs (flutter/flutter#161255) 2025-01-14 matanlurey@users.noreply.github.com Replace `fetch `with `gclient sync`. (flutter/flutter#161565) 2025-01-14 engine-flutter-autoroll@skia.org Roll Packages from 3c3bc68 to d1fd623 (4 revisions) (flutter/flutter#161597) 2025-01-14 robert.ancell@canonical.com Remove unused method (flutter/flutter#161572) 2025-01-14 hbatagelo@gmail.com Fix crash when closing a window with `Alt+F4` in multi-win Flutter on Windows (flutter/flutter#161375) 2025-01-14 bruno.leroux@gmail.com Update InputDecoration.border documentation (flutter/flutter#161415) 2025-01-14 dkwingsmt@users.noreply.github.com [Web] Allow specifying the strategy on when to use <img> element to display images (flutter/flutter#159917) 2025-01-14 a-siva@users.noreply.github.com Roll Dart to Version 3.7.0-323.0.dev (flutter/flutter#161567) 2025-01-14 goderbauer@google.com Use wildcards (flutter/flutter#161548) 2025-01-14 jmccandless@google.com Autocomplete Options Width (flutter/flutter#143249) 2025-01-13 jason-simmons@users.noreply.github.com Move the analyzer_benchmark to Mac arm64 devicelab bots (flutter/flutter#161405) 2025-01-13 matanlurey@users.noreply.github.com Remove references to `cirrus`, mostly in doc comments. (flutter/flutter#161529) 2025-01-13 flar@google.com Fix paths when running clang-tidy on git diffs (flutter/flutter#161496) 2025-01-13 yjbanov@google.com [web:a11y] treat empty tappables as buttons (flutter/flutter#161360) 2025-01-13 58190796+MitchellGoodwin@users.noreply.github.com Add route settings to CupertinoSheetRoute (flutter/flutter#161528) 2025-01-13 matanlurey@users.noreply.github.com Copy `linux_host_engine` as `linux_host_engine_test`, removing `archives: [...]`. (flutter/flutter#161532) 2025-01-13 matanlurey@users.noreply.github.com Remove last two references to Cirrus CI. (flutter/flutter#161530) 2025-01-13 codefu@google.com Mark `Mac_mokey microbenchmarks` as flakey (flutter/flutter#161550) 2025-01-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (#160241)" (flutter/flutter#161555) 2025-01-13 bkonyi@google.com Add validator execution times to `flutter doctor --verbose` (flutter/flutter#158124) 2025-01-13 matanlurey@users.noreply.github.com Explain more specifically how to use `flutter drive`/what it does (flutter/flutter#161450) 2025-01-13 dhankechakishan@gmail.com Fixed repeated strings for incompatible Gradle or AGP version in `create` command (flutter/flutter#161223) 2025-01-13 matanlurey@users.noreply.github.com Remove `WEB_SHARD_COUNT`, which no longer exists post-Cirrus. (flutter/flutter#161527) 2025-01-13 chinmaygarde@google.com [Impeller] Update guidance on prebuilt artifacts. (flutter/flutter#161251) 2025-01-13 flar@google.com Migrate DisplayList unit tests to DL/Impeller geometry classes (flutter/flutter#161453) 2025-01-13 jmccandless@google.com Context menu button callback docs clarification (flutter/flutter#161451) 2025-01-13 43089218+chika3742@users.noreply.github.com Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (flutter/flutter#160241) 2025-01-13 codefu@google.com Udpate documentation on the third_party directories (flutter/flutter#161407) 2025-01-13 matanlurey@users.noreply.github.com Propagate environment variables when `flutter drive` is invoked. (flutter/flutter#161452) 2025-01-13 34871572+gmackall@users.noreply.github.com Convert base application name handling to kotlin source (start of FGP kt conversion) (flutter/flutter#155963) 2025-01-13 jonahwilliams@google.com [Impeller] remove API 30 restriction for SurfaceControl testing. (flutter/flutter#161438) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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: ...
…isplay images (flutter#159917) This PR follows the discussion under flutter#157755 and adds a flag to determine when `<img>` elements are used. By default the feature is turned off. Instead of just a boolean for on & off, I made it an enum to accept multiple options. Notably, an `always` option can be useful when the developer wants a unified experience regardless of the image origin (such as when displaying an image from arbitrary URLs.) ## 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], including [Features we expect every widget to implement]. - [ ] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…ent to display images (flutter/flutter#159917)
…ent to display images (flutter/flutter#159917)
…ent to display images (flutter/flutter#159917)
…ent to display images (flutter/flutter#159917)
…ent to display images (flutter/flutter#159917)
Roll Flutter from 72db8f6 to 40c2b86 (33 revisions) flutter/flutter@72db8f6...40c2b86 2025-01-14 christopherfujino@gmail.com update changelog for 3.27.2 release (flutter/flutter#161569) 2025-01-14 tessertaha@gmail.com Fix `showLicensePage` does not inherit ambient `Theme` (flutter/flutter#161599) 2025-01-14 30870216+gaaclarke@users.noreply.github.com Added special case for fat width arcs (flutter/flutter#161255) 2025-01-14 matanlurey@users.noreply.github.com Replace `fetch `with `gclient sync`. (flutter/flutter#161565) 2025-01-14 engine-flutter-autoroll@skia.org Roll Packages from 3c3bc68 to d1fd623 (4 revisions) (flutter/flutter#161597) 2025-01-14 robert.ancell@canonical.com Remove unused method (flutter/flutter#161572) 2025-01-14 hbatagelo@gmail.com Fix crash when closing a window with `Alt+F4` in multi-win Flutter on Windows (flutter/flutter#161375) 2025-01-14 bruno.leroux@gmail.com Update InputDecoration.border documentation (flutter/flutter#161415) 2025-01-14 dkwingsmt@users.noreply.github.com [Web] Allow specifying the strategy on when to use <img> element to display images (flutter/flutter#159917) 2025-01-14 a-siva@users.noreply.github.com Roll Dart to Version 3.7.0-323.0.dev (flutter/flutter#161567) 2025-01-14 goderbauer@google.com Use wildcards (flutter/flutter#161548) 2025-01-14 jmccandless@google.com Autocomplete Options Width (flutter/flutter#143249) 2025-01-13 jason-simmons@users.noreply.github.com Move the analyzer_benchmark to Mac arm64 devicelab bots (flutter/flutter#161405) 2025-01-13 matanlurey@users.noreply.github.com Remove references to `cirrus`, mostly in doc comments. (flutter/flutter#161529) 2025-01-13 flar@google.com Fix paths when running clang-tidy on git diffs (flutter/flutter#161496) 2025-01-13 yjbanov@google.com [web:a11y] treat empty tappables as buttons (flutter/flutter#161360) 2025-01-13 58190796+MitchellGoodwin@users.noreply.github.com Add route settings to CupertinoSheetRoute (flutter/flutter#161528) 2025-01-13 matanlurey@users.noreply.github.com Copy `linux_host_engine` as `linux_host_engine_test`, removing `archives: [...]`. (flutter/flutter#161532) 2025-01-13 matanlurey@users.noreply.github.com Remove last two references to Cirrus CI. (flutter/flutter#161530) 2025-01-13 codefu@google.com Mark `Mac_mokey microbenchmarks` as flakey (flutter/flutter#161550) 2025-01-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (#160241)" (flutter/flutter#161555) 2025-01-13 bkonyi@google.com Add validator execution times to `flutter doctor --verbose` (flutter/flutter#158124) 2025-01-13 matanlurey@users.noreply.github.com Explain more specifically how to use `flutter drive`/what it does (flutter/flutter#161450) 2025-01-13 dhankechakishan@gmail.com Fixed repeated strings for incompatible Gradle or AGP version in `create` command (flutter/flutter#161223) 2025-01-13 matanlurey@users.noreply.github.com Remove `WEB_SHARD_COUNT`, which no longer exists post-Cirrus. (flutter/flutter#161527) 2025-01-13 chinmaygarde@google.com [Impeller] Update guidance on prebuilt artifacts. (flutter/flutter#161251) 2025-01-13 flar@google.com Migrate DisplayList unit tests to DL/Impeller geometry classes (flutter/flutter#161453) 2025-01-13 jmccandless@google.com Context menu button callback docs clarification (flutter/flutter#161451) 2025-01-13 43089218+chika3742@users.noreply.github.com Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (flutter/flutter#160241) 2025-01-13 codefu@google.com Udpate documentation on the third_party directories (flutter/flutter#161407) 2025-01-13 matanlurey@users.noreply.github.com Propagate environment variables when `flutter drive` is invoked. (flutter/flutter#161452) 2025-01-13 34871572+gmackall@users.noreply.github.com Convert base application name handling to kotlin source (start of FGP kt conversion) (flutter/flutter#155963) 2025-01-13 jonahwilliams@google.com [Impeller] remove API 30 restriction for SurfaceControl testing. (flutter/flutter#161438) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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: ...
Roll Flutter from 72db8f6 to 40c2b86 (33 revisions) flutter/flutter@72db8f6...40c2b86 2025-01-14 christopherfujino@gmail.com update changelog for 3.27.2 release (flutter/flutter#161569) 2025-01-14 tessertaha@gmail.com Fix `showLicensePage` does not inherit ambient `Theme` (flutter/flutter#161599) 2025-01-14 30870216+gaaclarke@users.noreply.github.com Added special case for fat width arcs (flutter/flutter#161255) 2025-01-14 matanlurey@users.noreply.github.com Replace `fetch `with `gclient sync`. (flutter/flutter#161565) 2025-01-14 engine-flutter-autoroll@skia.org Roll Packages from 3c3bc68 to d1fd623 (4 revisions) (flutter/flutter#161597) 2025-01-14 robert.ancell@canonical.com Remove unused method (flutter/flutter#161572) 2025-01-14 hbatagelo@gmail.com Fix crash when closing a window with `Alt+F4` in multi-win Flutter on Windows (flutter/flutter#161375) 2025-01-14 bruno.leroux@gmail.com Update InputDecoration.border documentation (flutter/flutter#161415) 2025-01-14 dkwingsmt@users.noreply.github.com [Web] Allow specifying the strategy on when to use <img> element to display images (flutter/flutter#159917) 2025-01-14 a-siva@users.noreply.github.com Roll Dart to Version 3.7.0-323.0.dev (flutter/flutter#161567) 2025-01-14 goderbauer@google.com Use wildcards (flutter/flutter#161548) 2025-01-14 jmccandless@google.com Autocomplete Options Width (flutter/flutter#143249) 2025-01-13 jason-simmons@users.noreply.github.com Move the analyzer_benchmark to Mac arm64 devicelab bots (flutter/flutter#161405) 2025-01-13 matanlurey@users.noreply.github.com Remove references to `cirrus`, mostly in doc comments. (flutter/flutter#161529) 2025-01-13 flar@google.com Fix paths when running clang-tidy on git diffs (flutter/flutter#161496) 2025-01-13 yjbanov@google.com [web:a11y] treat empty tappables as buttons (flutter/flutter#161360) 2025-01-13 58190796+MitchellGoodwin@users.noreply.github.com Add route settings to CupertinoSheetRoute (flutter/flutter#161528) 2025-01-13 matanlurey@users.noreply.github.com Copy `linux_host_engine` as `linux_host_engine_test`, removing `archives: [...]`. (flutter/flutter#161532) 2025-01-13 matanlurey@users.noreply.github.com Remove last two references to Cirrus CI. (flutter/flutter#161530) 2025-01-13 codefu@google.com Mark `Mac_mokey microbenchmarks` as flakey (flutter/flutter#161550) 2025-01-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (#160241)" (flutter/flutter#161555) 2025-01-13 bkonyi@google.com Add validator execution times to `flutter doctor --verbose` (flutter/flutter#158124) 2025-01-13 matanlurey@users.noreply.github.com Explain more specifically how to use `flutter drive`/what it does (flutter/flutter#161450) 2025-01-13 dhankechakishan@gmail.com Fixed repeated strings for incompatible Gradle or AGP version in `create` command (flutter/flutter#161223) 2025-01-13 matanlurey@users.noreply.github.com Remove `WEB_SHARD_COUNT`, which no longer exists post-Cirrus. (flutter/flutter#161527) 2025-01-13 chinmaygarde@google.com [Impeller] Update guidance on prebuilt artifacts. (flutter/flutter#161251) 2025-01-13 flar@google.com Migrate DisplayList unit tests to DL/Impeller geometry classes (flutter/flutter#161453) 2025-01-13 jmccandless@google.com Context menu button callback docs clarification (flutter/flutter#161451) 2025-01-13 43089218+chika3742@users.noreply.github.com Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (flutter/flutter#160241) 2025-01-13 codefu@google.com Udpate documentation on the third_party directories (flutter/flutter#161407) 2025-01-13 matanlurey@users.noreply.github.com Propagate environment variables when `flutter drive` is invoked. (flutter/flutter#161452) 2025-01-13 34871572+gmackall@users.noreply.github.com Convert base application name handling to kotlin source (start of FGP kt conversion) (flutter/flutter#155963) 2025-01-13 jonahwilliams@google.com [Impeller] remove API 30 restriction for SurfaceControl testing. (flutter/flutter#161438) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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: ...
This PR follows the discussion under #157755 and adds a flag to determine when
<img>
elements are used. By default the feature is turned off.Instead of just a boolean for on & off, I made it an enum to accept multiple options. Notably, an
always
option can be useful when the developer wants a unified experience regardless of the image origin (such as when displaying an image from arbitrary URLs.)Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.