Title: [166394] trunk/Source/WebCore
- Revision
- 166394
- Author
- [email protected]
- Date
- 2014-03-27 20:50:48 -0700 (Thu, 27 Mar 2014)
Log Message
[iOS][WK2] Adjust the tile coverage on the scrollview's edges
https://bugs.webkit.org/show_bug.cgi?id=130884
Patch by Benjamin Poulain <[email protected]> on 2014-03-27
Reviewed by Dan Bernstein.
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::computeCoverageRect):
Pull back the future rect inside the contentRect if it goes outside.
There is no point in retiling for rubberbanding and the extra tiles should be always be
on the opposite side to the edges.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (166393 => 166394)
--- trunk/Source/WebCore/ChangeLog 2014-03-28 02:46:06 UTC (rev 166393)
+++ trunk/Source/WebCore/ChangeLog 2014-03-28 03:50:48 UTC (rev 166394)
@@ -1,3 +1,16 @@
+2014-03-27 Benjamin Poulain <[email protected]>
+
+ [iOS][WK2] Adjust the tile coverage on the scrollview's edges
+ https://bugs.webkit.org/show_bug.cgi?id=130884
+
+ Reviewed by Dan Bernstein.
+
+ * platform/ios/ScrollViewIOS.mm:
+ (WebCore::ScrollView::computeCoverageRect):
+ Pull back the future rect inside the contentRect if it goes outside.
+ There is no point in retiling for rubberbanding and the extra tiles should be always be
+ on the opposite side to the edges.
+
2014-03-27 Joseph Pecoraro <[email protected]>
Remove unused LocaleMac::create method
Modified: trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm (166393 => 166394)
--- trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm 2014-03-28 02:46:06 UTC (rev 166393)
+++ trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm 2014-03-28 03:50:48 UTC (rev 166394)
@@ -140,22 +140,32 @@
if (m_horizontalVelocity) {
futureRect.setWidth(futureRect.width() + horizontalMargin);
if (m_horizontalVelocity < 0)
- futureRect.setX(std::max(futureRect.x() - horizontalMargin, 0.));
+ futureRect.setX(futureRect.x() - horizontalMargin);
}
if (m_verticalVelocity) {
futureRect.setHeight(futureRect.height() + verticalMargin);
if (m_verticalVelocity < 0)
- futureRect.setY(std::max(futureRect.y() - verticalMargin, 0.));
+ futureRect.setY(futureRect.y() - verticalMargin);
}
if (m_scaleChangeRate <= 0 && !m_horizontalVelocity && !m_verticalVelocity) {
futureRect.setWidth(futureRect.width() + horizontalMargin);
futureRect.setHeight(futureRect.height() + verticalMargin);
- futureRect.setX(std::max(futureRect.x() - horizontalMargin / 2, 0.));
- futureRect.setY(std::max(futureRect.y() - verticalMargin / 2, 0.));
+ futureRect.setX(futureRect.x() - horizontalMargin / 2);
+ futureRect.setY(futureRect.y() - verticalMargin / 2);
}
+ IntSize contentSize = contentsSize();
+ if (futureRect.maxX() > contentSize.width())
+ futureRect.setX(contentSize.width() - futureRect.width());
+ if (futureRect.maxY() > contentSize.height())
+ futureRect.setY(contentSize.height() - futureRect.height());
+ if (futureRect.x() < 0)
+ futureRect.setX(0);
+ if (futureRect.y() < 0)
+ futureRect.setY(0);
+
return futureRect;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes