Skip to content
Permalink
Browse files
2010-07-16 Cosmin Truta <ctruta@chromium.org>
        Reviewed by Eric Seidel.

        Some SVGs with empty <g> elements crash Chromium on Linux
        https://bugs.webkit.org/show_bug.cgi?id=41175

        This is a SVG with an empty <g> within a <g>, to which a filter is applied by reference.
        The rendered image is all blank.

        * platform/mac/svg/filters/filter-empty-g-expected.checksum: Added
        * platform/mac/svg/filters/filter-empty-g-expected.png: Added
        * platform/mac/svg/filters/filter-empty-g-expected.txt: Added
        * svg/filters/filter-empty-g.svg: Added
2010-07-16  Cosmin Truta  <ctruta@chromium.org>

        Reviewed by Eric Seidel.

        Some SVGs with empty <g> elements crash Chromium on Linux
        https://bugs.webkit.org/show_bug.cgi?id=41175

        Avoid painting of zero-sized image buffers. Skia can't handle it.

        Test: svg/filters/filter-empty-g.svg

        * WebCore/platform/graphics/skia/ImageBufferSkia.cpp:
        (ImageBuffer::ImageBuffer):

Canonical link: https://commits.webkit.org/54370@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Jul 16, 2010
1 parent 70d26d6 commit 90821c09d911e4af1242ae93338fe4b823b03b1b
@@ -1,3 +1,18 @@
2010-07-16 Cosmin Truta <ctruta@chromium.org>

Reviewed by Eric Seidel.

Some SVGs with empty <g> elements crash Chromium on Linux
https://bugs.webkit.org/show_bug.cgi?id=41175

This is a SVG with an empty <g> within a <g>, to which a filter is applied by reference.
The rendered image is all blank.

* platform/mac/svg/filters/filter-empty-g-expected.checksum: Added
* platform/mac/svg/filters/filter-empty-g-expected.png: Added
* platform/mac/svg/filters/filter-empty-g-expected.txt: Added
* svg/filters/filter-empty-g.svg: Added

2010-07-16 Shinichiro Hamaji <hamaji@chromium.org>

Reviewed by Darin Adler.
@@ -2694,6 +2694,9 @@ BUG_JIANLI LINUX : http/tests/local/formdata/send-form-data-with-sliced-file.htm

BUG33812 SKIP : fast/dom/icon-url-property.html = FAIL

// As long as the Chromium issue 37986 is unresolved, this may crash.
BUG41808 LINUX : svg/filters/filter-empty-g.svg = CRASH PASS

// Failing with webkit roll 57659 -> 57677.
BUG41817 WIN LINUX : fast/backgrounds/svg-as-background-1.html = IMAGE PASS
BUG41817 WIN LINUX : fast/backgrounds/svg-as-background-3.html = IMAGE PASS
@@ -0,0 +1 @@
853de00567d121bea0b7bece66a5d61c
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,11 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderSVGRoot {svg} at (0,0) size 800x600
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGResourceFilter {filter} [id="foo"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
[feGaussianBlur stdDeviation="3.00, 3.00"]
[SourceAlpha]
RenderSVGContainer {g} at (0,0) size 800x600
RenderSVGContainer {g} at (0,0) size 800x600
[filter="foo"] RenderSVGResourceFilter {filter} at (-80,-60) size 960x720
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,3 +1,17 @@
2010-07-16 Cosmin Truta <ctruta@chromium.org>

Reviewed by Eric Seidel.

Some SVGs with empty <g> elements crash Chromium on Linux
https://bugs.webkit.org/show_bug.cgi?id=41175

Avoid painting of zero-sized image buffers. Skia can't handle it.

Test: svg/filters/filter-empty-g.svg

* WebCore/platform/graphics/skia/ImageBufferSkia.cpp:
(ImageBuffer::ImageBuffer):

2010-07-16 Nate Chapin <japhet@chromium.org>

Reviewed by Darin Fisher.
@@ -74,7 +74,10 @@ ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace imageColorSpace, b
// Make the background transparent. It would be nice if this wasn't
// required, but the canvas is currently filled with the magic transparency
// color. Can we have another way to manage this?
m_data.m_canvas.drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);
//
// Avoid drawing on a zero-sized canvas. Skia can't handle it.
if (!size.isZero())
m_data.m_canvas.drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);
success = true;
}

0 comments on commit 90821c0

Please sign in to comment.