AlexeyBarabash 3e69b6bdfb [cr134] [Android] Changes at ui::ViewAndroid class
Methods GetSizeDIPs()/GetSizeDevicePx() instead of GetSize()

	Related Chromium change
	https://source.chromium.org/chromium/chromium/src/+/4f2bc05e8d30de72c30d6dd34e55b50b4464661b

	Reland "Avoid pixel rounding errors by using device pixels directly"

	This reverts commit 2754d87ac5c787d866b53ef438aadd6ea5ef5619.

	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 a4951af7d99bc472b9577f85cc2002b9e213f4af.
	>
	> 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
2025-02-18 12:46:55 +00:00
2025-02-18 12:46:55 +00:00
2025-02-14 17:46:41 -07:00
2025-02-18 12:46:55 +00:00
2025-02-12 17:56:19 -07:00
2025-02-18 12:02:41 +00:00
2025-02-18 12:02:41 +00:00

Brave Core

Brave Core is a set of changes, APIs, and scripts used for customizing Chromium to make the Brave browser. Please also check https://github.com/brave/brave-browser

Follow @brave on Twitter for important announcements.

Resources

Community

You can ask questions and interact with the community in the following locations:

S
Description
No description provided
Readme MPL-2.0
3.8 GiB
Languages
C++ 36.9%
HTML 31.6%
Swift 9.4%
TypeScript 9%
Java 4.8%
Other 8.1%