This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[webview_flutter_android] Fixes bug where a AndroidNavigationDelegate was required to load a request#6872
Merged
auto-submit[bot] merged 5 commits intoflutter:mainfrom Dec 21, 2022
Conversation
AndroidNavigationDelegate was required to load a request
stuartmorgan-g
approved these changes
Dec 21, 2022
| public static class WebViewPlatformView extends WebView implements PlatformView { | ||
| private WebViewClient currentWebViewClient; | ||
| private WebChromeClientImpl currentWebChromeClient; | ||
| private WebChromeClientHostApiImpl.SecureWebChromeClient currentWebChromeClient; |
Contributor
There was a problem hiding this comment.
Couldn't the type here just be WebChromeClient since it's only being accessed via overridden methods?
Contributor
Author
There was a problem hiding this comment.
This could be set to WebChromeClient, but then the overridden methods would have to cast this value.
| implements PlatformView { | ||
| private WebViewClient currentWebViewClient; | ||
| private WebChromeClientImpl currentWebChromeClient; | ||
| private WebChromeClientHostApiImpl.SecureWebChromeClient currentWebChromeClient; |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 22, 2022
…ionDelegate` was required to load a request (flutter/plugins#6872)
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Dec 22, 2022
* c61ac23fc [webview_flutter_wkwebview] Adds support for `WKNavigationAction.navigationType` (flutter/plugins#6863) * 15cfe8aa2 [webview_flutter_android] Adds support for selecting Hybrid Composition (flutter/plugins#6864) * 2dd85ec81 [webview_flutter_android] Fixes bug where a `AndroidNavigationDelegate` was required to load a request (flutter/plugins#6872)
loic-sharma
pushed a commit
to fluttergithubbot/flutter
that referenced
this pull request
Jan 6, 2023
…#117535) * c61ac23fc [webview_flutter_wkwebview] Adds support for `WKNavigationAction.navigationType` (flutter/plugins#6863) * 15cfe8aa2 [webview_flutter_android] Adds support for selecting Hybrid Composition (flutter/plugins#6864) * 2dd85ec81 [webview_flutter_android] Fixes bug where a `AndroidNavigationDelegate` was required to load a request (flutter/plugins#6872)
gspencergoog
pushed a commit
to gspencergoog/flutter
that referenced
this pull request
Jan 19, 2023
…#117535) * c61ac23fc [webview_flutter_wkwebview] Adds support for `WKNavigationAction.navigationType` (flutter/plugins#6863) * 15cfe8aa2 [webview_flutter_android] Adds support for selecting Hybrid Composition (flutter/plugins#6864) * 2dd85ec81 [webview_flutter_android] Fixes bug where a `AndroidNavigationDelegate` was required to load a request (flutter/plugins#6872)
mauricioluz
pushed a commit
to mauricioluz/plugins
that referenced
this pull request
Jan 26, 2023
…e` was required to load a request (flutter#6872) * fix bug * comment * another test * fix spelling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default
WebChromeClientwas being set toWebChromeClientImplwhich would attempt to communicate with Dart in theonProgressChangedcallback (viaWebChromeClientFlutterApi).This moves the logic that ensures only secure url can attempt to open a window out of
WebChromeClientImpland into its own class (SecureWebChromeClient). The defaultWebView.webChromeClientis then set toSecureWebChromeClientwhich doesn't attempt to communicate with Dart.Fixes flutter/flutter#117333
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.