Summary: | REGRESSION (r37146): SVG-as-image is not rendered | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pierre-Olivier Latour <pol> | ||||
Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Major | CC: | eric, hyatt, mitz, simon.fraser, sjoerd | ||||
Priority: | P1 | Keywords: | InRadar, LayoutTestFailure, Regression | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Bug Depends on: | 12095, 21322 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Pierre-Olivier Latour
2008-10-27 18:02:10 PDT
This looks like rdar://problem/6326892 ... which I tracked to http://trac.webkit.org/changeset/37146 Which is hyatt's. Maybe fix: diff --git a/WebCore/svg/graphics/SVGImage.cpp b/WebCore/svg/graphics/SVGImage.cpp index 4427277..33a6d56 100644 --- a/WebCore/svg/graphics/SVGImage.cpp +++ b/WebCore/svg/graphics/SVGImage.cpp @@ -72,6 +72,10 @@ void SVGImage::setContainerSize(const IntSize& containerSize) if (!m_frame || !m_frame->document()) return; + + if (m_frame->view()) + m_frame->view()->resize(containerSize); + SVGSVGElement* rootElement = static_cast<SVGDocument*>(m_frame->document())->rootElement(); if (!rootElement) return; However, LayoutTests/fast/backgrounds/svg-as-background-5.html still renders all red until you cause a repaint to happen. The other tests work. Hm, that change doesn't fix <img src="foo.svg"> Maybe call m_frame->view()->resize(size()); in SVGImage::draw()? Created attachment 26233 [details]
Patch, changelog, fixed testcases
Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-1-expected.checksum M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-1-expected.png M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-2-expected.checksum M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-2-expected.png M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-3-expected.checksum M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-3-expected.png M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-4-expected.checksum M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-4-expected.png M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-6-expected.checksum M LayoutTests/platform/mac/fast/backgrounds/svg-as-background-6-expected.png M LayoutTests/platform/mac/fast/backgrounds/svg-as-mask-expected.checksum M LayoutTests/platform/mac/fast/backgrounds/svg-as-mask-expected.png M LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-image-05-b-expected.checksum M LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-image-05-b-expected.png M WebCore/ChangeLog M WebCore/svg/graphics/SVGImage.cpp Committed r39462 Simon Fraser is my hero. Some more bases that I missed: Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog M LayoutTests/platform/mac/fast/images/svg-as-background-expected.checksum M LayoutTests/platform/mac/fast/images/svg-as-background-expected.png M LayoutTests/platform/mac/fast/images/svg-as-image-expected.checksum M LayoutTests/platform/mac/fast/images/svg-as-image-expected.png M LayoutTests/platform/mac/fast/images/svg-as-relative-image-expected.checksum M LayoutTests/platform/mac/fast/images/svg-as-relative-image-expected.png Committed r39469 Final test fixing: Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog M LayoutTests/platform/mac/fast/borders/svg-as-border-image-2-expected.checksum M LayoutTests/platform/mac/fast/borders/svg-as-border-image-2-expected.png M LayoutTests/platform/mac/fast/borders/svg-as-border-image-expected.checksum M LayoutTests/platform/mac/fast/borders/svg-as-border-image-expected.png Committed r39479 *** Bug 17552 has been marked as a duplicate of this bug. *** |