Changeset 114370 in webkit
- Timestamp:
- Apr 17, 2012, 6:14:50 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r114367 r114370 1 2012-04-17 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 [Qt] Zoom out on second double-tap. 4 https://bugs.webkit.org/show_bug.cgi?id=84145 5 6 Reviewed by Simon Hausmann. 7 8 * UIProcess/qt/QtViewportInteractionEngine.cpp: 9 (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): 10 (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): 11 (WebKit::QtViewportInteractionEngine::pinchGestureStarted): 12 * UIProcess/qt/QtViewportInteractionEngine.h: 13 (QtViewportInteractionEngine): 14 1 15 2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com> 2 16 -
trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp
r114247 r114370 126 126 , m_hasSuspendedContent(false) 127 127 , m_hadUserInteraction(false) 128 , m_zoomedToArea(false) 128 129 , m_scaleAnimation(new ScaleAnimation(this)) 129 130 , m_pinchStartScale(-1) … … 364 365 return; 365 366 366 const int margin = 10; // We want at least a little bit o rmargin.367 const int margin = 10; // We want at least a little bit of margin. 367 368 QRectF endArea = itemRectFromCSS(targetArea.adjusted(-margin, -margin, margin, margin)); 368 369 … … 371 372 qreal targetCSSScale = cssScaleFromItem(viewportRect.size().width() / endArea.size().width()); 372 373 qreal endItemScale = itemScaleFromCSS(innerBoundedCSSScale(qMin(targetCSSScale, qreal(2.5)))); 374 375 // Zoom back out on a second double click, but still center on the new touch point. 376 if (m_zoomedToArea) { 377 m_zoomedToArea = false; 378 endItemScale = 1.0; 379 } else 380 m_zoomedToArea = true; 373 381 374 382 // We want to end up with the target area filling the whole width of the viewport (if possible), … … 526 534 527 535 m_hadUserInteraction = true; 536 m_zoomedToArea = false; 528 537 529 538 m_scaleUpdateDeferrer = adoptPtr(new ViewportUpdateDeferrer(this, ViewportUpdateDeferrer::DeferUpdateAndSuspendContent)); -
trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.h
r114247 r114370 146 146 147 147 bool m_hadUserInteraction; 148 bool m_zoomedToArea; 148 149 149 150 class ScaleAnimation : public QVariantAnimation {
Note:
See TracChangeset
for help on using the changeset viewer.