diff options
| author | Konstantin Tokarev <annulen@yandex.ru> | 2016-09-28 16:39:37 +0300 |
|---|---|---|
| committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:31:01 +0000 |
| commit | 9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch) | |
| tree | 322337ad0acbc75732f916376ec6d36e7ec0e5bc /Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp | |
| parent | 6882a04fb36642862b11efe514251d32070c3d65 (diff) | |
| download | qtwebkit-9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c.tar.gz | |
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp')
| -rw-r--r-- | Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp index f72946529..0dbaa651e 100644 --- a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp +++ b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp @@ -274,7 +274,7 @@ void PageViewportControllerClientQt::zoomToAreaGestureEnded(const QPointF& touch // Zoom back out if attempting to scale to the same current scale, or // attempting to continue scaling out from the inner most level. // Use fuzzy compare with a fixed error to be able to deal with largish differences due to pixel rounding. - if (!m_scaleStack.isEmpty() && fuzzyCompare(targetScale, currentScale, 0.01)) { + if (!m_scaleStack.isEmpty() && WTF::areEssentiallyEqual(targetScale, currentScale, qreal(0.01))) { // If moving the viewport would expose more of the targetRect and move at least 40 pixels, update position but do not scale out. QRectF currentContentRect(m_viewportItem->mapRectToWebContent(viewportRect)); QRectF targetIntersection = endVisibleContentRect.intersected(targetArea); @@ -284,7 +284,7 @@ void PageViewportControllerClientQt::zoomToAreaGestureEnded(const QPointF& touch zoomAction = NoZoom; else zoomAction = ZoomBack; - } else if (fuzzyCompare(targetScale, m_zoomOutScale, 0.01)) + } else if (WTF::areEssentiallyEqual(targetScale, m_zoomOutScale, qreal(0.01))) zoomAction = ZoomBack; else if (targetScale < currentScale) zoomAction = ZoomOut; |
