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

aroben at apple.com aroben at apple.com
Wed Dec 22 13:58:20 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5d072628333add8a630a6ace90c319da8bfef9fa
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 30 18:27:53 2010 +0000

    Make sure screen.colorDepth/screen.pixelDepth don't include the bits used for alpha
    
    Fixes <http://webkit.org/b/42972> <rdar://problem/8234071>
    screen.colorDepth and screen.pixelDepth return 32 on Windows, but
    should return 24 (according to CSSOM View and Firefox)
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    * platform/win/PlatformScreenWin.cpp:
    (WebCore::screenDepth): If Windows says there are 32 bits per pixel,
    return 24 instead, as 32 includes the alpha component but this
    function is supposed to ignore the alpha component.
    
    LayoutTests:
    
    Update screen.colorDepth/screen.pixelDepth test to not allow values
    that contain bits for alpha
    
    * fast/dom/Window/window-screen-properties-expected.txt: Updated
    results.
    * fast/dom/Window/window-screen-properties.html: Changed only to
    expect 16 or 24.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68808 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e5c4f9c..e8f1d04 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-29  Adam Roben  <aroben at apple.com>
+
+        Update screen.colorDepth/screen.pixelDepth test to not allow values
+        that contain bits for alpha
+
+        Fixes <http://webkit.org/b/42972> <rdar://problem/8234071>
+        screen.colorDepth and screen.pixelDepth return 32 on Windows, but
+        should return 24 (according to CSSOM View and Firefox)
+
+        Reviewed by Darin Adler.
+
+        * fast/dom/Window/window-screen-properties-expected.txt: Updated
+        results.
+        * fast/dom/Window/window-screen-properties.html: Changed only to
+        expect 24.
+
 2010-09-29  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/LayoutTests/fast/dom/Window/window-screen-properties-expected.txt b/LayoutTests/fast/dom/Window/window-screen-properties-expected.txt
index f54e028..ef15ee6 100644
--- a/LayoutTests/fast/dom/Window/window-screen-properties-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-screen-properties-expected.txt
@@ -1,2 +1,2 @@
-PASS: window.screen.pixelDepth is either 16, 24, or 32
-PASS: window.screen.colorDepth is either 16, 24, or 32
+PASS: window.screen.pixelDepth is 24
+PASS: window.screen.colorDepth is 24
diff --git a/LayoutTests/fast/dom/Window/window-screen-properties.html b/LayoutTests/fast/dom/Window/window-screen-properties.html
index 88b1399..7d2c9a7 100644
--- a/LayoutTests/fast/dom/Window/window-screen-properties.html
+++ b/LayoutTests/fast/dom/Window/window-screen-properties.html
@@ -2,18 +2,16 @@
 if (window.layoutTestController)
     layoutTestController.dumpAsText();
 depth = window.screen.pixelDepth;
-if (depth == 16 || depth == 24 || depth == 32) {
-  document.write("PASS: window.screen.pixelDepth is either 16, 24, or 32");
+if (depth == 24) {
+  document.write("PASS: window.screen.pixelDepth is 24");
 }  else {
-  document.write("FAIL: window.screen.pixelDepth is " + depth +
-                 ", expected either 16, 24, or 32");
+  document.write("FAIL: window.screen.pixelDepth is " + depth + ", expected 24");
 }
 document.write("<br />");
 depth = window.screen.colorDepth;
-if (depth == 16 || depth == 24 || depth == 32) {
-  document.write("PASS: window.screen.colorDepth is either 16, 24, or 32");
+if (depth == 24) {
+  document.write("PASS: window.screen.colorDepth is 24");
 }  else {
-  document.write("FAIL: window.screen.colorDepth is " + depth +
-                 ", expected either 16, 24, or 32");
+  document.write("FAIL: window.screen.colorDepth is " + depth + ", expected 24");
 }
 </script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0f9d9cc..7c2c15a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-29  Adam Roben  <aroben at apple.com>
+
+        Make sure screen.colorDepth/screen.pixelDepth don't include the bits
+        used for alpha
+
+        Fixes <http://webkit.org/b/42972> <rdar://problem/8234071>
+        screen.colorDepth and screen.pixelDepth return 32 on Windows, but
+        should return 24 (according to CSSOM View and Firefox)
+
+        Reviewed by Darin Adler.
+
+        * platform/win/PlatformScreenWin.cpp:
+        (WebCore::screenDepth): If Windows says there are 32 bits per pixel,
+        return 24 instead, as 32 includes the alpha component but this
+        function is supposed to ignore the alpha component.
+
 2010-09-30  Daniel Cheng  <dcheng at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/WebCore/platform/win/PlatformScreenWin.cpp b/WebCore/platform/win/PlatformScreenWin.cpp
index 4af9e17..b38907d 100644
--- a/WebCore/platform/win/PlatformScreenWin.cpp
+++ b/WebCore/platform/win/PlatformScreenWin.cpp
@@ -68,6 +68,11 @@ static DEVMODE deviceInfoForWidget(Widget* widget)
 int screenDepth(Widget* widget)
 {
     DEVMODE deviceInfo = deviceInfoForWidget(widget);
+    if (deviceInfo.dmBitsPerPel == 32) {
+        // Some video drivers return 32, but this function is supposed to ignore the alpha
+        // component. See <http://webkit.org/b/42972>.
+        return 24;
+    }
     return deviceInfo.dmBitsPerPel;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list