0
Files
src/android_webview
Chris Harrelson 4f2bc05e8d Reland "Avoid pixel rounding errors by using device pixels directly"
This reverts commit 2754d87ac5.

Reason for revert: fixed TabsTest#testNewTabSetsContentViewSize, AndroidScrollIntegrationTest#testPageDown

Diff from original land to fix tests:
https://chromium-review.googlesource.com/c/chromium/src/+/6169396/4..5

Original change's description:
> Revert "Avoid pixel rounding errors by using device pixels directly"
>
> This reverts commit a4951af7d9.
>
> Reason for revert: Potential culprit for failures on Android. See b/389752076.
>
> Original change's description:
> > Avoid pixel rounding errors by using device pixels directly
> >
> > Previously we were (on Android) dividing device pixels by devicePixelRatio and rounding off to integers to get a size in DIPs, then when sending the size to Blink, it was multiplied again by devicePixelRatio and rounded to integers again. This can lead to rounding errors, which are avoided by not dividing in the first place.
> >
> > This fixes an issue on Android, because ViewAndroid receives its
> > sizing in device pixels. On other platforms the sizing is received in
> > DIPs; to the extent this bug is on those platforms other OS APIs reporting device pixels could be integrated in the future.
> >
> > The PR includes one more test, but there are many tests that exercise
> > the various parts of code changed in this CL already (discovered because earlier patchsets failed them before the code was fixed).
> >
> > Bug: 40234130
> >
> > Change-Id: Ie5bc209b5c4e2c88bf024c32022a562eeaf05cf0
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6142555
> > Reviewed-by: Tom Sepez <tsepez@chromium.org>
> > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
> > Reviewed-by: Bo Liu <boliu@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1405652}
>
> Bug: 40234130
> Change-Id: I29227280eb3e99e4cfbcfbb7364f90bcd74978f7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6173616
> Reviewed-by: Yue Zhang <yuezhanggg@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Yue Zhang <yuezhanggg@chromium.org>
> Commit-Queue: Yue Zhang <yuezhanggg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1405760}

Bug: 40234130, 389752076
Change-Id: Ibaa09fb6ba469c9c22ae26819d2ed59c224a8f9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6169396
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1407977}
2025-01-17 09:13:46 -08:00
..
2025-01-14 17:14:35 -08:00

Android WebView

Android WebView is an Android system component for displaying web content. WebView (and the related Android classes) are implemented by the code in the //android_webview/ folder.

This directory contains the Android WebView implementation, as well as the implementation for the AndroidX Webkit support library.

Overview for Chromium team members and contributors

Please see WebView Architecture.

Want to use WebView in an Android app?

Please consult our API documentation and app development guides:

Want to build and install WebView on a device?

See our Chromium developer documentation.

Public mailing lists