Skip to content
Permalink
Browse files
2010-07-26 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

        Remove the suppression of this bug's test on Chromium. The new fix in WebKit no longer requires
        an update in Chromium, making this test safe to expose.

        * platform/chromium/test_expectations.txt:
2010-07-26  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

        Redo the old fix using a different approach, to avoid regressing
        svg/batik/filters/filterRegions.svg with Chromium on Linux.
        Specifically, handle empty SkBitmap objects by exiting early upon
        encountering unconfigured (i.e. empty) bitmaps.

        No new tests. This bug's old test (svg/filters/filter-empty-g.svg)
        and the above-mentioned regressed test are expected to pass.

        * WebCore/platform/graphics/skia/ImageBufferSkia.cpp:
        (ImageBuffer::ImageBuffer): Undo the old fix.
        (getImageData): The new fix.

Canonical link: https://commits.webkit.org/54931@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Jul 27, 2010
1 parent 135ed15 commit c10e598708d4f0abfdf6a2d083d88b2b02f11f40
Showing with 39 additions and 7 deletions.
  1. +12 −0 LayoutTests/ChangeLog
  2. +0 −3 LayoutTests/platform/chromium/test_expectations.txt
  3. +19 −0 WebCore/ChangeLog
  4. +8 −4 WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -1,3 +1,15 @@
2010-07-26 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

Remove the suppression of this bug's test on Chromium. The new fix in WebKit no longer requires
an update in Chromium, making this test safe to expose.

* platform/chromium/test_expectations.txt:

2010-07-26 Simon Fraser <simon.fraser@apple.com>

Fix a couple of test results after r64095.
@@ -2681,9 +2681,6 @@ 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
@@ -1,3 +1,22 @@
2010-07-26 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

Redo the old fix using a different approach, to avoid regressing
svg/batik/filters/filterRegions.svg with Chromium on Linux.
Specifically, handle empty SkBitmap objects by exiting early upon
encountering unconfigured (i.e. empty) bitmaps.

No new tests. This bug's old test (svg/filters/filter-empty-g.svg)
and the above-mentioned regressed test are expected to pass.

* WebCore/platform/graphics/skia/ImageBufferSkia.cpp:
(ImageBuffer::ImageBuffer): Undo the old fix.
(getImageData): The new fix.

2010-07-26 Simon Fraser <simon.fraser@apple.com>

Reviewed by Dan Bernstein.
@@ -74,10 +74,7 @@ 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?
//
// 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);
m_data.m_canvas.drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);
success = true;
}

@@ -131,6 +128,13 @@ PassRefPtr<ImageData> getImageData(const IntRect& rect, const SkBitmap& bitmap,
const IntSize& size)
{
RefPtr<ImageData> result = ImageData::create(rect.width(), rect.height());

if (bitmap.config() == SkBitmap::kNo_Config) {
// This is an empty SkBitmap that could not be configured.
ASSERT(size.width() == 0 || size.height() == 0);
return result;
}

unsigned char* data = result->data()->data()->data();

if (rect.x() < 0 || rect.y() < 0 ||

0 comments on commit c10e598

Please sign in to comment.