Title: [124374] trunk/Source/WebKit2
Revision
124374
Author
[email protected]
Date
2012-08-01 15:21:00 -0700 (Wed, 01 Aug 2012)

Log Message

[Qt][WK2] Race condition between first layout and viewport attributes initialization
https://bugs.webkit.org/show_bug.cgi?id=92902

Patch by Jesus Sanchez-Palencia <[email protected]> on 2012-08-01
Reviewed by Noam Rosenthal.

Initializing m_rawAttributes from QtViewportHandler to avoid calculation of random
scale factors on the first layout is triggered.

* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::QtViewportHandler):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (124373 => 124374)


--- trunk/Source/WebKit2/ChangeLog	2012-08-01 22:16:08 UTC (rev 124373)
+++ trunk/Source/WebKit2/ChangeLog	2012-08-01 22:21:00 UTC (rev 124374)
@@ -1,3 +1,16 @@
+2012-08-01  Jesus Sanchez-Palencia  <[email protected]>
+
+        [Qt][WK2] Race condition between first layout and viewport attributes initialization
+        https://bugs.webkit.org/show_bug.cgi?id=92902
+
+        Reviewed by Noam Rosenthal.
+
+        Initializing m_rawAttributes from QtViewportHandler to avoid calculation of random
+        scale factors on the first layout is triggered.
+
+        * UIProcess/qt/QtViewportHandler.cpp:
+        (WebKit::QtViewportHandler::QtViewportHandler):
+
 2012-08-01  Zeno Albisser  <[email protected]>
 
         [Qt]REGRESSION(r123786): It made 3 fast/animation tests fail.

Modified: trunk/Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp (124373 => 124374)


--- trunk/Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp	2012-08-01 22:16:08 UTC (rev 124373)
+++ trunk/Source/WebKit2/UIProcess/qt/QtViewportHandler.cpp	2012-08-01 22:21:00 UTC (rev 124374)
@@ -171,6 +171,14 @@
     m_scaleAnimation->setDuration(kScaleAnimationDurationMillis);
     m_scaleAnimation->setEasingCurve(QEasingCurve::OutCubic);
 
+    // Initializing Viewport Raw Attributes to avoid random negative scale factors
+    // if there is a race condition between the first layout and setting the viewport attributes for the first time.
+    m_rawAttributes.devicePixelRatio = m_devicePixelRatio;
+    m_rawAttributes.initialScale = 1;
+    m_rawAttributes.minimumScale = m_minimumScale;
+    m_rawAttributes.maximumScale = m_maximumScale;
+    m_rawAttributes.userScalable = m_allowsUserScaling;
+
     connect(m_viewportItem, SIGNAL(movementStarted()), SLOT(flickMoveStarted()), Qt::DirectConnection);
     connect(m_viewportItem, SIGNAL(movementEnded()), SLOT(flickMoveEnded()), Qt::DirectConnection);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to