Title: [166323] trunk/Source/WebCore
Revision
166323
Author
za...@apple.com
Date
2014-03-26 15:43:22 -0700 (Wed, 26 Mar 2014)

Log Message

Device scale factor should always be greater than 0.
https://bugs.webkit.org/show_bug.cgi?id=130798

Reviewed by David Kilzer.

Rendering context requires a device scale factor > 0 so that we can map CSS pixels
to device pixels properly. Neither 0 nor a negative device pixel ratio are considered to be valid.

* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (166322 => 166323)


--- trunk/Source/WebCore/ChangeLog	2014-03-26 22:05:24 UTC (rev 166322)
+++ trunk/Source/WebCore/ChangeLog	2014-03-26 22:43:22 UTC (rev 166323)
@@ -1,3 +1,16 @@
+2014-03-26  Zalan Bujtas  <za...@apple.com>
+
+        Device scale factor should always be greater than 0.
+        https://bugs.webkit.org/show_bug.cgi?id=130798
+
+        Reviewed by David Kilzer.
+
+        Rendering context requires a device scale factor > 0 so that we can map CSS pixels
+        to device pixels properly. Neither 0 nor a negative device pixel ratio are considered to be valid.
+
+        * page/Page.cpp:
+        (WebCore::Page::setDeviceScaleFactor):
+
 2014-03-26  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Skipping underlines disregard points completely inside the underline rect

Modified: trunk/Source/WebCore/page/Page.cpp (166322 => 166323)


--- trunk/Source/WebCore/page/Page.cpp	2014-03-26 22:05:24 UTC (rev 166322)
+++ trunk/Source/WebCore/page/Page.cpp	2014-03-26 22:43:22 UTC (rev 166323)
@@ -734,6 +734,10 @@
 
 void Page::setDeviceScaleFactor(float scaleFactor)
 {
+    ASSERT(scaleFactor > 0);
+    if (scaleFactor <= 0)
+        return;
+    
     if (m_deviceScaleFactor == scaleFactor)
         return;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to