https://bugs.webkit.org/show_bug.cgi?id=80431
Add a test case for Bug 80431. It renders a 1x1 svg as an image with percent
width/height specified.
Patch by Yong Li <yoli@rim.com> on 2012-04-16
Reviewed by Nikolas Zimmermann.
* svg/as-image/resources/rect-1x1.svg: Added.
* svg/as-image/svg-as-image-with-relative-size-expected.html: Added.
* svg/as-image/svg-as-image-with-relative-size.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114290
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-16 Yong Li <yoli@rim.com>
+
+ RenderImage ignores its percent width/height when setContainerSizeForRenderer
+ https://bugs.webkit.org/show_bug.cgi?id=80431
+
+ Add a test case for Bug 80431. It renders a 1x1 svg as an image with percent
+ width/height specified.
+
+ Reviewed by Nikolas Zimmermann.
+
+ * svg/as-image/resources/rect-1x1.svg: Added.
+ * svg/as-image/svg-as-image-with-relative-size-expected.html: Added.
+ * svg/as-image/svg-as-image-with-relative-size.html: Added.
+
2012-04-16 Vincent Scheib <scheib@chromium.org>
Reverting shader-precision-format.html reftest fix - it only fixed some DBG builders. Marking test failing for those.
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1">
+ <rect x="0.2" y="0.2" width="0.6" height="0.6" fill="green" />
+</svg>
--- /dev/null
+<html>
+ <head>
+ <title>svg-as-image-with-relative-size-expected</title>
+ <style>
+ body {margin: 0px;}
+ </style>
+ </head>
+ <body>
+ <div style="width: 400px; height: 400px; border: 1px solid black;">
+ <svg xmlns="http://www.w3.org/2000/svg">
+ <rect x="40" y="40" width="120" height="120" fill="green"/>
+ </svg>
+ </div>
+ </body>
+</html>
+
--- /dev/null
+<html>
+ <head>
+ <title>svg-as-image-with-relative-size</title>
+ <style>
+ body {margin: 0px;}
+ </style>
+ </head>
+ <body>
+ <div style="width: 400px; height: 400px; border: 1px solid black;">
+ <!-- The following svg has a width of 1px and a height of 1px and draws a rect inside.
+ The rect should still be painted with correct size on the page. -->
+ <img width=50% height=50% src='resources/rect-1x1.svg' />
+ </div>
+ </body>
+</html>
+