[developer preview] Screen Zoom setting are not reflected to contents of the WebView app (targetSDKVersion=24)
Reported by
cddd.dcm@gmail.com,
Jun 17 2016
|
||||||||||||||||
Issue descriptionExample URL: Steps to reproduce the problem: Preconditions: - Android N Developer Preview 4 / Nexus5x(bullhead/NPD56N) - Android System WebView (51.0.2704.90 / pre-installed) - WebView app (targetSDKVersion=24) Test Procedure: 1. launch WebView app 2. change Display Size (Screen Zoom) value. (WebView app is not killed) 3. return WebView app 4. kill WebView app from Recent Apps menu 5. relaunch WebView app What is the expected behavior? Screen Zoom setting are reflected to contents of the WebView app at test procedure 3. What went wrong? Results: * Screen Zoom setting are NOT reflected to contents of the WebView app at test procedure 3. * Screen Zoom setting are reflected to contents of the WebView app at test procedure 5. Reproduction: 10/10 (100%) Attached Files: - Video: screenzoom_webview.mp4 - Sample apps and source code * WebViewSample.apk(targetSDKVersion=22) * WebViewSample24(targetSDKVersion=24) Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? N/A Chrome version: 51.0.2704.90 Channel: n/a OS Version: N Developer Preview 4 Flash Version: * NOTES - I was sent from AOSP Issue tracker (https://code.google.com/p/android/issues/detail?id=213270) - targetSDKVersion<24 app (WebViewSample.apk) is not replicable - This issue occurs in Chrome as well
,
Jun 17 2016
Issue 620926 has been merged into this issue.
,
Jun 17 2016
,
Jun 17 2016
You are correct that webview does not support dynamically adjusting the screen density. Only workaround is force restarting the whole app (ie restaring the underlying process)
,
Jun 17 2016
,
Jun 20 2016
I was able to repro this issue on latest android N preview build with M51/webview
,
Jun 22 2016
,
Jul 26 2016
,
Jul 26 2016
,
Jul 26 2016
,
Aug 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/164e1eecb22e6c1d5a004666bff8ca8d0b127e34 commit 164e1eecb22e6c1d5a004666bff8ca8d0b127e34 Author: timav <timav@chromium.org> Date: Wed Aug 17 21:45:34 2016 Remove dip scale dependency from ui::WindowAndroid Starting from Android N dip scale can be changed dynamically. In this CL we remove the dip scale impliciltly stored in WindowAndroid's |content_offset_| and use the scale at the time of calculations that involve the content offset. This is a prerequisite for https://codereview.chromium.org/2202123002/ BUG= 620929 Review-Url: https://codereview.chromium.org/2249243002 Cr-Commit-Position: refs/heads/master@{#412653} [modify] https://crrev.com/164e1eecb22e6c1d5a004666bff8ca8d0b127e34/content/browser/android/content_view_core_impl.cc [modify] https://crrev.com/164e1eecb22e6c1d5a004666bff8ca8d0b127e34/ui/android/view_android.cc [modify] https://crrev.com/164e1eecb22e6c1d5a004666bff8ca8d0b127e34/ui/android/window_android.h [modify] https://crrev.com/164e1eecb22e6c1d5a004666bff8ca8d0b127e34/ui/snapshot/snapshot_android.cc
,
Aug 30 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8521fda07ea8d04953d856873a6e08afb96701d2 commit 8521fda07ea8d04953d856873a6e08afb96701d2 Author: timav <timav@chromium.org> Date: Tue Aug 30 05:30:05 2016 Use WindowAndroid to get display metrics in ContentViewCore Since Chrome can do window reparenting, DisplayMetrics should be extracted from the Context that is associated with the window. In this CL we pass the context to RenderCoordinates that obtains the display density (device scale factor) and wheel scroll factor from it. BUG= 620929 Review-Url: https://codereview.chromium.org/2268103002 Cr-Commit-Position: refs/heads/master@{#415158} [modify] https://crrev.com/8521fda07ea8d04953d856873a6e08afb96701d2/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/8521fda07ea8d04953d856873a6e08afb96701d2/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java
,
Aug 31 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bffd0a001eca22ac472bbc0ca8c942b73dfbcff2 commit bffd0a001eca22ac472bbc0ca8c942b73dfbcff2 Author: timav <timav@chromium.org> Date: Wed Aug 31 18:34:28 2016 Reland: Move DIP scale away from AwContents This small refactoring removes device scale factor from AwContents cache and uses the value from ContentViewCore. The device scale factor in ContentViewCore is defined after ContentViewCore native initialization, therefore this CL also moves the device scale propagation until after that. This is a prerequisite for https://codereview.chromium.org/2300463002 BUG= 620929 > Committed: https://crrev.com/8d849fd2d39c9db747f4e8d89dcedfebb0273a97 > Cr-Commit-Position: refs/heads/master@{#415546} Reland after fix related to PopupTouchHandleDrawable. Review-Url: https://codereview.chromium.org/2288273003 Cr-Commit-Position: refs/heads/master@{#415690} [modify] https://crrev.com/bffd0a001eca22ac472bbc0ca8c942b73dfbcff2/android_webview/java/src/org/chromium/android_webview/AwContents.java
,
Sep 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1f49e889d08b4b9245579fbdc744f2590770f61b commit 1f49e889d08b4b9245579fbdc744f2590770f61b Author: timav <timav@chromium.org> Date: Mon Sep 19 21:45:00 2016 Remove velocities parameters from onFlingStartGesture() This is the part of preparation to DIP scale change processing. These parameters are converted from DIP to pixels but never used. BUG= 620929 Review-Url: https://codereview.chromium.org/2347373002 Cr-Commit-Position: refs/heads/master@{#419571} [modify] https://crrev.com/1f49e889d08b4b9245579fbdc744f2590770f61b/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java [modify] https://crrev.com/1f49e889d08b4b9245579fbdc744f2590770f61b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java [modify] https://crrev.com/1f49e889d08b4b9245579fbdc744f2590770f61b/chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java [modify] https://crrev.com/1f49e889d08b4b9245579fbdc744f2590770f61b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java [modify] https://crrev.com/1f49e889d08b4b9245579fbdc744f2590770f61b/content/browser/android/content_view_core_impl.cc [modify] https://crrev.com/1f49e889d08b4b9245579fbdc744f2590770f61b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/1f49e889d08b4b9245579fbdc744f2590770f61b/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java
,
Sep 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1bce7c3445dec41e42574f7c58af01793d706f37 commit 1bce7c3445dec41e42574f7c58af01793d706f37 Author: timav <timav@chromium.org> Date: Wed Sep 21 00:43:39 2016 Keep ContentViewCore selection rectangle in DIP ContentViewCore holds selection rectangle in physical pixels, thus making it indirectly dependent on DIP scale. This CL changes it to DIP and does the necessary conversions in Java layer. As a consequence the position of the paste popup dialog is also passed from native layer in DIP. BUG= 620929 Review-Url: https://codereview.chromium.org/2352143002 Cr-Commit-Position: refs/heads/master@{#419922} [modify] https://crrev.com/1bce7c3445dec41e42574f7c58af01793d706f37/content/browser/android/content_view_core_impl.cc [modify] https://crrev.com/1bce7c3445dec41e42574f7c58af01793d706f37/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
,
Sep 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d6ff51fbbf957bd3fea85fedc49f459a03a624fe commit d6ff51fbbf957bd3fea85fedc49f459a03a624fe Author: timav <timav@chromium.org> Date: Wed Sep 21 21:10:20 2016 Remove unused version of SelectBetweenCoordinates() In ContentViewCoreImpl there are two versions of the method SelectBetweenCoordinates(), one comes from native side and another from Java side. The Java version is apparently never used. BUG= 620929 Review-Url: https://codereview.chromium.org/2360013002 Cr-Commit-Position: refs/heads/master@{#420163} [modify] https://crrev.com/d6ff51fbbf957bd3fea85fedc49f459a03a624fe/content/browser/android/content_view_core_impl.cc [modify] https://crrev.com/d6ff51fbbf957bd3fea85fedc49f459a03a624fe/content/browser/android/content_view_core_impl.h [modify] https://crrev.com/d6ff51fbbf957bd3fea85fedc49f459a03a624fe/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
,
Sep 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/95096567989c7a4f1b96d31a1c45d5c2dc8f8abb commit 95096567989c7a4f1b96d31a1c45d5c2dc8f8abb Author: timav <timav@chromium.org> Date: Wed Sep 21 23:34:13 2016 Remove DIP scale from PopupTouchHandleDrawable Now the native part of PopupTouchHandleDrawable always operates in DIP coordinates. The Java part converts from pixels to DIP using the device scale factor which it obtains from ContentViewCore. BUG= 620929 Review-Url: https://codereview.chromium.org/2358893002 Cr-Commit-Position: refs/heads/master@{#420198} [modify] https://crrev.com/95096567989c7a4f1b96d31a1c45d5c2dc8f8abb/android_webview/java/src/org/chromium/android_webview/AwContents.java [modify] https://crrev.com/95096567989c7a4f1b96d31a1c45d5c2dc8f8abb/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java [modify] https://crrev.com/95096567989c7a4f1b96d31a1c45d5c2dc8f8abb/android_webview/native/popup_touch_handle_drawable.cc [modify] https://crrev.com/95096567989c7a4f1b96d31a1c45d5c2dc8f8abb/android_webview/native/popup_touch_handle_drawable.h
,
Sep 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eabef685a78017bbadd151e4e22cd7c25763070a commit eabef685a78017bbadd151e4e22cd7c25763070a Author: timav <timav@chromium.org> Date: Fri Sep 23 01:10:22 2016 Remove coordinates from GestureStateListener onSingleTap() We convert the coordinates from DIP to pixels and pass them to this method but no one seems to use them. This CL proposes to remove the coordinates altogether. BUG= 620929 Review-Url: https://codereview.chromium.org/2357413003 Cr-Commit-Position: refs/heads/master@{#420527} [modify] https://crrev.com/eabef685a78017bbadd151e4e22cd7c25763070a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java [modify] https://crrev.com/eabef685a78017bbadd151e4e22cd7c25763070a/content/browser/android/content_view_core_impl.cc [modify] https://crrev.com/eabef685a78017bbadd151e4e22cd7c25763070a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/eabef685a78017bbadd151e4e22cd7c25763070a/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java
,
Oct 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c4a49d706ecb5230be690ae4558368e170986eb2 commit c4a49d706ecb5230be690ae4558368e170986eb2 Author: timav <timav@chromium.org> Date: Sat Oct 15 02:35:41 2016 Moved FORCE_DEVICE_SCALE_FACTOR to DisplayAndroid On Java side the commend line switch --force-device_scale-factor used to be processed by RenderCoordinates (a part of ContentViewCore), move it from content/ fo ui/ layer. This is a prerequisite to https://codereview.chromium.org/2300463002 BUG= 620929 Review-Url: https://codereview.chromium.org/2414173002 Cr-Commit-Position: refs/heads/master@{#425539} [modify] https://crrev.com/c4a49d706ecb5230be690ae4558368e170986eb2/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/c4a49d706ecb5230be690ae4558368e170986eb2/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java [modify] https://crrev.com/c4a49d706ecb5230be690ae4558368e170986eb2/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java [modify] https://crrev.com/c4a49d706ecb5230be690ae4558368e170986eb2/ui/android/BUILD.gn [modify] https://crrev.com/c4a49d706ecb5230be690ae4558368e170986eb2/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java [add] https://crrev.com/c4a49d706ecb5230be690ae4558368e170986eb2/ui/android/java/src/org/chromium/ui/display/DisplaySwitches.java
,
Nov 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9483b39990200554ba76602455869962005ace0e commit 9483b39990200554ba76602455869962005ace0e Author: timav <timav@chromium.org> Date: Tue Nov 08 06:16:15 2016 Add observers for DIP scale change. Extended Java DisplayAndroidObserver interface to receive the DIP scale change notifications. Added two such observers: ContentViewCore and AwContents. Upon receiving the notification ContentViewCore now sets the DIP scale both on Java and native side. It happens 1. During initialization, 2. When ContentViewCore is attached to a window, either for the first time or due to reparenting, 3. Due to notification from observer. In cases (2) and (3) we force layout. BUG= 620929 Review-Url: https://codereview.chromium.org/2300463002 Cr-Commit-Position: refs/heads/master@{#430536} [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/android_webview/java/src/org/chromium/android_webview/AwContents.java [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/content/browser/android/content_view_core_impl.cc [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/content/browser/android/content_view_core_impl.h [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/content/browser/site_per_process_browsertest.cc [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java [modify] https://crrev.com/9483b39990200554ba76602455869962005ace0e/ui/android/java/src/org/chromium/ui/display/DisplayAndroid.java
,
Nov 22 2016
,
Nov 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2d5570dfe70975e2697eeced6402430316572f80 commit 2d5570dfe70975e2697eeced6402430316572f80 Author: timav <timav@chromium.org> Date: Tue Nov 29 17:44:13 2016 Update selection handle bitmaps in AW if DIP scale changes In android webview the selection handles are implemented in PopupTouchHandleDrawable.java In this CL we make this class an observer that listens to display changes and keep the current dip scale as a member instead of retrieving it from ContentViewCore. We cannot update the bitmaps by the DisplayAndroid signal (i.e. in onDIPScaleChanged()) because the resources are not yet updated at the moment. Instead, we update the bitmap in the subsequent onConfigurationChanged() that should follow the display change. To make sure that the configuration corresponds to the display change we check that the display density in resources is equal to the expected value. BUG= 620929 Review-Url: https://codereview.chromium.org/2515343004 Cr-Commit-Position: refs/heads/master@{#435025} [modify] https://crrev.com/2d5570dfe70975e2697eeced6402430316572f80/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java
,
Nov 30 2016
,
Nov 30 2016
,
Nov 30 2016
,
Dec 1 2016
,
Dec 2 2016
,
Dec 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4537fa801ee646b95ef496083e824e468978a374 commit 4537fa801ee646b95ef496083e824e468978a374 Author: timav <timav@chromium.org> Date: Mon Dec 12 06:46:54 2016 Emulate Android joystick scroll with synthetic mouse wheel event The JoystickScrollProvider Java class used to emulate a View scroll events and call ContentViewCore.scrollBy(), now it emulates the mouse wheel events directly, dropping the calculation of the current event position (it is set to (0,0)). This CL also removes JoystickScrollProvider dependency on ContentViewCore, it talks to its own native counterpart. BUG= 620929 , 650351 Review-Url: https://codereview.chromium.org/2548363007 Cr-Commit-Position: refs/heads/master@{#437826} [modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/BUILD.gn [modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/android/browser_jni_registrar.cc [add] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/android/joystick_scroll_provider.cc [add] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/android/joystick_scroll_provider.h [modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/BUILD.gn [modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/java/src/org/chromium/content/browser/ContentView.java [modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/java/src/org/chromium/content/browser/input/JoystickScrollProvider.java
,
Dec 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/06ad74dc6f599d3fbe163433a030da25a76c6506 commit 06ad74dc6f599d3fbe163433a030da25a76c6506 Author: timav <timav@chromium.org> Date: Tue Dec 20 22:56:11 2016 [SystemWebViewShell] Prevent activity recycling for DIP scale changes Modified AndroidManifest.xml to include "density" as one of the configuration changes to be processed by activity. With that flag the activity will not be recycled (onDestroy/onCreate) upon the density change, Android will call onCongifurationChanged() instead. BUG= 620929 Review-Url: https://codereview.chromium.org/2555963005 Cr-Commit-Position: refs/heads/master@{#439902} [modify] https://crrev.com/06ad74dc6f599d3fbe163433a030da25a76c6506/android_webview/tools/system_webview_shell/apk/AndroidManifest.xml
,
Jan 12 2017
Issue 636686 has been merged into this issue.
,
Sep 4 2017
The assigned owner "timav@chromium.org" is not able to receive e-mails, please re-triage. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 6 2017
cddd.dcm@ is this working now?
,
Sep 13 2017
cddd.dcm@ is working
,
Sep 14 2017
cddd.dcm@: please clarify your last comment. Did you mean "Chrome is now working correctly"?
,
Sep 19 2017
I have confirmed that this issue has been modified correctly
,
Sep 26 2017
assume fixed |
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by cddd.dcm@gmail.com
, Jun 17 20169.0 MB
9.0 MB Download