Title: [185028] trunk/Source/WebKit2
- Revision
- 185028
- Author
- [email protected]
- Date
- 2015-05-29 19:49:30 -0700 (Fri, 29 May 2015)
Log Message
[iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
<https://webkit.org/b/145487>
<rdar://problem/20989389>
Reviewed by Benjamin Poulain.
Make sure we don't send WebCore some velocity data with non-zero scaleChangeRate
when we bounce back from being pinch-zoomed past the maximum scale.
This fixes an issue where the bounce-back animation would cause a burst of
unnecessary tile generation.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::adjustVelocityDataForBoundedScale):
(WebKit::WebPage::updateVisibleContentRects):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (185027 => 185028)
--- trunk/Source/WebKit2/ChangeLog 2015-05-30 02:48:59 UTC (rev 185027)
+++ trunk/Source/WebKit2/ChangeLog 2015-05-30 02:49:30 UTC (rev 185028)
@@ -1,3 +1,21 @@
+2015-05-29 Andreas Kling <[email protected]>
+
+ [iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
+ <https://webkit.org/b/145487>
+ <rdar://problem/20989389>
+
+ Reviewed by Benjamin Poulain.
+
+ Make sure we don't send WebCore some velocity data with non-zero scaleChangeRate
+ when we bounce back from being pinch-zoomed past the maximum scale.
+
+ This fixes an issue where the bounce-back animation would cause a burst of
+ unnecessary tile generation.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::adjustVelocityDataForBoundedScale):
+ (WebKit::WebPage::updateVisibleContentRects):
+
2015-05-29 Jon Lee <[email protected]>
Fix preferences for wireless playback
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (185027 => 185028)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-05-30 02:48:59 UTC (rev 185027)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-05-30 02:49:30 UTC (rev 185028)
@@ -2728,14 +2728,14 @@
[[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationDidBecomeActiveNotification object:nil];
}
-static inline void adjustVelocityDataForBoundedScale(double& horizontalVelocity, double& verticalVelocity, double& scaleChangeRate, double exposedRectScale, double boundedScale)
+static inline void adjustVelocityDataForBoundedScale(double& horizontalVelocity, double& verticalVelocity, double& scaleChangeRate, double exposedRectScale, double minimumScale, double maximumScale)
{
if (scaleChangeRate) {
horizontalVelocity = 0;
verticalVelocity = 0;
}
- if (exposedRectScale != boundedScale)
+ if (exposedRectScale >= maximumScale || exposedRectScale <= minimumScale)
scaleChangeRate = 0;
}
@@ -2814,7 +2814,7 @@
double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
double verticalVelocity = visibleContentRectUpdateInfo.verticalVelocity();
double scaleChangeRate = visibleContentRectUpdateInfo.scaleChangeRate();
- adjustVelocityDataForBoundedScale(horizontalVelocity, verticalVelocity, scaleChangeRate, visibleContentRectUpdateInfo.scale(), boundedScale);
+ adjustVelocityDataForBoundedScale(horizontalVelocity, verticalVelocity, scaleChangeRate, visibleContentRectUpdateInfo.scale(), m_viewportConfiguration.minimumScale(), m_viewportConfiguration.maximumScale());
frameView.setScrollVelocity(horizontalVelocity, verticalVelocity, scaleChangeRate, visibleContentRectUpdateInfo.timestamp());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes