Title: [136668] trunk/Source/WebKit2
- Revision
- 136668
- Author
- abe...@webkit.org
- Date
- 2012-12-05 04:32:00 -0800 (Wed, 05 Dec 2012)
Log Message
[Qt][WK2] REGRESSION(r135399): It made qmltests::DoubleTapToZoom::test_double_zoomInAndBack() API test fail
https://bugs.webkit.org/show_bug.cgi?id=103889
Reviewed by Jocelyn Turcotte.
The client should always be notified in PageViewportController::didChangeViewportAttributes
about the changed attributes not only if the minimum scale changed. This ensures that these
changes are propagated to QWebKitTest and the zoom stack of double-tap-to-zoom is reset correctly.
Also increase precision of scale comparisons since the current value resulted in flakyness in
scale related API tests.
* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::didChangeViewportAttributes):
(WebKit::PageViewportController::updateMinimumScaleToFit):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (136667 => 136668)
--- trunk/Source/WebKit2/ChangeLog 2012-12-05 12:09:51 UTC (rev 136667)
+++ trunk/Source/WebKit2/ChangeLog 2012-12-05 12:32:00 UTC (rev 136668)
@@ -1,3 +1,20 @@
+2012-12-05 Andras Becsi <andras.be...@digia.com>
+
+ [Qt][WK2] REGRESSION(r135399): It made qmltests::DoubleTapToZoom::test_double_zoomInAndBack() API test fail
+ https://bugs.webkit.org/show_bug.cgi?id=103889
+
+ Reviewed by Jocelyn Turcotte.
+
+ The client should always be notified in PageViewportController::didChangeViewportAttributes
+ about the changed attributes not only if the minimum scale changed. This ensures that these
+ changes are propagated to QWebKitTest and the zoom stack of double-tap-to-zoom is reset correctly.
+ Also increase precision of scale comparisons since the current value resulted in flakyness in
+ scale related API tests.
+
+ * UIProcess/PageViewportController.cpp:
+ (WebKit::PageViewportController::didChangeViewportAttributes):
+ (WebKit::PageViewportController::updateMinimumScaleToFit):
+
2012-12-05 Christophe Dumez <christophe.du...@intel.com>
[CoordinatedGraphics] Use unsigned integers for CoordinatedTile IDs
Modified: trunk/Source/WebKit2/UIProcess/PageViewportController.cpp (136667 => 136668)
--- trunk/Source/WebKit2/UIProcess/PageViewportController.cpp 2012-12-05 12:09:51 UTC (rev 136667)
+++ trunk/Source/WebKit2/UIProcess/PageViewportController.cpp 2012-12-05 12:32:00 UTC (rev 136668)
@@ -232,8 +232,8 @@
if (!m_initiallyFitToViewport)
WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(m_rawAttributes);
- if (updateMinimumScaleToFit(true))
- m_client->didChangeViewportAttributes();
+ updateMinimumScaleToFit(true);
+ m_client->didChangeViewportAttributes();
}
WebCore::FloatSize PageViewportController::viewportSizeInContentsCoordinates() const
@@ -280,14 +280,14 @@
if (m_viewportSize.isEmpty() || m_contentsSize.isEmpty())
return false;
- bool currentlyScaledToFit = fuzzyCompare(m_effectiveScale, toViewportScale(m_minimumScaleToFit), 0.001);
+ bool currentlyScaledToFit = fuzzyCompare(m_effectiveScale, toViewportScale(m_minimumScaleToFit), 0.0001);
float minimumScale = WebCore::computeMinimumScaleFactorForContentContained(m_rawAttributes, WebCore::roundedIntSize(m_viewportSize), WebCore::roundedIntSize(m_contentsSize), devicePixelRatio());
if (minimumScale <= 0)
return false;
- if (!fuzzyCompare(minimumScale, m_minimumScaleToFit, 0.001)) {
+ if (!fuzzyCompare(minimumScale, m_minimumScaleToFit, 0.0001)) {
m_minimumScaleToFit = minimumScale;
if (!hasSuspendedContent()) {
@@ -296,7 +296,7 @@
else {
// Ensure the effective scale stays within bounds.
float boundedScale = innerBoundedViewportScale(m_effectiveScale);
- if (!fuzzyCompare(boundedScale, m_effectiveScale, 0.001))
+ if (!fuzzyCompare(boundedScale, m_effectiveScale, 0.0001))
applyScaleAfterRenderingContents(boundedScale);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes