Lines Matching refs:scale

39  * length animation where the final zoom scale is known at startup.  This type of
40 * animation notifies webkit of the final scale BEFORE it animates. The animation
43 * (2) The second method is triggered by a multi-touch pinch and the new scale
45 * only notifies webkit of new scale AFTER the gesture is complete. The animation
47 * to the new scale in response to events related to the user's gesture.
61 * The scale factors that determine the upper and lower bounds for the
62 * default zoom scale.
67 // The default scale limits, which are dependent on the display density.
71 // The actual scale limits, which can be set through a webpage's viewport
82 * the overview scale is initialized to a default value. This flag is then
94 * scale.
109 * Similar to mZoomCenterX(Y), these track the focus point of the scale
135 // The scale factor that is used to determine the column width for text
139 * The default zoom scale is the scale factor used when the user triggers a
155 * The factor that is used to tweak the zoom scale on a double-tap,
161 * The scale factor that is used as the minimum increment when going from
166 // the current computed zoom scale and its inverse.
171 * The initial scale for the WebView. 0 means default. If initial scale is
172 * greater than 0, the WebView starts with this value as its initial scale.
203 * True if we have a touch panel capable of detecting smooth pan/scale at the same time
229 * Initialize both the default and actual zoom scale to the given density.
246 * Update the default zoom scale using the given density. It will also reset
248 * ensure that the actual scale falls within those boundaries.
264 // adjust the scale if it falls outside the new zoom bounds
276 // Keeps max zoom scale when zoom density changes.
282 // Keeps min zoom scale when zoom density changes.
318 * Returns the zoom scale used for reading text on a double-tap.
324 /* package */ final float computeReadingLevelScale(float scale) {
326 scale + MIN_DOUBLE_TAP_SCALE_INCREMENT);
362 public final float computeScaleWithLimits(float scale) {
363 if (scale < mMinZoomScale) {
364 scale = mMinZoomScale;
365 } else if (scale > mMaxZoomScale) {
366 scale = mMaxZoomScale;
368 return scale;
371 public final boolean isScaleOverLimits(float scale) {
372 return scale <= mMinZoomScale || scale >= mMaxZoomScale;
383 public boolean willScaleTriggerZoom(float scale) {
384 return exceedsMinScaleIncrement(scale, mActualScale);
420 * @return true if the new scale triggered an animation and false otherwise.
422 public boolean startZoomAnimation(float scale, boolean reflowText) {
428 // snap to reading level scale if it is close
429 if (!exceedsMinScaleIncrement(scale, getReadingLevelScale())) {
430 scale = getReadingLevelScale();
433 setZoomScale(scale, reflowText);
455 * to the desired scale which was specified in startZoomAnimation(...).
490 float scale = zoomScale * mInvInitialZoomScale;
491 int tx = Math.round(scale * (mInitialScrollX + mZoomCenterX) - mZoomCenterX);
495 int ty = Math.round(scale
520 canvas.scale(zoomScale, zoomScale);
545 public void setZoomScale(float scale, boolean reflowText) {
546 setZoomScale(scale, reflowText, false);
549 private void setZoomScale(float scale, boolean reflowText, boolean force) {
550 final boolean isScaleLessThanMinZoom = scale < mMinZoomScale;
551 scale = computeScaleWithLimits(scale);
557 mInZoomOverview = !exceedsMinScaleIncrement(scale, getZoomOverviewScale());
561 mTextWrapScale = scale;
564 if (scale != mActualScale || force) {
568 if (scale != mActualScale && !mPinchToZoomAnimating) {
569 mCallbackProxy.onScaleChanged(mActualScale, scale);
572 mActualScale = scale;
573 mInvActualScale = 1 / scale;
585 float ratio = scale * oldInvScale;
626 * A. If the current text wrap scale differs from newly calculated and the
630 * C. If the page is in overmode then change to the default scale.
757 * Notifies the caller that the ZoomManager is requesting that scale related
762 * @return true if scale related updates should not be sent to webkit and
853 float scale = detector.getScaleFactor() * mActualScale;
855 // if scale is limited by any reason, don't zoom but do ask
858 isScaleOverLimits(scale) || scale < getZoomOverviewScale();
860 // Prevent scaling beyond overview scale.
861 scale = Math.max(computeScaleWithLimits(scale), getZoomOverviewScale());
863 if (mPinchToZoomAnimating || willScaleTriggerZoom(scale)) {
865 // limit the scale change per step
866 if (scale > mActualScale) {
867 scale = Math.min(scale, mActualScale * 1.25f);
869 scale = Math.max(scale, mActualScale * 0.8f);
871 scale = computeScaleWithLimits(scale);
872 // if the scale change is too small, regard it as jitter and skip it.
873 if (Math.abs(scale - mActualScale) < MINIMUM_SCALE_WITHOUT_JITTER) {
877 setZoomScale(scale, false);
898 // new scale is almost minimum scale.
932 // update mMinZoomScale if the minimum zoom scale is not fixed
936 // scale to 1.0f. The proper minimum scale will be calculated when
954 // Additionally, only update the text wrap scale if the width changed.
987 // update the zoom buttons as the scale can be changed
1034 // Keep mobile site's text wrap scale unchanged. For mobile sites,
1035 // the text wrap scale is the same as zoom overview scale.
1052 // Make sure the actual scale is no less than zoom overview scale.
1132 float scale;
1134 scale = mInitialScale;
1136 scale = (viewState.mViewScale > 0)
1141 scale = overviewScale;
1144 scale = Math.max(mDefaultScale, scale);
1148 // When first layout, reflow using the reading level scale to avoid
1156 // Override the scale only in case of fixed viewport.
1157 scale = Math.max(scale, overviewScale);
1160 reflowText = exceedsMinScaleIncrement(mTextWrapScale, scale);
1163 !exceedsMinScaleIncrement(scale, overviewScale);
1164 setZoomScale(scale, reflowText);
1166 // update the zoom buttons as the scale can be changed
1172 b.putFloat("scale", mActualScale);
1181 mActualScale = b.getFloat("scale", 1.0f);