Title: [119697] trunk/Source/WebKit2
- Revision
- 119697
- Author
- abe...@webkit.org
- Date
- 2012-06-07 02:38:45 -0700 (Thu, 07 Jun 2012)
Log Message
[Qt][WK2] setPageItemRectVisible() is not guarded by ViewportUpdateDeferrer at scaleAnimationValueChanged()
https://bugs.webkit.org/show_bug.cgi?id=87954
Reviewed by Kenneth Rohde Christiansen.
Resetting the end value, the easing curve or the duration of the scale animation triggers
a recalculation of the animation interval. This might change the current value of the
animated property.
Since guarding of setPageItemRectVisible() relies on animation state change we have to
make sure we only act on animation value changes if the animation is in active state.
* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::QtViewportHandler):
(WebKit::QtViewportHandler::animatePageItemRectVisible):
(WebKit::QtViewportHandler::scaleAnimationValueChanged):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (119696 => 119697)
--- trunk/Source/WebKit2/ChangeLog 2012-06-07 09:26:37 UTC (rev 119696)
+++ trunk/Source/WebKit2/ChangeLog 2012-06-07 09:38:45 UTC (rev 119697)
@@ -1,3 +1,21 @@
+2012-06-07 Andras Becsi <andras.be...@nokia.com>
+
+ [Qt][WK2] setPageItemRectVisible() is not guarded by ViewportUpdateDeferrer at scaleAnimationValueChanged()
+ https://bugs.webkit.org/show_bug.cgi?id=87954
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Resetting the end value, the easing curve or the duration of the scale animation triggers
+ a recalculation of the animation interval. This might change the current value of the
+ animated property.
+ Since guarding of setPageItemRectVisible() relies on animation state change we have to
+ make sure we only act on animation value changes if the animation is in active state.
+
+ * UIProcess/qt/QtViewportHandler.cpp:
+ (WebKit::QtViewportHandler::QtViewportHandler):
+ (WebKit::QtViewportHandler::animatePageItemRectVisible):
+ (WebKit::QtViewportHandler::scaleAnimationValueChanged):
+
2012-06-06 Carlos Garcia Campos <cgar...@igalia.com>
[SOUP] WebSoupRequestManager should handle loading errors and zero-length replies
Modified: trunk/Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp (119696 => 119697)
--- trunk/Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp 2012-06-07 09:26:37 UTC (rev 119696)
+++ trunk/Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp 2012-06-07 09:38:45 UTC (rev 119697)
@@ -163,6 +163,9 @@
, m_lastCommittedScale(-1)
, m_zoomOutScale(0.0)
{
+ m_scaleAnimation->setDuration(kScaleAnimationDurationMillis);
+ m_scaleAnimation->setEasingCurve(QEasingCurve::OutCubic);
+
connect(m_viewportItem, SIGNAL(movementStarted()), SLOT(flickMoveStarted()), Qt::DirectConnection);
connect(m_viewportItem, SIGNAL(movementEnded()), SLOT(flickMoveEnded()), Qt::DirectConnection);
@@ -292,9 +295,6 @@
if (itemRect == currentPageItemRectVisible)
return;
- m_scaleAnimation->setDuration(kScaleAnimationDurationMillis);
- m_scaleAnimation->setEasingCurve(QEasingCurve::OutCubic);
-
m_scaleAnimation->setStartValue(currentPageItemRectVisible);
m_scaleAnimation->setEndValue(itemRect);
@@ -366,6 +366,13 @@
void QtViewportHandler::scaleAnimationValueChanged(QVariant value)
{
+ // Resetting the end value, the easing curve or the duration of the scale animation
+ // triggers a recalculation of the animation interval. This might change the current
+ // value of the animated property.
+ // Make sure we only act on animation value changes if the animation is active.
+ if (!scaleAnimationActive())
+ return;
+
setPageItemRectVisible(value.toRectF());
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes