[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:51:04 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit b89ec11730001a6c59cf4602b4a41d3c5bb7d716
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 16 18:12:55 2009 +0000
2009-12-16 Dirk Schulze <krit at webkit.org>
Reviewed by Darin Adler.
sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
https://bugs.webkit.org/show_bug.cgi?id=32575
Check if the GraphicsContex get adjusted, if the source rect is clipped
to the filter rect.
* platform/mac/svg/filters/filter-source-position-expected.checksum: Added.
* platform/mac/svg/filters/filter-source-position-expected.png: Added.
* platform/mac/svg/filters/filter-source-position-expected.txt: Added.
* svg/filters/filter-source-position.svg: Added.
2009-12-16 Dirk Schulze <krit at webkit.org>
Reviewed by Darin Adler.
sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
https://bugs.webkit.org/show_bug.cgi?id=32575
On SVG Filters, the rest of the source graphic gets clipped to the filter
rest. This helps us to minimize the size of intermediate ImageBuffers. If
the position moves to the right or to the bottom, we have to adjust the
GraphicContext of this intermediate ImageBuffer.
This patch fixes the adjustment of the context, according to the clipping.
Test: svg/filters/filter-source-position.svg
* svg/graphics/SVGResourceFilter.cpp:
(WebCore::SVGResourceFilter::prepareFilter):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2036df9..78feaca 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-16 Dirk Schulze <krit at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
+ https://bugs.webkit.org/show_bug.cgi?id=32575
+
+ Check if the GraphicsContex get adjusted, if the source rect is clipped
+ to the filter rect.
+
+ * platform/mac/svg/filters/filter-source-position-expected.checksum: Added.
+ * platform/mac/svg/filters/filter-source-position-expected.png: Added.
+ * platform/mac/svg/filters/filter-source-position-expected.txt: Added.
+ * svg/filters/filter-source-position.svg: Added.
+
2009-12-16 Enrica Casucci <enrica at apple.com>
Reviewed by Adele Peterson.
diff --git a/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.checksum b/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.checksum
new file mode 100644
index 0000000..403a9d5
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.checksum
@@ -0,0 +1 @@
+5ec386fb3113c652af9032bfed7a89a6
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.png b/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.png
new file mode 100644
index 0000000..46807b9
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.txt b/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.txt
new file mode 100644
index 0000000..f728ac1
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/filters/filter-source-position-expected.txt
@@ -0,0 +1,22 @@
+KCanvasResource {id="filter1" [type=FILTER] [bounding box=at (20.00%,20.00%) size 80.00%x80.00%]}
+KCanvasResource {id="filter2" [type=FILTER] [bounding box=at (-20.00%,20.00%) size 100.00%x80.00%]}
+KCanvasResource {id="filter3" [type=FILTER] [bounding box=at (20.00%,-20.00%) size 80.00%x100.00%]}
+KCanvasResource {id="filter4" [type=FILTER] [bounding box=at (-20.00%,-20.00%) size 100.00%x100.00%]}
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (20,20) size 240x240
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGImage {image} at (20,20) size 110x110
+ RenderSVGContainer {use} at (20,20) size 110x110 [filter=filter1]
+ RenderSVGContainer {g} at (20,20) size 110x110
+ RenderSVGImage {image} at (20,20) size 110x110
+ RenderSVGContainer {use} at (128,20) size 132x110 [filter=filter2]
+ RenderSVGContainer {g} at (150,20) size 110x110 [transform={m=((1.00,0.00)(0.00,1.00)) t=(130.00,0.00)}]
+ RenderSVGImage {image} at (150,20) size 110x110
+ RenderSVGContainer {use} at (20,128) size 110x132 [filter=filter3]
+ RenderSVGContainer {g} at (20,150) size 110x110 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,130.00)}]
+ RenderSVGImage {image} at (20,150) size 110x110
+ RenderSVGContainer {use} at (128,128) size 132x132 [filter=filter4]
+ RenderSVGContainer {g} at (150,150) size 110x110 [transform={m=((1.00,0.00)(0.00,1.00)) t=(130.00,130.00)}]
+ RenderSVGImage {image} at (150,150) size 110x110
diff --git a/LayoutTests/svg/filters/filter-source-position.svg b/LayoutTests/svg/filters/filter-source-position.svg
new file mode 100644
index 0000000..7a3f391
--- /dev/null
+++ b/LayoutTests/svg/filters/filter-source-position.svg
@@ -0,0 +1,21 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<filter id="filter1" x="20%" y="20%" width="80%" height="80%">
+ <feOffset/>
+</filter>
+<filter id="filter2" x="-20%" y="20%" width="100%" height="80%">
+ <feOffset/>
+</filter>
+<filter id="filter3" x="20%" y="-20%" width="80%" height="100%">
+ <feOffset/>
+</filter>
+<filter id="filter4" x="-20%" y="-20%" width="100%" height="100%">
+ <feOffset/>
+</filter>
+<image id="img" xlink:href="../custom/resources/groupOpacityReference4.png" x="20" y="20" width="110" height="110"/>
+</defs>
+<use x="0" y="0" xlink:href="#img" filter="url(#filter1)"/>
+<use x="130" y="0" xlink:href="#img" filter="url(#filter2)"/>
+<use x="0" y="130" xlink:href="#img" filter="url(#filter3)"/>
+<use x="130" y="130" xlink:href="#img" filter="url(#filter4)"/>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c71854d..74909d0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-12-16 Dirk Schulze <krit at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
+ https://bugs.webkit.org/show_bug.cgi?id=32575
+
+ On SVG Filters, the rest of the source graphic gets clipped to the filter
+ rest. This helps us to minimize the size of intermediate ImageBuffers. If
+ the position moves to the right or to the bottom, we have to adjust the
+ GraphicContext of this intermediate ImageBuffer.
+ This patch fixes the adjustment of the context, according to the clipping.
+
+ Test: svg/filters/filter-source-position.svg
+
+ * svg/graphics/SVGResourceFilter.cpp:
+ (WebCore::SVGResourceFilter::prepareFilter):
+
2009-12-16 Enrica Casucci <enrica at apple.com>
Reviewed by Adele Peterson.
diff --git a/WebCore/svg/graphics/SVGResourceFilter.cpp b/WebCore/svg/graphics/SVGResourceFilter.cpp
index fcf0e40..660f3ed 100644
--- a/WebCore/svg/graphics/SVGResourceFilter.cpp
+++ b/WebCore/svg/graphics/SVGResourceFilter.cpp
@@ -135,8 +135,8 @@ void SVGResourceFilter::prepareFilter(GraphicsContext*& context, const RenderObj
return;
GraphicsContext* sourceGraphicContext = sourceGraphic->context();
+ sourceGraphicContext->translate(-clippedSourceRect.x(), -clippedSourceRect.y());
sourceGraphicContext->scale(FloatSize(m_scaleX, m_scaleY));
- sourceGraphicContext->translate(-targetRect.x(), -targetRect.y());
sourceGraphicContext->clearRect(FloatRect(FloatPoint(), targetRect.size()));
m_sourceGraphicBuffer.set(sourceGraphic.release());
m_savedContext = context;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list