summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/ZoomManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Delete the old WebView.Torne (Richard Coles)2013-10-151-1263/+0
| | | | | | | | | Delete all the Java classes used only by the old WebView implementation, and also sections of common classes that were only needed for the old WebView. Bug: 10427705 Change-Id: I02549a71104b35d86d99058c71f43e054730ec7d
* Fix DPI scaling on TVDPIJohn Reck2012-09-191-0/+13
| | | | | | | | | | Bug: 6891214 tvdpi has a density of 1.3312501 which we fail on as we assume you can take density and multiply by 100, cast to an int, and divide by 100f to get back to the original density. Force this assumption to be true by truncating density Change-Id: I0caeb7768ee002f935b41c77a5579ffeed491f82
* Make WebView track focal points more accuratelyAdam Powell2012-09-041-2/+2
| | | | Change-Id: I6683edee6933b1dd026453935d72119320ab3c81
* Fix logspamJohn Reck2012-06-051-4/+5
| | | | | | Bug: 6508832 Change-Id: I3061917ae7eba31723c006b1d30d20b7134890b8
* Invalidate on new picture if scale/content size changesChris Craik2012-05-151-1/+5
| | | | | bug:6497496 Change-Id: Id6de6f83f7bf8a9a4ebcfed61e6b3985d7f19efe
* Delete more navcache stuffJohn Reck2012-03-051-14/+0
| | | | Change-Id: Ic32559948b90abb3e8e755c5eb533dd9e83b3190
* Refactor WebView to be a thin proxy classJonathan Dixon2012-03-021-13/+13
| | | | | | | | | | | | | | | | Splits interface and implementation; all client calls are forwarded to an abstract WebViewProvider interface, and the existing implementation moved into the WebViewClassic implementor of this interface. Originally taken from a snapshot from the development branch, by: git diff HEAD 9a4c328a54cc05e5 | git apply - but then rebased to keep up to date with master Interdepends on webkit and Browser changes: https://android-git.corp.google.com/g/158979 https://android-git.corp.google.com/g/167911 Change-Id: I91403f32654ff308934e95c832d17b292a7d9b2e
* Fix regression in default zoom settingMangesh Ghiware2012-02-131-0/+1
| | | | | Bug: 6000309 Change-Id: I4255c847c0e7d2a5ab654014f6f4b5d32b5fdf67
* Use WebKit hit testing result for centering on double-tap zoom.Mangesh Ghiware2012-02-061-1/+1
| | | | | | | | | Iterate over the bounding boxes and find one large enough to fit the screen width at reading scale. Align to left edge of said box. Bug: 5175030 Bug: 5768421 Change-Id: Iac01e145336918b0a2b21d2864f46ba532aaf18f
* Update computation of reading level scale.Mangesh Ghiware2011-12-081-7/+11
| | | | | | | Fixes bug 5726043 (Extra double-tap needed to zoom out to overview mode on nytimes.com on a Stingray) Change-Id: I54dc303f4aa81ddc38c234228adc915b9f6749dc
* Fix updateDoubleTapZoom logicJohn Reck2011-12-011-5/+6
| | | | | | Bug: 5698099 Change-Id: I83578e57cf809cbe7781d988302f0925dfddec80
* Merge "WebView animation support" into ics-mr1Teng-Hui Zhu2011-11-291-0/+3
|\
| * WebView animation supportTeng-Hui Zhu2011-11-231-0/+3
| | | | | | | | | | | | | | Fix the jumping issue when double tapping bug:4982054 Change-Id: Ifb67030a3132fe3820a1fcc8ffc97a1ab474c223
* | Update Webkit with the zoom level after double tap gestureDerek Sollenberger2011-11-281-0/+5
|/ | | | | | | | | In the hardware accelerated case we were not updating webkit with the new zoom information. This was causing plugins to render at the old zoom level. bug: 5663981 Change-Id: I3cb18ad9ca4f185f384ea9fb68780f29160391ad
* Revert change to setInitialScale() to take display density into account.Mangesh Ghiware2011-11-161-1/+1
| | | | | | | | | | | Updated WebView documentation to clarify this behavior. Additionally, if target-densityDpi is specified in the meta viewport tag, update the display density in ZoomManager. Bug: 5477652 Bug: 5327492 Change-Id: I176e87489f76a2ee6595d76a006e302b07595de1
* Update fix to restore view and text wrap scales.Mangesh Ghiware2011-11-031-1/+1
| | | | | | | | | Fixes bug 5544556: All email content is wrapped prematurely. Previous change (I5a22dd20) didn't take a few other cases of mViewScale>0 into account. Change-Id: I4f9578f3558f026c472492ac07d19004416dc228
* Fix setInitialScale() to take display density into account.Mangesh Ghiware2011-11-011-11/+4
| | | | | | | | | | | | Reverted changes made to fix bug 4982074 (Book text display is limited to about half the available screen.) The Books app sets initial scale to 100%, and since display density for Crespo is 1.5, initial scale was actually being set to a smaller value in Device Independent Pixel units. The correct fix is to take display density into account. This fixes bug 5477652: webview scale factor wrong on prime in reddit app. Change-Id: Ie09172629add7fb28ca6b47d0fd8f6450c5df569
* Fix restore of view and text wrap scales.Mangesh Ghiware2011-10-271-3/+5
| | | | | | | | | | | | | Fixes bug 5507881: Open pages in overview doesn't stick on initial browser load. Update the fix for bug 5230909: Zoom not restored on Back. Added a boolean to indicate that scales have been restored. In the case of restored scales (view and text wrap) being zero, set them to overview and reading level respectively. Change-Id: I5a22dd2040a22ee3b48c5903b586a65a4fa320f2
* Fix issue# 5492404: Reading level check thread error.Mangesh Ghiware2011-10-211-5/+9
| | | | | | | | Remove access to WebSettings from getReadingLevelScale() by saving the double-tap zoom scale factor in ZoomManager. WebSettings can only be accessed in the UI thread. Change-Id: Ic7289bf3c14d800797f2e85546a088a9071e0468
* Fix null ptr exception in getReadingLevelScale()Mangesh Ghiware2011-10-181-1/+4
| | | | | | | Handle the case where WebView settings might be null. Bug: 5472493 Change-Id: I6b1c2e5e5e56a517910a330ae9d40a4adc99d75a
* Add setting for configuring zoom level on double-tap.Mangesh Ghiware2011-10-121-7/+17
| | | | | | | | | | | In overview mode, text wrap is done at reading level scale. If user changes double-tap zoom in overview mode, reflow text at the new scale. In any other mode, a double-tap will take user to overview mode, at which point, the text will be reflowed at the updated reading level scale. Bug: 5312461 Change-Id: I29be34a32246019101a9a875e1758e22b5af2bd3
* Use overview scale when restored scale is 0.Mangesh Ghiware2011-09-211-6/+0
| | | | | | | | | If restored scale and text wrap scale are set to 0 (meaning the previous scale wasn't saved), set them to overview and reading level scale respectively. Bug: 5230909 Change-Id: If7724e9a0cd948c88d0a001728266a3282083bdc
* On zoom to overview, reflow text, if necessary.Mangesh Ghiware2011-09-091-0/+5
| | | | | | | | | | Reset the text wrap scale to the correct value (i.e., reading level scale) on zoom to overview. This addresses the scenario where text is wrapped at a larger scale following a pinch zoom and double tap to reflow. Bug: 5254253 Change-Id: I57f706ef4254dd3f194cc35f109dd48b61b72f73
* Set reading level scale to display density instead of a fixed minimum.Mangesh Ghiware2011-09-011-19/+22
| | | | | | | | | | On a double tap, zoom to either reading level scale or 0.5f more than current (overview) scale, whichever is greater. This addresses the scenario for large screen devices where overview and reading level scale are the same. Bug: 5165527 Change-Id: I50216d60f98b2904f06742336b9c8c7c512328a6
* b/5080166 Enalbe multi-touch on external touch escreen.Huahui Wu2011-07-261-3/+7
| | | | Change-Id: I49d44528283a6b47a4caa95bec3c1837f500b004
* b/4070489 Jumpy motion when switching fingers during zoom gesture.Huahui Wu2011-07-211-0/+2
| | | | Change-Id: Ia7845cef5e58b4922e4475e48085b7b95e15bea2
* Set mActualScale when initialScale is set.Shimeng (Simon) Wang2011-07-111-0/+2
| | | | | | | This sets mActualScale to be correct value if initialScale is set. issue: 4982074 Change-Id: I69d12d185710e89fc91a3a6bdf566c7092f059b7
* Merge "Prevent set mInitialScale being overridden by mDefaultScale."Shimeng (Simon) Wang2011-07-081-2/+3
|\
| * Prevent set mInitialScale being overridden by mDefaultScale.Shimeng (Simon) Wang2011-07-081-2/+3
| | | | | | | | | | | | | | | | | | | | If mInitialScale is set, use it as the default scale; otherwise, it'll be overridden by default density in case of book app where mobile fixed viewport is used; since today the default scale is used to calculate the mobile fixed viewport. issue: 4982074 Change-Id: I21c2bf41478bb97351cb3fb1cc3735ab7d75e164
* | Treat restored defaultScale as overview.Shimeng (Simon) Wang2011-07-061-0/+6
|/ | | | | | | Since usually restored defaultScale means previous scale is not saved. issue: 4975315 Change-Id: Icc34469d0459fb5254567fe9f3cc5032b6349405
* Merge "Keep initial zoom overview for non-standard load."Shimeng (Simon) Wang2011-06-301-0/+5
|\
| * Keep initial zoom overview for non-standard load.Shimeng (Simon) Wang2011-06-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | In case of non-standard load such as reload, currently the ZoomManager's onFirstLayout will not be triggered, hence initial zoom overview will not be set. This change provides a fix to set initial zoom overview in case of non-standard load for the new picture after first layout. issue: 4975315 Change-Id: If2ba3e472f2bb7b6fc4c52024d18a66dc1e41a23
* | Initial zoom overview flag only meaningful in page overview mode.Shimeng (Simon) Wang2011-06-291-1/+2
|/ | | | Change-Id: I206864678e61777276468718a78e3da8de4f06a7
* Fix reflow for mobile sites.Shimeng (Simon) Wang2011-06-101-9/+8
| | | | | | | | | | | 1. use correct mDefaultScale instead of 1.0f. 2. ignore mMinZoomScaleFixed in case of using wide viewport since sometimes mobile site will impose a min scale while the web content will make it bigger than overview scale. issue: 4257815 Change-Id: Ib4ca9b4dab8585827081a32432076eeeaedecd38
* Better handle double tap for smooth reflow and zoom.Shimeng (Simon) Wang2011-06-091-1/+10
| | | | | | | | | | | | In case it's the first time to reflow or the page is in zoom overview mode, let the reflow and zoom happen at the same time to avoid the need of double tapping twice. Also fix the viewport width to webview's original width for mobile site. issue: 4482888 Change-Id: Ic7c73a9eb3f75fd68322f7f4da14141126e75ad8
* Make sure scale will not go beyond overview scale after rotation.Shimeng (Simon) Wang2011-06-021-2/+3
| | | | Change-Id: If8f7fe131814102e6abf5c8d59888d17a7200003
* Fix overview scale setting for mobile sites.Shimeng (Simon) Wang2011-06-011-6/+10
| | | | | | | | | | | This fix will only set the overview scale in case the screen is rotated from landscape to protrait, since in this case the overview scale will be smaller and need explicit setting. For the other way around, there's no need to set and it has wrong effect for mobile sites. issue: 4343683 Change-Id: I92cbf848bc2ed4184bd0c6b67992ff5cbc633c9f
* Fix zoom overview width and postscale for non-wide-viewport mode.Shimeng (Simon) Wang2011-05-261-4/+7
| | | | | issue: 4396010 Change-Id: I90aefac9fdf53834c0774d5c1b37693413798689
* Simplify viewport logic in webviewcore and zoom-manager.Shimeng (Simon) Wang2011-05-241-11/+3
| | | | | | | | | As using wide viewport implies fixed viewport. Also fixed an issue for mobile page viewport calculation. issue: 4343683 Change-Id: I669618f8522377ff97317bb1b78700ad40e51bb3
* Prevent intermediate scale updates from being sent to WebKit while zooming.Derek Sollenberger2011-03-181-1/+1
| | | | | | | | | | The addition of the HW accelerated logic causes us to manipulate the zoom scale factor in the zoom manager two additional times. These manipulations occur after the mZoomScale has been set to zero is how we previously tested to see if a fixed length animation was occuring. bug: 3451126 Change-Id: If2992adbe36fa471bb1bb5013495e1adc74b5fab
* Fix bug 4083825 - Gesture zoom locked along content edges under someAdam Powell2011-03-111-2/+12
| | | | | | | | | circumstances Tune the procedure used to handle "zoom slop" during a webview pan+zoom gesture. Change-Id: Ia706722ba6a46e64cce8814d4668e3857b16e562
* b/4080388 Improving the performance of ZoomManagerHuahui Wu2011-03-101-18/+46
| | | | | | | | This is a re-factor of cl b/3307761. It uses an circular array to implement the queue instead of linked list. And it saves the time to convert float to Float. Change-Id: I1076aabec2310b2cc299d7f485bf9c4710107045
* Don't limit zoom scale change by the minimum increment.Shimeng (Simon) Wang2011-03-091-1/+1
| | | | | issue: 4080125 Change-Id: I3fa258e12e7aa44c7286c9dccb1f249d5ae78a12
* Merge "b/4075349 Make the pinch to zoom more responsive after limits." into ↵Huahui Wu2011-03-091-14/+29
|\ | | | | | | honeycomb-mr1
| * b/4075349 Make the pinch to zoom more responsive after limits.Huahui Wu2011-03-091-14/+29
| | | | | | | | Change-Id: I66ea0aa95ff6a471b7c2ae2cb1ce2fdd0f18ce01
* | Merge "Consider mInitialScale when setting min zoom scale." into honeycomb-mr1Shimeng (Simon) Wang2011-03-091-2/+3
|\ \ | |/ |/|
| * Consider mInitialScale when setting min zoom scale.Shimeng (Simon) Wang2011-03-081-2/+3
| | | | | | | | | | | | | | This fixes CTS test failure. issue: 4056256 Change-Id: Iee4adba2e462f5e0e79cf359e5b6a1531eafcdd8
* | b/3307761 Tuning two fingers pan.Huahui Wu2011-03-081-1/+49
|/ | | | | | | | | User reports jumpy when trying two fingers pan. This change keeps track of the previous movements of the fingers' middle point, compares to the change of the fingers' distance, and decides to pan or zoom or do both. Change-Id: I8a6a8e9259db85b0e820b6e25ba0822ed289fb45
* Shorten the animation length to make it snappier.Shimeng (Simon) Wang2011-03-031-1/+1
| | | | | | | This is double tap zoom animation. issue: 3509451 Change-Id: Ibc09eb95f3e1aa6874e8182f811829ce3da7179d
* Adjust actual scale when zoom density changes.Shimeng (Simon) Wang2011-03-021-3/+11
| | | | | | | | | | | | Also some fine tuning of zoom scales. 1. Since overview scale will be used to determine min zoom scale, its own computation shall be free of min zoom scale. 2. make sure mMaxZoomScale is at lease mMinZoomScale. 3. Use default scale in case of non-overview mode, since it reflects the current zoom density. issue: 3494868 Change-Id: I4297878b820e437b706bb7e0f143336ff1b39f82