Source/WebCore/ChangeLog

 12012-10-22 Branimir Lambov <blambov@google.com>
 2
 3 [SVG] SVGPreserveAspectRatio::transformRect is done incorrectly in 'slice' mode
 4 https://bugs.webkit.org/show_bug.cgi?id=99984
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Corrects SVGPreserveAspectRatio::transformRect in 'slice' mode, which was
 9 calculating offsets in the source rectangle using the location of the destination.
 10
 11 New tests: svg/filters/feImage-preserveAspectRatio-all.svg
 12 svg/as-image/image-preserveAspectRatio-all.svg
 13
 14 * svg/SVGPreserveAspectRatio.cpp:
 15 (WebCore::SVGPreserveAspectRatio::transformRect):
 16 Changed source location calculations to use srcRect instead of destRect.
 17
 18
1192012-12-05 Michael Pruett <michael@68k.org>
220
321 IndexedDB: Implement IndexedDB bindings for JSC

Source/WebCore/svg/SVGPreserveAspectRatio.cpp

@@void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRe
220220 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
221221 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
222222 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
223  srcRect.setY(destRect.y() + imageSize.height() / 2 - srcRect.height() / 2);
 223 srcRect.setY(srcRect.y() + imageSize.height() / 2 - srcRect.height() / 2);
224224 break;
225225 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMAX:
226226 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
227227 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
228  srcRect.setY(destRect.y() + imageSize.height() - srcRect.height());
 228 srcRect.setY(srcRect.y() + imageSize.height() - srcRect.height());
229229 break;
230230 default:
231231 break;

@@void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRe
239239 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
240240 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
241241 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
242  srcRect.setX(destRect.x() + imageSize.width() / 2 - srcRect.width() / 2);
 242 srcRect.setX(srcRect.x() + imageSize.width() / 2 - srcRect.width() / 2);
243243 break;
244244 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMIN:
245245 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
246246 case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
247  srcRect.setX(destRect.x() + imageSize.width() - srcRect.width());
 247 srcRect.setX(srcRect.x() + imageSize.width() - srcRect.width());
248248 break;
249249 default:
250250 break;

LayoutTests/ChangeLog

 12012-10-22 Branimir Lambov <blambov@google.com>
 2
 3 [SVG] SVGPreserveAspectRatio::transformRect is done incorrectly in 'slice' mode
 4 https://bugs.webkit.org/show_bug.cgi?id=99984
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Corrects SVGPreserveAspectRatio::transformRect in 'slice' mode, which was
 9 calculating offsets in the source rectangle using the location of the destination.
 10
 11 * platform/chromium/TestExpectations:
 12 * platform/efl/TestExpectations:
 13 * platform/mac/TestExpectations:
 14 * platform/qt/TestExpectations:
 15 * svg/filters/feImage-preserveAspectRatio-all.svg: New test.
 16 * svg/as-image/image-preserveAspectRatio-all.svg: New test.
 17
1182012-12-05 Antoine Quint <graouts@apple.com>
219
320 TextTrackCue's .endTime property should fire a TypeError when NaN is assigned

LayoutTests/platform/chromium-linux/svg/as-image/image-preserveAspectRatio-all-expected.png


Added

170cecc12428d1e538060ad9c701db9b

LayoutTests/platform/chromium-linux/svg/as-image/image-preserveAspectRatio-all-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (0,0) size 800x400
 4 RenderSVGRoot {svg} at (0,0) size 800x333
 5 RenderSVGRect {rect} at (0,0) size 800x333 [stroke={[type=SOLID] [color=#0000FF]}] [x=1.00] [y=1.00] [width=1198.00] [height=498.00]
 6 RenderSVGContainer {g} at (33,16) size 734x285
 7 RenderSVGImage {image} at (33,16) size 67x134
 8 RenderSVGRect {rect} at (33,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=50.00] [y=25.00] [width=100.00] [height=200.00]
 9 RenderSVGImage {image} at (33,216) size 134x68
 10 RenderSVGRect {rect} at (33,216) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=50.00] [y=325.00] [width=200.00] [height=100.00]
 11 RenderSVGImage {image} at (200,16) size 67x134
 12 RenderSVGRect {rect} at (199,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=300.00] [y=25.00] [width=100.00] [height=200.00]
 13 RenderSVGImage {image} at (280,16) size 67x134
 14 RenderSVGRect {rect} at (279,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=420.00] [y=25.00] [width=100.00] [height=200.00]
 15 RenderSVGImage {image} at (360,16) size 67x134
 16 RenderSVGRect {rect} at (359,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=540.00] [y=25.00] [width=100.00] [height=200.00]
 17 RenderSVGImage {image} at (466,16) size 134x68
 18 RenderSVGRect {rect} at (466,16) size 135x68 [stroke={[type=SOLID] [color=#008000]}] [x=700.00] [y=25.00] [width=200.00] [height=100.00]
 19 RenderSVGImage {image} at (466,96) size 134x68
 20 RenderSVGRect {rect} at (466,96) size 135x68 [stroke={[type=SOLID] [color=#008000]}] [x=700.00] [y=145.00] [width=200.00] [height=100.00]
 21 RenderSVGImage {image} at (466,176) size 134x68
 22 RenderSVGRect {rect} at (466,176) size 135x68 [stroke={[type=SOLID] [color=#008000]}] [x=700.00] [y=265.00] [width=200.00] [height=100.00]
 23 RenderSVGImage {image} at (200,166) size 67x134
 24 RenderSVGRect {rect} at (199,166) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=300.00] [y=250.00] [width=100.00] [height=200.00]
 25 RenderSVGImage {image} at (280,166) size 67x134
 26 RenderSVGRect {rect} at (279,166) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=420.00] [y=250.00] [width=100.00] [height=200.00]
 27 RenderSVGImage {image} at (360,166) size 67x134
 28 RenderSVGRect {rect} at (359,166) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=540.00] [y=250.00] [width=100.00] [height=200.00]
 29 RenderSVGImage {image} at (633,16) size 134x68
 30 RenderSVGRect {rect} at (633,16) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=950.00] [y=25.00] [width=200.00] [height=100.00]
 31 RenderSVGImage {image} at (633,96) size 134x68
 32 RenderSVGRect {rect} at (633,96) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=950.00] [y=145.00] [width=200.00] [height=100.00]
 33 RenderSVGImage {image} at (633,176) size 134x68
 34 RenderSVGRect {rect} at (633,176) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=950.00] [y=265.00] [width=200.00] [height=100.00]

LayoutTests/platform/chromium-linux/svg/filters/feImage-preserveAspectRatio-all-expected.png


Added

a7e1db875aebae01149a30a06bfe6c5b

LayoutTests/platform/chromium-linux/svg/filters/feImage-preserveAspectRatio-all-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (0,0) size 800x400
 4 RenderSVGRoot {svg} at (0,0) size 800x333
 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0
 6 RenderSVGResourceFilter {filter} [id="none"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
 7 [feImage image-size="100x100"]
 8 RenderSVGResourceFilter {filter} [id="slice_mid"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
 9 [feImage image-size="100x100"]
 10 RenderSVGResourceFilter {filter} [id="slice_max"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
 11 [feImage image-size="100x100"]
 12 RenderSVGResourceFilter {filter} [id="slice_min"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
 13 [feImage image-size="100x100"]
 14 RenderSVGResourceFilter {filter} [id="meet_mid"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
 15 [feImage image-size="100x100"]
 16 RenderSVGResourceFilter {filter} [id="meet_max"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
 17 [feImage image-size="100x100"]
 18 RenderSVGResourceFilter {filter} [id="meet_min"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
 19 [feImage image-size="100x100"]
 20 RenderSVGRect {rect} at (0,0) size 800x333 [stroke={[type=SOLID] [color=#0000FF]}] [x=1.00] [y=1.00] [width=1198.00] [height=498.00]
 21 RenderSVGContainer {g} at (20,3) size 760x311
 22 RenderSVGRect {rect} at (26,3) size 81x161 [fill={[type=SOLID] [color=#000000]}] [x=50.00] [y=25.00] [width=100.00] [height=200.00]
 23 [filter="none"] RenderSVGResourceFilter {filter} at (40,5) size 120x240
 24 RenderSVGRect {rect} at (33,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=50.00] [y=25.00] [width=100.00] [height=200.00]
 25 RenderSVGRect {rect} at (20,210) size 160x80 [fill={[type=SOLID] [color=#000000]}] [x=50.00] [y=325.00] [width=200.00] [height=100.00]
 26 [filter="none"] RenderSVGResourceFilter {filter} at (30,315) size 240x120
 27 RenderSVGRect {rect} at (33,216) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=50.00] [y=325.00] [width=200.00] [height=100.00]
 28 RenderSVGRect {rect} at (193,3) size 81x161 [fill={[type=SOLID] [color=#000000]}] [x=300.00] [y=25.00] [width=100.00] [height=200.00]
 29 [filter="meet_min"] RenderSVGResourceFilter {filter} at (290,5) size 120x240
 30 RenderSVGRect {rect} at (199,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=300.00] [y=25.00] [width=100.00] [height=200.00]
 31 RenderSVGRect {rect} at (273,3) size 81x161 [fill={[type=SOLID] [color=#000000]}] [x=420.00] [y=25.00] [width=100.00] [height=200.00]
 32 [filter="meet_mid"] RenderSVGResourceFilter {filter} at (410,5) size 120x240
 33 RenderSVGRect {rect} at (279,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=420.00] [y=25.00] [width=100.00] [height=200.00]
 34 RenderSVGRect {rect} at (353,3) size 81x161 [fill={[type=SOLID] [color=#000000]}] [x=540.00] [y=25.00] [width=100.00] [height=200.00]
 35 [filter="meet_max"] RenderSVGResourceFilter {filter} at (530,5) size 120x240
 36 RenderSVGRect {rect} at (359,16) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=540.00] [y=25.00] [width=100.00] [height=200.00]
 37 RenderSVGRect {rect} at (453,10) size 161x80 [fill={[type=SOLID] [color=#000000]}] [x=700.00] [y=25.00] [width=200.00] [height=100.00]
 38 [filter="meet_min"] RenderSVGResourceFilter {filter} at (680,15) size 240x120
 39 RenderSVGRect {rect} at (466,16) size 135x68 [stroke={[type=SOLID] [color=#008000]}] [x=700.00] [y=25.00] [width=200.00] [height=100.00]
 40 RenderSVGRect {rect} at (453,90) size 161x80 [fill={[type=SOLID] [color=#000000]}] [x=700.00] [y=145.00] [width=200.00] [height=100.00]
 41 [filter="meet_mid"] RenderSVGResourceFilter {filter} at (680,135) size 240x120
 42 RenderSVGRect {rect} at (466,96) size 135x68 [stroke={[type=SOLID] [color=#008000]}] [x=700.00] [y=145.00] [width=200.00] [height=100.00]
 43 RenderSVGRect {rect} at (453,170) size 161x80 [fill={[type=SOLID] [color=#000000]}] [x=700.00] [y=265.00] [width=200.00] [height=100.00]
 44 [filter="meet_max"] RenderSVGResourceFilter {filter} at (680,255) size 240x120
 45 RenderSVGRect {rect} at (466,176) size 135x68 [stroke={[type=SOLID] [color=#008000]}] [x=700.00] [y=265.00] [width=200.00] [height=100.00]
 46 RenderSVGRect {rect} at (193,153) size 81x161 [fill={[type=SOLID] [color=#000000]}] [x=300.00] [y=250.00] [width=100.00] [height=200.00]
 47 [filter="slice_min"] RenderSVGResourceFilter {filter} at (290,230) size 120x240
 48 RenderSVGRect {rect} at (199,166) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=300.00] [y=250.00] [width=100.00] [height=200.00]
 49 RenderSVGRect {rect} at (273,153) size 81x161 [fill={[type=SOLID] [color=#000000]}] [x=420.00] [y=250.00] [width=100.00] [height=200.00]
 50 [filter="slice_mid"] RenderSVGResourceFilter {filter} at (410,230) size 120x240
 51 RenderSVGRect {rect} at (279,166) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=420.00] [y=250.00] [width=100.00] [height=200.00]
 52 RenderSVGRect {rect} at (353,153) size 81x161 [fill={[type=SOLID] [color=#000000]}] [x=540.00] [y=250.00] [width=100.00] [height=200.00]
 53 [filter="slice_max"] RenderSVGResourceFilter {filter} at (530,230) size 120x240
 54 RenderSVGRect {rect} at (359,166) size 68x135 [stroke={[type=SOLID] [color=#008000]}] [x=540.00] [y=250.00] [width=100.00] [height=200.00]
 55 RenderSVGRect {rect} at (620,10) size 160x80 [fill={[type=SOLID] [color=#000000]}] [x=950.00] [y=25.00] [width=200.00] [height=100.00]
 56 [filter="slice_min"] RenderSVGResourceFilter {filter} at (930,15) size 240x120
 57 RenderSVGRect {rect} at (633,16) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=950.00] [y=25.00] [width=200.00] [height=100.00]
 58 RenderSVGRect {rect} at (620,90) size 160x80 [fill={[type=SOLID] [color=#000000]}] [x=950.00] [y=145.00] [width=200.00] [height=100.00]
 59 [filter="slice_mid"] RenderSVGResourceFilter {filter} at (930,135) size 240x120
 60 RenderSVGRect {rect} at (633,96) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=950.00] [y=145.00] [width=200.00] [height=100.00]
 61 RenderSVGRect {rect} at (620,170) size 160x80 [fill={[type=SOLID] [color=#000000]}] [x=950.00] [y=265.00] [width=200.00] [height=100.00]
 62 [filter="slice_max"] RenderSVGResourceFilter {filter} at (930,255) size 240x120
 63 RenderSVGRect {rect} at (633,176) size 134x68 [stroke={[type=SOLID] [color=#008000]}] [x=950.00] [y=265.00] [width=200.00] [height=100.00]

LayoutTests/platform/chromium/TestExpectations

@@webkit.org/b/102542 [ Linux Mac Win ] compositing/checkerboard.html [ ImageOnlyF
41854185
41864186webkit.org/b/102724 svg/carto.net/colourpicker.svg [ ImageOnlyFailure ]
41874187
 4188# Rebaseline for SVG preserve aspect ratio fix.
 4189webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html [ Pass ImageOnlyFailure ]
 4190webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html [ Pass ImageOnlyFailure ]
 4191
41884192# Fails until we enable the Resource Timing API.
41894193webkit.org/b/61138 http/tests/w3c/webperf/submission/resource-timing [ Skip ]
41904194

LayoutTests/platform/efl/TestExpectations

@@webkit.org/b/23166 ietestcenter/css3/bordersbackgrounds/border-radius-clip-002.h
15351535# New inspector/profiler/memory-instrumentation-canvas.html fails on JSC platforms
15361536webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html
15371537
 1538# Rebaseline for SVG preserve aspect ratio fix.
 1539webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html [ Pass ImageOnlyFailure ]
 1540webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html [ Pass ImageOnlyFailure ]
 1541
15381542# EFL port does not support Emacs commands.
15391543Bug(EFL) editing/pasteboard/emacs-cntl-y-001.html [ Missing ]
15401544Bug(EFL) editing/pasteboard/emacs-ctrl-a-k-y.html [ Missing ]

LayoutTests/platform/mac/TestExpectations

@@webkit.org/b/95959 css3/device-adapt [ Skip ]
11921192webkit.org/b/27684 compositing/text-on-scaled-layer.html [ ImageOnlyFailure ]
11931193webkit.org/b/27684 compositing/text-on-scaled-surface.html [ ImageOnlyFailure ]
11941194
 1195# Rebaseline for SVG preserve aspect ratio fix.
 1196webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html [ Pass ImageOnlyFailure ]
 1197webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html [ Pass ImageOnlyFailure ]
 1198
11951199# Asserts in MessagePort::contextDestroyed, but the assert usually gets attributed to later tests.
11961200webkit.org/b/94458 fast/events/message-port-constructor-for-deleted-document.html
11971201

LayoutTests/platform/qt/TestExpectations

@@webkit.org/b/99756 fast/events/touch/touch-slider.html [ Failure ]
23532353
23542354webkit.org/b/93247 [ Debug ] fast/lists/list-marker-remove-crash.html [ Crash ]
23552355
 2356# Rebaseline for SVG preserve aspect ratio fix.
 2357webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html [ Pass ImageOnlyFailure ]
 2358webkit.org/b/99984 svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html [ Pass ImageOnlyFailure ]
 2359
23562360# This has always failed on Qt - exposed by bug 89826
23572361webkit.org/b/94004 css2.1/20110323/c541-word-sp-000.htm [ ImageOnlyFailure ]
23582362

LayoutTests/svg/as-image/image-preserveAspectRatio-all.svg

 1<svg width="800" height="400" viewBox="0 0 1200 600"
 2 xmlns="http://www.w3.org/2000/svg"
 3 xmlns:xlink="http://www.w3.org/1999/xlink">
 4 <title>Example feImage - Examples of feImage use</title>
 5 <desc>Testing all preserveAspectRatio options for feImage.
 6 See bug 99984.</desc>
 7 <rect fill="none" stroke="blue"
 8 x="1" y="1" width="1198" height="498"/>
 9 <g>
 10 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="50" y="25" width="100" height="200" preserveAspectRatio="none"/>
 11 <rect x="50" y="25" width="100" height="200" fill="none" stroke="green"/>
 12 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="50" y="325" width="200" height="100" preserveAspectRatio="none"/>
 13 <rect x="50" y="325" width="200" height="100" fill="none" stroke="green"/>
 14
 15 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="300" y="25" width="100" height="200" preserveAspectRatio="xMinYMin meet"/>
 16 <rect x="300" y="25" width="100" height="200" fill="none" stroke="green"/>
 17 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="420" y="25" width="100" height="200" preserveAspectRatio="xMidYMid meet"/>
 18 <rect x="420" y="25" width="100" height="200" fill="none" stroke="green"/>
 19 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="540" y="25" width="100" height="200" preserveAspectRatio="xMaxYMax meet"/>
 20 <rect x="540" y="25" width="100" height="200" fill="none" stroke="green"/>
 21
 22 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="700" y="25" width="200" height="100" preserveAspectRatio="xMinYMin meet"/>
 23 <rect x="700" y="25" width="200" height="100" fill="none" stroke="green"/>
 24 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="700" y="145" width="200" height="100" preserveAspectRatio="xMidYMid meet"/>
 25 <rect x="700" y="145" width="200" height="100" fill="none" stroke="green"/>
 26 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="700" y="265" width="200" height="100" preserveAspectRatio="xMaxYMax meet"/>
 27 <rect x="700" y="265" width="200" height="100" fill="none" stroke="green"/>
 28
 29 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="300" y="250" width="100" height="200" preserveAspectRatio="xMinYMin slice"/>
 30 <rect x="300" y="250" width="100" height="200" fill="none" stroke="green"/>
 31 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="420" y="250" width="100" height="200" preserveAspectRatio="xMidYMid slice"/>
 32 <rect x="420" y="250" width="100" height="200" fill="none" stroke="green"/>
 33 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="540" y="250" width="100" height="200" preserveAspectRatio="xMaxYMax slice"/>
 34 <rect x="540" y="250" width="100" height="200" fill="none" stroke="green"/>
 35
 36 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="950" y="25" width="200" height="100" preserveAspectRatio="xMinYMin slice"/>
 37 <rect x="950" y="25" width="200" height="100" fill="none" stroke="green"/>
 38 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="950" y="145" width="200" height="100" preserveAspectRatio="xMidYMid slice"/>
 39 <rect x="950" y="145" width="200" height="100" fill="none" stroke="green"/>
 40 <image xlink:href="../W3C-SVG-1.1/resources/smiley.png" x="950" y="265" width="200" height="100" preserveAspectRatio="xMaxYMax slice"/>
 41 <rect x="950" y="265" width="200" height="100" fill="none" stroke="green"/>
 42 </g>
 43</svg>

LayoutTests/svg/filters/feImage-preserveAspectRatio-all.svg

 1<svg width="800" height="400" viewBox="0 0 1200 600"
 2 xmlns="http://www.w3.org/2000/svg"
 3 xmlns:xlink="http://www.w3.org/1999/xlink">
 4 <title>Example feImage - Examples of feImage use</title>
 5 <desc>Testing all preserveAspectRatio options for feImage.
 6 See bug 99984.</desc>
 7 <defs>
 8 <filter id="none" primitiveUnits="objectBoundingBox">
 9 <feImage xlink:href="../W3C-SVG-1.1/resources/smiley.png"
 10 x="0" y="0" width="100%" height="100%"
 11 preserveAspectRatio="none"/>
 12 </filter>
 13 <filter id="slice_mid" primitiveUnits="objectBoundingBox">
 14 <feImage xlink:href="../W3C-SVG-1.1/resources/smiley.png"
 15 x="0" y="0" width="100%" height="100%"
 16 preserveAspectRatio="xMidYMid slice"/>
 17 </filter>
 18 <filter id="slice_max" primitiveUnits="objectBoundingBox">
 19 <feImage xlink:href="../W3C-SVG-1.1/resources/smiley.png"
 20 x="0" y="0" width="100%" height="100%"
 21 preserveAspectRatio="xMaxYMax slice"/>
 22 </filter>
 23 <filter id="slice_min" primitiveUnits="objectBoundingBox">
 24 <feImage xlink:href="../W3C-SVG-1.1/resources/smiley.png"
 25 x="0" y="0" width="100%" height="100%"
 26 preserveAspectRatio="xMinYMin slice"/>
 27 </filter>
 28 <filter id="meet_mid" primitiveUnits="objectBoundingBox">
 29 <feImage xlink:href="../W3C-SVG-1.1/resources/smiley.png"
 30 x="0" y="0" width="100%" height="100%"
 31 preserveAspectRatio="xMidYMid meet"/>
 32 </filter>
 33 <filter id="meet_max" primitiveUnits="objectBoundingBox">
 34 <feImage xlink:href="../W3C-SVG-1.1/resources/smiley.png"
 35 x="0" y="0" width="100%" height="100%"
 36 preserveAspectRatio="xMaxYMax meet"/>
 37 </filter>
 38 <filter id="meet_min" primitiveUnits="objectBoundingBox">
 39 <feImage xlink:href="../W3C-SVG-1.1/resources/smiley.png"
 40 x="0" y="0" width="100%" height="100%"
 41 preserveAspectRatio="xMinYMin meet"/>
 42 </filter>
 43 </defs>
 44 <rect fill="none" stroke="blue"
 45 x="1" y="1" width="1198" height="498"/>
 46 <g>
 47 <rect x="50" y="25" width="100" height="200" filter="url(#none)"/>
 48 <rect x="50" y="25" width="100" height="200" fill="none" stroke="green"/>
 49 <rect x="50" y="325" width="200" height="100" filter="url(#none)"/>
 50 <rect x="50" y="325" width="200" height="100" fill="none" stroke="green"/>
 51
 52 <rect x="300" y="25" width="100" height="200" filter="url(#meet_min)"/>
 53 <rect x="300" y="25" width="100" height="200" fill="none" stroke="green"/>
 54 <rect x="420" y="25" width="100" height="200" filter="url(#meet_mid)"/>
 55 <rect x="420" y="25" width="100" height="200" fill="none" stroke="green"/>
 56 <rect x="540" y="25" width="100" height="200" filter="url(#meet_max)"/>
 57 <rect x="540" y="25" width="100" height="200" fill="none" stroke="green"/>
 58
 59 <rect x="700" y="25" width="200" height="100" filter="url(#meet_min)"/>
 60 <rect x="700" y="25" width="200" height="100" fill="none" stroke="green"/>
 61 <rect x="700" y="145" width="200" height="100" filter="url(#meet_mid)"/>
 62 <rect x="700" y="145" width="200" height="100" fill="none" stroke="green"/>
 63 <rect x="700" y="265" width="200" height="100" filter="url(#meet_max)"/>
 64 <rect x="700" y="265" width="200" height="100" fill="none" stroke="green"/>
 65
 66 <rect x="300" y="250" width="100" height="200" filter="url(#slice_min)"/>
 67 <rect x="300" y="250" width="100" height="200" fill="none" stroke="green"/>
 68 <rect x="420" y="250" width="100" height="200" filter="url(#slice_mid)"/>
 69 <rect x="420" y="250" width="100" height="200" fill="none" stroke="green"/>
 70 <rect x="540" y="250" width="100" height="200" filter="url(#slice_max)"/>
 71 <rect x="540" y="250" width="100" height="200" fill="none" stroke="green"/>
 72
 73 <rect x="950" y="25" width="200" height="100" filter="url(#slice_min)"/>
 74 <rect x="950" y="25" width="200" height="100" fill="none" stroke="green"/>
 75 <rect x="950" y="145" width="200" height="100" filter="url(#slice_mid)"/>
 76 <rect x="950" y="145" width="200" height="100" fill="none" stroke="green"/>
 77 <rect x="950" y="265" width="200" height="100" filter="url(#slice_max)"/>
 78 <rect x="950" y="265" width="200" height="100" fill="none" stroke="green"/>
 79 </g>
 80</svg>