Commit 6c5bb944 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2010-03-04 Evan Stade <estade@chromium.org>

        Reviewed by David Levin.

        https://bugs.webkit.org/show_bug.cgi?id=35261
        [skia] crash when attempting to render certain SVGs with Skia

        This test passes if it doesn't crash.

        * platform/mac/Skipped: Skip the test on Mac, where it crashes.
        * svg/custom/tiling-regular-hexagonal-crash-expected.txt: Added.
        * svg/custom/tiling-regular-hexagonal-crash.svg: Added.
2010-03-04  Evan Stade  <estade@chromium.org>

        Reviewed by David Levin.

        https://bugs.webkit.org/show_bug.cgi?id=35261
        [skia] crash when attempting to render certain SVGs

        This fixes the crash, but the SVG still doesn't render properly.

        Test: svg/custom/tiling-regular-hexagonal-crash.svg

        * platform/graphics/skia/ImageSkia.cpp:
        (WebCore::BitmapImageSingleFrameSkia::create): don't return 0 when
        the copy fails; instead return a blank bitmap. The caller doesn't
        check for 0 before dereferencing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 565f2315
2010-03-04 Evan Stade <estade@chromium.org>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=35261
[skia] crash when attempting to render certain SVGs with Skia
This test passes if it doesn't crash.
* platform/mac/Skipped: Skip the test on Mac, where it crashes.
* svg/custom/tiling-regular-hexagonal-crash-expected.txt: Added.
* svg/custom/tiling-regular-hexagonal-crash.svg: Added.
2010-03-03 Diego Gonzalez <diego.gonzalez@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -118,3 +118,7 @@ storage/database-lock-after-reload.html
# Accept header is handled by the browser
http/tests/misc/image-checks-for-accept.html
# Crashes in debug
# https://bugs.webkit.org/show_bug.cgi?id=35631
svg/custom/tiling-regular-hexagonal-crash.svg
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg id="Tiling_Regular_6_3_Hexagonal" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400">
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
// Prevent insertion of any content into the document.
document.documentElement.addEventListener("DOMNodeInserted", function() {
var insertedNode = event.target;
insertedNode.parentNode.removeChild(insertedNode);
}, true);
</script>
<defs>
<polygon id="Hexagon" stroke="#000000" stroke-width="4" points="0,0 52,0 78,45 52,90 0,90 -26,45"/>
<g id="Hex_Group">
<use xlink:href="#Hexagon" transform="translate(-26)"/>
<use xlink:href="#Hexagon" transform="translate(130)"/>
<use xlink:href="#Hexagon" transform="translate(52, -135)"/>
<text x="10" y="30">PASS - didn't crash, bug 36231</text>
</g>
<pattern id="Hex_Pattern" patternUnits="userSpaceOnUse" patternTransform="translate(4, 20) scale(0.5)" width="156" height=" 270">
<use xlink:href="#Hex_Group" fill="#99BBDD" transform="translate(0, 90) scale(1, -1)"/>
<use xlink:href="#Hex_Group" fill="#BB99DD" transform="translate(0, 90)"/>
<use xlink:href="#Hex_Group" fill="#DD99BB" transform="translate(0, 180)"/>
<use xlink:href="#Hexagon" fill="#BB99DD" transform="translate(52, 225)"/>
</pattern>
</defs>
<rect x="2" y="2" height="394" width="394" stroke="#000000" stroke-width="2" fill="url(#Hex_Pattern)"/>
</svg>
2010-03-04 Evan Stade <estade@chromium.org>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=35261
[skia] crash when attempting to render certain SVGs
This fixes the crash, but the SVG still doesn't render properly.
Test: svg/custom/tiling-regular-hexagonal-crash.svg
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::BitmapImageSingleFrameSkia::create): don't return 0 when
the copy fails; instead return a blank bitmap. The caller doesn't
check for 0 before dereferencing.
2010-03-04 Tony Chang <tony@chromium.org>
 
Reviewed by Darin Fisher.
......
......@@ -457,8 +457,7 @@ void BitmapImageSingleFrameSkia::draw(GraphicsContext* ctxt,
PassRefPtr<BitmapImageSingleFrameSkia> BitmapImageSingleFrameSkia::create(const SkBitmap& bitmap)
{
RefPtr<BitmapImageSingleFrameSkia> image(adoptRef(new BitmapImageSingleFrameSkia()));
if (!bitmap.copyTo(&image->m_nativeImage, bitmap.config()))
return 0;
bitmap.copyTo(&image->m_nativeImage, bitmap.config());
return image.release();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment