Title: [114290] trunk/LayoutTests
Revision
114290
Author
commit-qu...@webkit.org
Date
2012-04-16 13:08:02 -0700 (Mon, 16 Apr 2012)

Log Message

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.

Patch by Yong Li <y...@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.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (114289 => 114290)


--- trunk/LayoutTests/ChangeLog	2012-04-16 20:05:31 UTC (rev 114289)
+++ trunk/LayoutTests/ChangeLog	2012-04-16 20:08:02 UTC (rev 114290)
@@ -1,3 +1,17 @@
+2012-04-16  Yong Li  <y...@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  <sch...@chromium.org>
 
         Reverting shader-precision-format.html reftest fix - it only fixed some DBG builders. Marking test failing for those.

Added: trunk/LayoutTests/svg/as-image/resources/rect-1x1.svg (0 => 114290)


--- trunk/LayoutTests/svg/as-image/resources/rect-1x1.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/as-image/resources/rect-1x1.svg	2012-04-16 20:08:02 UTC (rev 114290)
@@ -0,0 +1,6 @@
+<?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>

Added: trunk/LayoutTests/svg/as-image/svg-as-image-with-relative-size-expected.html (0 => 114290)


--- trunk/LayoutTests/svg/as-image/svg-as-image-with-relative-size-expected.html	                        (rev 0)
+++ trunk/LayoutTests/svg/as-image/svg-as-image-with-relative-size-expected.html	2012-04-16 20:08:02 UTC (rev 114290)
@@ -0,0 +1,16 @@
+<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>
+

Added: trunk/LayoutTests/svg/as-image/svg-as-image-with-relative-size.html (0 => 114290)


--- trunk/LayoutTests/svg/as-image/svg-as-image-with-relative-size.html	                        (rev 0)
+++ trunk/LayoutTests/svg/as-image/svg-as-image-with-relative-size.html	2012-04-16 20:08:02 UTC (rev 114290)
@@ -0,0 +1,16 @@
+<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='' />
+    </div>
+  </body>
+</html>
+
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to