[SCM] WebKit Debian packaging branch, webkit-1.2, updated. 1.2.5-1500-gb65db3c

Huzaifa Sidhpurwala huzaifas at redhat.com
Tue Jan 11 11:41:52 UTC 2011


The following commit has been merged in the webkit-1.2 branch:
commit 60f0d8642ec1d923c116ac0b7bf6205892a75d2c
Author: Huzaifa Sidhpurwala <huzaifas at redhat.com>
Date:   Wed Dec 1 09:38:10 2010 +0530

    Backport crash fix by Huzaifa Sidhpurwala <huzaifas at redhat.com>
    
        2010-10-27  Justin Schuh  <jschuh at chromium.org>
    
                Reviewed by Dirk Schulze.
    
                Ignore invalid blend modes
                https://bugs.webkit.org/show_bug.cgi?id=48371
    
                Test: svg/filters/feBlend-invalid-mode.xhtml
    
                * platform/graphics/filters/FEBlend.cpp:
                (WebCore::FEBlend::apply):
        2010-10-27  Justin Schuh  <jschuh at chromium.org>
    
                Reviewed by Dirk Schulze.
    
                Ignore invalid blend modes
                https://bugs.webkit.org/show_bug.cgi?id=48371
    
                * svg/filters/feBlend-invalid-mode-expected.txt: Added.
                * svg/filters/feBlend-invalid-mode.xhtml: Added.
    
        git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70652 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/svg/filters/feBlend-invalid-mode-expected.txt b/LayoutTests/svg/filters/feBlend-invalid-mode-expected.txt
new file mode 100644
index 0000000..e3eec24
--- /dev/null
+++ b/LayoutTests/svg/filters/feBlend-invalid-mode-expected.txt
@@ -0,0 +1 @@
+PASS: Invalid blend modes do not trigger a crash. 
diff --git a/LayoutTests/svg/filters/feBlend-invalid-mode.xhtml b/LayoutTests/svg/filters/feBlend-invalid-mode.xhtml
new file mode 100644
index 0000000..880ac30
--- /dev/null
+++ b/LayoutTests/svg/filters/feBlend-invalid-mode.xhtml
@@ -0,0 +1,18 @@
+<html>
+<body>
+<p>PASS: Invalid blend modes do not trigger a crash.</p>
+<svg xmlns="http://www.w3.org/2000/svg">
+<defs>
+    <filter id="filter">
+        <feBlend id="blend" />
+    </filter>
+</defs>
+<rect filter="url(#filter)" width="10" height="10"/>   
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+document.getElementById('blend').mode.baseVal=-1;
+</script>
+</svg>
+</body>
+</html>
diff --git a/WebCore/platform/graphics/filters/FEBlend.cpp b/WebCore/platform/graphics/filters/FEBlend.cpp
index f362148..86750a6 100644
--- a/WebCore/platform/graphics/filters/FEBlend.cpp
+++ b/WebCore/platform/graphics/filters/FEBlend.cpp
@@ -105,7 +105,7 @@ void FEBlend::apply(Filter* filter)
     if (!m_in->resultImage() || !m_in2->resultImage())
         return;
 
-    if (m_mode == FEBLEND_MODE_UNKNOWN)
+    if (m_mode <= FEBLEND_MODE_UNKNOWN || m_mode > FEBLEND_MODE_LIGHTEN)
         return;
 
     if (!getEffectContext())

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list