[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kenneth at webkit.org kenneth at webkit.org
Wed Dec 22 16:32:34 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3c15c39d21e7632f52a47e3b1942b82be4ba6fff
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 25 14:36:40 2010 +0000

    2010-11-25  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Simon Hausmann.
    
            Actually handle targetDensityDpi in computeViewportAttributes
            https://bugs.webkit.org/show_bug.cgi?id=50068
    
            * dom/ViewportArguments.cpp:
            (WebCore::computeViewportAttributes):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72730 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8f65bc0..32d5407 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-25  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        Actually handle targetDensityDpi in computeViewportAttributes
+        https://bugs.webkit.org/show_bug.cgi?id=50068
+
+        * dom/ViewportArguments.cpp:
+        (WebCore::computeViewportAttributes):
+
 2010-11-25  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Steve Block.
diff --git a/WebCore/dom/ViewportArguments.cpp b/WebCore/dom/ViewportArguments.cpp
index c3d1fc4..d3026e7 100644
--- a/WebCore/dom/ViewportArguments.cpp
+++ b/WebCore/dom/ViewportArguments.cpp
@@ -74,10 +74,26 @@ ViewportAttributes computeViewportAttributes(ViewportArguments args, int desktop
         break;
     }
 
-    result.devicePixelRatio = float(deviceDPI / 160.0);
+    switch (int(args.targetDensityDpi)) {
+    case ViewportArguments::ValueDeviceDPI:
+        args.targetDensityDpi = deviceDPI;
+        break;
+    case ViewportArguments::ValueLowDPI:
+        args.targetDensityDpi = 120;
+        break;
+    case ViewportArguments::ValueAuto:
+    case ViewportArguments::ValueMediumDPI:
+        args.targetDensityDpi = 160;
+        break;
+    case ViewportArguments::ValueHighDPI:
+        args.targetDensityDpi = 240;
+        break;
+    }
+
+    result.devicePixelRatio = float(deviceDPI / args.targetDensityDpi);
 
     // Resolve non-'auto' width and height to pixel values.
-    if (deviceDPI != 1.0) {
+    if (result.devicePixelRatio != 1.0) {
         availableWidth /= result.devicePixelRatio;
         availableHeight /= result.devicePixelRatio;
         deviceWidth /= result.devicePixelRatio;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list