diff --git a/build/patches/Android-Pixel-Perfect-Mode.patch b/build/patches/Android-Pixel-Perfect-Mode.patch index 971013be..efd8f9b1 100644 --- a/build/patches/Android-Pixel-Perfect-Mode.patch +++ b/build/patches/Android-Pixel-Perfect-Mode.patch @@ -10,6 +10,7 @@ This version contains points of interest marked in the code, which will be remov License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- + android_webview/browser/aw_contents.cc | 2 +- cc/input/input_handler.cc | 2 +- cc/input/scrollbar_controller.cc | 2 +- cc/layers/viewport.cc | 4 +- @@ -66,6 +67,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../browser/webcontents/WebContentsImpl.java | 6 +-- .../content_public/browser/WebContents.java | 2 +- content/public/common/content_features.cc | 4 ++ + .../browser/test/mock/MockWebContents.java | 2 +- .../about_flags_cc/Pixel-perfect-mode.inc | 7 +++ .../Pixel-perfect-mode.inc | 1 + .../content_features_h/Pixel-perfect-mode.inc | 1 + @@ -107,13 +109,25 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ui/display/mojom/screen_info_mojom_traits.h | 4 ++ ui/display/screen_info.h | 1 + ui/events/blink/blink_event_util.cc | 2 +- - 97 files changed, 526 insertions(+), 138 deletions(-) + 99 files changed, 528 insertions(+), 140 deletions(-) create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/sPixelPerfect.java create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Pixel-perfect-mode.grdp create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Pixel-perfect-mode.inc create mode 100644 cromite_flags/content/public/common/content_features_cc/Pixel-perfect-mode.inc create mode 100644 cromite_flags/content/public/common/content_features_h/Pixel-perfect-mode.inc +diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw_contents.cc +--- a/android_webview/browser/aw_contents.cc ++++ b/android_webview/browser/aw_contents.cc +@@ -1039,7 +1039,7 @@ void AwContents::OnSizeChanged(JNIEnv* env, int w, int h, int ow, int oh) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + gfx::Size size(w, h); + web_contents_->GetNativeView()->OnPhysicalBackingSizeChanged(size); +- web_contents_->GetNativeView()->OnSizeChanged(w, h); ++ web_contents_->GetNativeView()->OnSizeChanged(w, h, w, h); + browser_view_renderer_.OnSizeChanged(w, h); + AwBrowserProcess::GetInstance() + ->visibility_metrics_logger() diff --git a/cc/input/input_handler.cc b/cc/input/input_handler.cc --- a/cc/input/input_handler.cc +++ b/cc/input/input_handler.cc @@ -1312,6 +1326,18 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c // All features in alphabetical order. // Kill switch to guard additional security checks performed by the browser +diff --git a/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java b/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java +--- a/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java ++++ b/content/public/test/android/javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java +@@ -338,7 +338,7 @@ public class MockWebContents implements WebContents, WebContentsObserver.Observa + public void setHasPersistentVideo(boolean value) {} + + @Override +- public void setSize(int width, int height) {} ++ public void setSize(int width, int height, int offset) {} + + @Override + public int getWidth() { diff --git a/cromite_flags/chrome/browser/about_flags_cc/Pixel-perfect-mode.inc b/cromite_flags/chrome/browser/about_flags_cc/Pixel-perfect-mode.inc new file mode 100644 --- /dev/null