[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:22 UTC 2010


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

    Fix color media queries on Windows
    
    Fixes <http://webkit.org/b/42973> <rdar://problem/8234072> (color:8)
    media query does not evaluate to true for 32bpp displays on Windows
    
    Test: fast/media/color-does-not-include-alpha.html
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    * platform/win/PlatformScreenWin.cpp:
    (WebCore::screenDepthPerComponent): Use screenDepth instead of trying
    to interpret DEVMODE directly, since screenDepth knows how to correct
    for video drivers that return 32 instead of 24.
    
    LayoutTests:
    
    Add test for color:8 media queries
    
    * fast/media/color-does-not-include-alpha-expected.txt: Added.
    * fast/media/color-does-not-include-alpha.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68809 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e8f1d04..e64a476 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,18 @@
 2010-09-29  Adam Roben  <aroben at apple.com>
 
+        Add test for color:8 media queries
+
+        Test for <http://webkit.org/b/42973> <rdar://problem/8234072>
+        (color:8) media query does not evaluate to true for 32bpp displays on
+        Windows
+
+        Reviewed by Darin Adler.
+
+        * fast/media/color-does-not-include-alpha-expected.txt: Added.
+        * fast/media/color-does-not-include-alpha.html: Added.
+
+2010-09-29  Adam Roben  <aroben at apple.com>
+
         Update screen.colorDepth/screen.pixelDepth test to not allow values
         that contain bits for alpha
 
diff --git a/LayoutTests/fast/media/color-does-not-include-alpha-expected.txt b/LayoutTests/fast/media/color-does-not-include-alpha-expected.txt
new file mode 100644
index 0000000..6495f17
--- /dev/null
+++ b/LayoutTests/fast/media/color-does-not-include-alpha-expected.txt
@@ -0,0 +1,2 @@
+This box should be green.
+PASS
diff --git a/LayoutTests/fast/media/color-does-not-include-alpha.html b/LayoutTests/fast/media/color-does-not-include-alpha.html
new file mode 100644
index 0000000..4f6e508
--- /dev/null
+++ b/LayoutTests/fast/media/color-does-not-include-alpha.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<style>
+    div {
+        width: 300px;
+        height: 300px;
+        background-color: red;
+    }
+    @media (color:8) {
+        #test {
+            background-color: green;
+        }
+    }
+</style>
+<div id=test>This box should be green.</div>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+    var backgroundColor = getComputedStyle(document.getElementById("test"), null).backgroundColor;
+    const expectedBackgroundColor = "rgb(0, 128, 0)";
+    if (backgroundColor === expectedBackgroundColor)
+        document.write("PASS");
+    else
+        document.write("FAIL: Background color is " + backgroundColor + " but should be " + expectedBackgroundColor);
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7c2c15a..4f0bbfc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,21 @@
 2010-09-29  Adam Roben  <aroben at apple.com>
 
+        Fix color media queries on Windows
+
+        Fixes <http://webkit.org/b/42973> <rdar://problem/8234072> (color:8)
+        media query does not evaluate to true for 32bpp displays on Windows
+
+        Test: fast/media/color-does-not-include-alpha.html
+
+        Reviewed by Darin Adler.
+
+        * platform/win/PlatformScreenWin.cpp:
+        (WebCore::screenDepthPerComponent): Use screenDepth instead of trying
+        to interpret DEVMODE directly, since screenDepth knows how to correct
+        for video drivers that return 32 instead of 24.
+
+2010-09-29  Adam Roben  <aroben at apple.com>
+
         Make sure screen.colorDepth/screen.pixelDepth don't include the bits
         used for alpha
 
diff --git a/WebCore/platform/win/PlatformScreenWin.cpp b/WebCore/platform/win/PlatformScreenWin.cpp
index b38907d..21fa10d 100644
--- a/WebCore/platform/win/PlatformScreenWin.cpp
+++ b/WebCore/platform/win/PlatformScreenWin.cpp
@@ -79,8 +79,7 @@ int screenDepth(Widget* widget)
 int screenDepthPerComponent(Widget* widget)
 {
     // FIXME: Assumes RGB -- not sure if this is right.
-    DEVMODE deviceInfo = deviceInfoForWidget(widget);
-    return deviceInfo.dmBitsPerPel / 3;
+    return screenDepth(widget) / 3;
 }
 
 bool screenIsMonochrome(Widget* widget)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list