Title: [131802] trunk/Source/WebKit2
- Revision
- 131802
- Author
- [email protected]
- Date
- 2012-10-18 14:20:14 -0700 (Thu, 18 Oct 2012)
Log Message
PageViewportController::m_rawAttributes.devicePixelRatio is not initialized
https://bugs.webkit.org/show_bug.cgi?id=99751
Patch by Yael Aharon <[email protected]> on 2012-10-18
Reviewed by Antonio Gomes.
PageViewportController::m_rawAttributes.devicePixelRatio needs to be initialized.
Due to race condition, we could set the viewport attributes before the first layout.
If that happens, PageViewportController::m_rawAttributes.devicePixelRatio
is used without being initialized.
* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (131801 => 131802)
--- trunk/Source/WebKit2/ChangeLog 2012-10-18 21:16:49 UTC (rev 131801)
+++ trunk/Source/WebKit2/ChangeLog 2012-10-18 21:20:14 UTC (rev 131802)
@@ -1,3 +1,18 @@
+2012-10-18 Yael Aharon <[email protected]>
+
+ PageViewportController::m_rawAttributes.devicePixelRatio is not initialized
+ https://bugs.webkit.org/show_bug.cgi?id=99751
+
+ Reviewed by Antonio Gomes.
+
+ PageViewportController::m_rawAttributes.devicePixelRatio needs to be initialized.
+ Due to race condition, we could set the viewport attributes before the first layout.
+ If that happens, PageViewportController::m_rawAttributes.devicePixelRatio
+ is used without being initialized.
+
+ * UIProcess/PageViewportController.cpp:
+ (WebKit::PageViewportController::PageViewportController):
+
2012-10-18 Roger Fong <[email protected]>
Unreviewed. Build fix after r131701 and r131777.
Modified: trunk/Source/WebKit2/UIProcess/PageViewportController.cpp (131801 => 131802)
--- trunk/Source/WebKit2/UIProcess/PageViewportController.cpp 2012-10-18 21:16:49 UTC (rev 131801)
+++ trunk/Source/WebKit2/UIProcess/PageViewportController.cpp 2012-10-18 21:20:14 UTC (rev 131802)
@@ -66,8 +66,9 @@
, m_hadUserInteraction(false)
, m_effectiveScale(1)
{
- // Initializing Viewport Raw Attributes to avoid random negative scale factors
+ // Initializing Viewport Raw Attributes to avoid random negative or infinity scale factors
// if there is a race condition between the first layout and setting the viewport attributes for the first time.
+ m_rawAttributes.devicePixelRatio = 1;
m_rawAttributes.initialScale = 1;
m_rawAttributes.minimumScale = 1;
m_rawAttributes.maximumScale = 1;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes