-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[webview_flutter] Add setMixedContentMode for Android #9586
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
base: main
Are you sure you want to change the base?
[webview_flutter] Add setMixedContentMode for Android #9586
Conversation
This commit introduces a new Android-specific API `setMixedContentMode` to the `webview_flutter` plugin. This allows developers to control how the WebView handles mixed content (HTTP content on an HTTPS page). Fixes flutter/flutter#43595
This was an experiment in using Jules on flutter/packages, and in particular seeing what it would make of a plugin using ProxyApi. The initial commit is what it created, then the rest was me making it work to see what it got right and wrong. Since figuring that out was most of the work of making a full PR, we may as well land it. Some notes on the Jules aspect for our future experiments:
I didn't expect it to handle proxy API plugins very well at all, so in some respects it exceeded expectations. I think it was probably a net negative in time spent, but only barely, and with better prompting might do better. It is interesting that other than test it made changes to basically all the right files, in the right places, and did a reasonable job at wiring it all up. That suggests that someone using it who was completely new to the plugin might well find it useful as a starting point. |
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
@@ -866,6 +879,35 @@ enum FileSelectorMode { | |||
save, | |||
} | |||
|
|||
/// Mode for controlling mixed content handling. | |||
/// See [AndroidWebViewController.setMixedContentMode]. |
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.
nit:
/// See [AndroidWebViewController.setMixedContentMode]. | |
/// See [AndroidWebViewController.setMixedContentMode]. |
Adds an Android-level method to control the mixed content mode.
Fixes flutter/flutter#43595
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3