-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[webview_flutter] Add android webSettings.setTextZoom
api
#3298
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
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
WebViewSettings.setTextZoom
api
WebViewSettings.setTextZoom
apiWebViewSettings.setTextZoom
api
WebViewSettings.setTextZoom
apiwebSettings.setTextZoom
api
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 looks mostly good. I added a few comments. Thanks for the contribution!
packages/webview_flutter/webview_flutter_android/lib/src/android_webview.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_android/lib/src/android_webview.dart
Outdated
Show resolved
Hide resolved
Co-authored-by: Maurice Parrish <[email protected]>
Co-authored-by: Maurice Parrish <[email protected]>
Co-authored-by: Maurice Parrish <[email protected]>
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 also missing native unit tests. You should be able to put it in: https://github.com/flutter/packages/blob/main/packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/WebSettingsTest.java
|
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.
Just one last comment. Everything else looks good.
LGTM
packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart
Outdated
Show resolved
Hide resolved
Looks like you will also need to bump the version another time. cc @stuartmorgan For a quick secondary review. |
Bumped the version with : 5b3b2e8 |
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
auto label is removed for flutter/packages, pr: 3298, Failed to merge pr#: 3298 with Pull request could not be merged: Pull Request is not mergeable. |
auto label is removed for flutter/packages, pr: 3298, due to - The status or check suite android-platform_tests CHANNEL:master PACKAGE_SHARDING:--shardIndex 0 --shardCount 7 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Looks like this interacts badly with the PR to enable warnings as errors. Sorry about, you'll need to re-run Pigeon generation for this PR now that we're using a new version of Pigeon. |
I see. Re-ran pigeon with ca8e5ae |
This PR exposes
setTextZoom(int textZoom)
api as a platform method that provides control over webview font scaling.Default android webview behavior is to comply with system settings (Settings > Accessibility > Font Size) and it could lead to unintended formatting problems such as overlapping text and components depending on the font size configuration.
setTextZoom()
helps to mitigate such issue by enforcing a fixed scaling factor.Fixes flutter/flutter#121455
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to 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.