[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
zherczeg at webkit.org
zherczeg at webkit.org
Wed Dec 22 16:11:21 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b208faa88f5d87bb7a2796568f5c36f7854fe44d
Author: zherczeg at webkit.org <zherczeg at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 19 14:13:43 2010 +0000
createImageBuffer fail should be handled in the same way as other fails
https://bugs.webkit.org/show_bug.cgi?id=49799
Reviewed by Nikolas Zimmermann.
WebCore:
When createImageBuffer fails (i.e the image width or height is less than
0.5, which is rounded to 0) it just returs with false. Since the m_filter
hash map is not updated in this case, the filter image is not drawn.
Test: svg/filters/filter-rounding-issues.svg
* rendering/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
LayoutTests:
* platform/mac/svg/filters/filter-rounding-issues-expected.checksum: Added.
* platform/mac/svg/filters/filter-rounding-issues-expected.png: Added.
* svg/filters/filter-rounding-issues-expected.txt: Added.
* svg/filters/filter-rounding-issues.svg: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 842af0e..c9d3484 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-19 Zoltan Herczeg <zherczeg at webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ createImageBuffer fail should be handled in the same way as other fails
+ https://bugs.webkit.org/show_bug.cgi?id=49799
+
+ * platform/mac/svg/filters/filter-rounding-issues-expected.checksum: Added.
+ * platform/mac/svg/filters/filter-rounding-issues-expected.png: Added.
+ * svg/filters/filter-rounding-issues-expected.txt: Added.
+ * svg/filters/filter-rounding-issues.svg: Added.
+
2010-11-19 'Anton Muhin' <antonm at chromium.org>
Not reviewed, next batch of Chromium suppressions for layout test failures after
diff --git a/LayoutTests/platform/mac/svg/filters/filter-rounding-issues-expected.checksum b/LayoutTests/platform/mac/svg/filters/filter-rounding-issues-expected.checksum
new file mode 100644
index 0000000..a679071
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/filters/filter-rounding-issues-expected.checksum
@@ -0,0 +1 @@
+91eec20f0c0fae5a8e54670101f2beed
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/filters/filter-rounding-issues-expected.png b/LayoutTests/platform/mac/svg/filters/filter-rounding-issues-expected.png
new file mode 100644
index 0000000..711e939
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/filter-rounding-issues-expected.png differ
diff --git a/LayoutTests/svg/filters/filter-rounding-issues-expected.txt b/LayoutTests/svg/filters/filter-rounding-issues-expected.txt
new file mode 100644
index 0000000..f979735
--- /dev/null
+++ b/LayoutTests/svg/filters/filter-rounding-issues-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (9,5) size 11x10
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGResourceFilter {filter} [id="filt"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+ [feFlood flood-color="#FF0000" flood-opacity="1.00"]
+ RenderSVGPath {rect} at (9,5) size 11x10 [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=10.00] [height=10.00]
+ [filter="filt"] RenderSVGResourceFilter {filter} at (9.51,5) size 10x10
diff --git a/LayoutTests/svg/filters/filter-rounding-issues.svg b/LayoutTests/svg/filters/filter-rounding-issues.svg
new file mode 100644
index 0000000..fe75f74
--- /dev/null
+++ b/LayoutTests/svg/filters/filter-rounding-issues.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<filter id="filt" filterUnits="userSpaceOnUse" x="9.51" y="5" width="10" height="10">
+ <feFlood flood-color="red" />
+</filter>
+</defs>
+<rect x="0" y="0" width="10" height="10" filter="url(#filt)"/>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0ac1f13..4e6b228 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-19 Zoltan Herczeg <zherczeg at webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ createImageBuffer fail should be handled in the same way as other fails
+ https://bugs.webkit.org/show_bug.cgi?id=49799
+
+ When createImageBuffer fails (i.e the image width or height is less than
+ 0.5, which is rounded to 0) it just returs with false. Since the m_filter
+ hash map is not updated in this case, the filter image is not drawn.
+
+ Test: svg/filters/filter-rounding-issues.svg
+
+ * rendering/RenderSVGResourceFilter.cpp:
+ (WebCore::RenderSVGResourceFilter::applyResource):
+
2010-11-19 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Andreas Kling.
diff --git a/WebCore/rendering/RenderSVGResourceFilter.cpp b/WebCore/rendering/RenderSVGResourceFilter.cpp
index 50cf68e..60bf450 100644
--- a/WebCore/rendering/RenderSVGResourceFilter.cpp
+++ b/WebCore/rendering/RenderSVGResourceFilter.cpp
@@ -227,8 +227,12 @@ bool RenderSVGResourceFilter::applyResource(RenderObject* object, RenderStyle*,
absoluteDrawingRegion.scale(scale.width(), scale.height());
OwnPtr<ImageBuffer> sourceGraphic;
- if (!SVGImageBufferTools::createImageBuffer(absoluteDrawingRegion, absoluteDrawingRegion, sourceGraphic, ColorSpaceLinearRGB))
+ if (!SVGImageBufferTools::createImageBuffer(absoluteDrawingRegion, absoluteDrawingRegion, sourceGraphic, ColorSpaceLinearRGB)) {
+ ASSERT(!m_filter.contains(object));
+ filterData->savedContext = context;
+ m_filter.set(object, filterData.leakPtr());
return false;
+ }
GraphicsContext* sourceGraphicContext = sourceGraphic->context();
ASSERT(sourceGraphicContext);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list