When enlarge web page, it is enlarged starting from the right side of the screen.It is different the Android M.
Reported by
xbco...@gmail.com,
May 26 2017
|
|||||
Issue descriptionSteps to reproduce the problem: 1. We have create a browser app that use the chromium; 2. Start up the Browser; 3. Display the expandable site(https://www.yahoo.co.jp/); 4. Then use webview.zoomIn() to enlarge the display size. What is the expected behavior? After step 4, Enlarging starting from the center of the screen. What went wrong? After step 4, It is enlarging starting from the right side of the screen. Did this work before? N/A Chrome version: 58.0.3029.82 Channel: beta OS Version: 7.1 Flash Version: 1. In M, it was enlarging starting from the center of the screen. From the user's view, the operation of M is better. 2. In the case of a pinch operation, it was enlarged starting from the space between two fingers (as expected). 3. We updated the version of WebView to 57.0.2987.132, but the behavior has not changed.It is not difference of OS (M and N), it is estimated as difference of operation by WebView version. 4. Using N, we tried the following three patterns of WebView implementation, but the problems are reproduced in either case. ・Chrome Beta :58.0.3029.82 ・Chrome Dev :59.0.3031.25 ・Chrome Canary:60.0.3082.0 5. Used the following WebView API It used this method: =========================== webview.zoomIn(); =========================== I checked the webview code and found it: In chromium/WebViewChromium.java: ================================ public boolean zoomIn() { mFactory.startYourEngines(true); if (checkNeedsPost()) { boolean ret = runOnUiThreadBlocking(new Callable<Boolean>() { @Override public Boolean call() { return zoomIn(); } }); return ret; } return mAwContents.zoomIn(); } =============================== In chromium/android_webview/AwContents.java: =============================== public boolean zoomIn() { if (!canZoomIn()) { return false; } return zoomBy(1.25f); } ... ... public boolean zoomBy(float delta) { if (isDestroyed()) return false; if (delta < 0.01f || delta > 100.0f) { throw new IllegalStateException("zoom delta value outside [0.01, 100] range."); } return mContentViewCore.pinchByDelta(delta); } ================================================= In chromium/content/browser/ContentViewCore.java: ================================================= public boolean pinchByDelta(float delta) { if (mNativeContentViewCore == 0) return false; long timeMs = SystemClock.uptimeMillis(); int xPix = getViewportWidthPix() / 2; int yPix = getViewportHeightPix() / 2; nativePinchBegin(mNativeContentViewCore, timeMs, xPix, yPix); nativePinchBy(mNativeContentViewCore, timeMs, xPix, yPix, delta); nativePinchEnd(mNativeContentViewCore, timeMs); return true; } =================================================
,
May 26 2017
Please provide link to your app.
,
Jun 22 2017
Please check the attachment:WebviewDemo.apk,thanks
,
Jun 22 2017
Thank you for providing more feedback. Adding requester "aluo@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 19 2017
xbcofdj@ I tried your app, but it doesn't do any zooming. I can't install on Android M either for comparison. Let me know if I'm using the app wrong, or if there's a bug that needs to be fixed.
,
Sep 13 2017
Effort from the triage Team: There is no active investigation / updates since the last couple months,closing the issue. Feel free to reopen if needed. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by rsgav...@chromium.org
, May 26 2017