[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
morrita at google.com
morrita at google.com
Mon Dec 27 16:26:07 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 95a52b82752fb8ad59c7a3ad302c3a85a0cd22fb
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 21 04:32:33 2010 +0000
2010-12-17 MORITA Hajime <morrita at google.com>
Reviewed by James Robinson.
https://bugs.webkit.org/show_bug.cgi?id=51240
[Chromium][Skia] Border with a color with alpha != 1 breaks webkit gradient on skia.
* fast/gradients/gradient-after-transparent-border-expected.txt: Added.
* fast/gradients/gradient-after-transparent-border.html: Added.
* platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.checksum: Added.
* platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.png: Added.
2010-12-17 MORITA Hajime <morrita at google.com>
Reviewed by James Robinson.
https://bugs.webkit.org/show_bug.cgi?id=51240
[Chromium][Skia] Border with a color with alpha != 1 breaks webkit gradient on skia.
Even after a shader was set, old color value had been remaining and passed to Skia.
Then Skia refered an alpha component of that color to make pixels transparent.
This change invalidates existing color value when a shader is given,
which means the renderer will paint shapes with gradients or patterns.
Test: fast/gradients/gradient-after-transparent-border.html
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::setStrokeShader):
(WebCore::PlatformContextSkia::setFillShader):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5d071b3..2d0dbf2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-17 MORITA Hajime <morrita at google.com>
+
+ Reviewed by James Robinson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51240
+ [Chromium][Skia] Border with a color with alpha != 1 breaks webkit gradient on skia.
+
+ * fast/gradients/gradient-after-transparent-border-expected.txt: Added.
+ * fast/gradients/gradient-after-transparent-border.html: Added.
+ * platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.checksum: Added.
+ * platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.png: Added.
+
2010-12-20 Xiaomei Ji <xji at chromium.org>
Reviewed by Dan Bernstein.
diff --git a/LayoutTests/fast/gradients/gradient-after-transparent-border-expected.txt b/LayoutTests/fast/gradients/gradient-after-transparent-border-expected.txt
new file mode 100644
index 0000000..b64ff3c
--- /dev/null
+++ b/LayoutTests/fast/gradients/gradient-after-transparent-border-expected.txt
@@ -0,0 +1 @@
+Test for Bug 51240: PASS if the second box is painted as an opaque blue-to-green square.
diff --git a/LayoutTests/fast/gradients/gradient-after-transparent-border.html b/LayoutTests/fast/gradients/gradient-after-transparent-border.html
new file mode 100644
index 0000000..8d13117
--- /dev/null
+++ b/LayoutTests/fast/gradients/gradient-after-transparent-border.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.square {
+ width: 100px;
+ height: 100px;
+ float: left;
+ margin: 50px;
+}
+
+.transparent-border {
+ background-color:red;
+ border-bottom: 10px solid rgba(1, 52, 193, 0.5);
+}
+
+.gradient {
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0,0,255,1)), to(rgba(0,255,0,1)));
+}
+</style>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText(true);
+</script>
+</head><body>
+<p>Test for Bug 51240: PASS if the second box is painted as an opaque blue-to-green square.</p>
+<div class="square transparent-border"></div>
+<div class="square gradient"></div>
+</body></html>
diff --git a/LayoutTests/platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.checksum b/LayoutTests/platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.checksum
new file mode 100644
index 0000000..72b740b
--- /dev/null
+++ b/LayoutTests/platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.checksum
@@ -0,0 +1 @@
+cbf5c39f2fcc1ab10fea961bd01d8f6b
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.png b/LayoutTests/platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.png
new file mode 100644
index 0000000..b1ca30a
Binary files /dev/null and b/LayoutTests/platform/chromium-win/fast/gradients/gradient-after-transparent-border-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ebe1fc7..ff11110 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-17 MORITA Hajime <morrita at google.com>
+
+ Reviewed by James Robinson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51240
+ [Chromium][Skia] Border with a color with alpha != 1 breaks webkit gradient on skia.
+
+ Even after a shader was set, old color value had been remaining and passed to Skia.
+ Then Skia refered an alpha component of that color to make pixels transparent.
+ This change invalidates existing color value when a shader is given,
+ which means the renderer will paint shapes with gradients or patterns.
+
+ Test: fast/gradients/gradient-after-transparent-border.html
+
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (WebCore::PlatformContextSkia::setStrokeShader):
+ (WebCore::PlatformContextSkia::setFillShader):
+
2010-12-20 Xiaomei Ji <xji at chromium.org>
Reviewed by Dan Bernstein.
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index 8c677df..d3c0e00 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -497,6 +497,9 @@ void PlatformContextSkia::setStrokeThickness(float thickness)
void PlatformContextSkia::setStrokeShader(SkShader* strokeShader)
{
+ if (strokeShader)
+ m_state->m_strokeColor = Color::black;
+
if (strokeShader != m_state->m_strokeShader) {
SkSafeUnref(m_state->m_strokeShader);
m_state->m_strokeShader = strokeShader;
@@ -581,6 +584,9 @@ void PlatformContextSkia::setFillRule(SkPath::FillType fr)
void PlatformContextSkia::setFillShader(SkShader* fillShader)
{
+ if (fillShader)
+ m_state->m_fillColor = Color::black;
+
if (fillShader != m_state->m_fillShader) {
SkSafeUnref(m_state->m_fillShader);
m_state->m_fillShader = fillShader;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list