<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>37086</bug_id>
          
          <creation_ts>2010-04-05 07:46:31 -0700</creation_ts>
          <short_desc>Explicit size of object tag ignored</short_desc>
          <delta_ts>2011-05-27 11:31:58 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>10526</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Jeff Schiller">jeffschiller</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>208474</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff Schiller">jeffschiller</who>
    <bug_when>2010-04-05 07:46:31 -0700</bug_when>
    <thetext>embed-rect.html:

&lt;!DOCTYPE html&gt;
&lt;html&gt;&lt;body&gt;
  &lt;p&gt;Text above the rect&lt;/p&gt;
  &lt;object width=&quot;400&quot; height=&quot;400&quot; type=&quot;image/svg+xml&quot; data=&quot;huge-rect.svg&quot;/&gt;
  &lt;p&gt;Text below the rect&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;



huge-rect.svg:

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;svg width=&quot;4000&quot; height=&quot;4000&quot; viewBox=&quot;0 0 100 100&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;rect width=&quot;100&quot; height=&quot;100&quot; fill=&quot;blue&quot; stroke-width=&quot;5&quot; stroke=&quot;green&quot;/&gt;
&lt;/svg&gt;


Firefox and Opera properly display the entire rect inside the 400x400 frame of the &lt;object&gt; element.  WebKit does not properly change the size of the rendered rect, only displaying the top-left corner in the 400x400 frame.

See http://www.w3.org/TR/SVG11/coords.html#ViewportSpace :

&quot;The width attribute on the outermost &apos;svg&apos; element establishes the viewport&apos;s width, unless the following conditions are met:

    * the SVG content is a separately stored resource that is embedded by reference (such as the &apos;object&apos; element in [XHTML]), or the SVG content is embedded inline within a containing document;
    * and the referencing element or containing document is styled using CSS [CSS2] or XSL [XSL];
    * and there are CSS-compatible positioning properties [ CSS2-POSN] specified on the referencing element (e.g., the &apos;object&apos; element) or on the containing document&apos;s outermost &apos;svg&apos; element that are sufficient to establish the width of the viewport.

Under these conditions, the positioning properties establish the viewport&apos;s width.&quot;

This means that the width/height of the viewport are established by the object&apos;s width/height attributes and override the SVG&apos;s width/height.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>208475</commentid>
    <comment_count>1</comment_count>
      <attachid>52534</attachid>
    <who name="Jeff Schiller">jeffschiller</who>
    <bug_when>2010-04-05 07:46:57 -0700</bug_when>
    <thetext>Created attachment 52534
Test HTML file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>208476</commentid>
    <comment_count>2</comment_count>
      <attachid>52535</attachid>
    <who name="Jeff Schiller">jeffschiller</who>
    <bug_when>2010-04-05 07:47:15 -0700</bug_when>
    <thetext>Created attachment 52535
Test SVG file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>411362</commentid>
    <comment_count>3</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2011-05-27 05:41:28 -0700</bug_when>
    <thetext>The patch on bug 10526 fixes this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>411584</commentid>
    <comment_count>4</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2011-05-27 11:31:58 -0700</bug_when>
    <thetext>Fixed in r87526.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>52534</attachid>
            <date>2010-04-05 07:46:57 -0700</date>
            <delta_ts>2010-04-05 07:46:57 -0700</delta_ts>
            <desc>Test HTML file</desc>
            <filename>embed-rect.html</filename>
            <type>text/html</type>
            <size>174</size>
            <attacher name="Jeff Schiller">jeffschiller</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPjxib2R5Pgo8cD5UZXh0IGFib3ZlIHRoZSByZWN0PC9wPgo8
b2JqZWN0IHdpZHRoPSI0MDAiIGhlaWdodD0iNDAwIiB0eXBlPSJpbWFnZS9zdmcreG1sIiBkYXRh
PSJodWdlLXJlY3Quc3ZnIi8+CjxwPlRleHQgYmVsb3cgdGhlIHJlY3Q8L3A+CjwvYm9keT48L2h0
bWw+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>52535</attachid>
            <date>2010-04-05 07:47:15 -0700</date>
            <delta_ts>2010-04-05 07:47:15 -0700</delta_ts>
            <desc>Test SVG file</desc>
            <filename>huge-rect.svg</filename>
            <type>image/svg+xml</type>
            <size>197</size>
            <attacher name="Jeff Schiller">jeffschiller</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjQwMDAiIGhlaWdodD0iNDAwMCIgdmll
d0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAg
PHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9ImJsdWUiIHN0cm9rZS13aWR0aD0i
NSIgc3Ryb2tlPSJncmVlbiIvPgo8L3N2Zz4=
</data>

          </attachment>
      

    </bug>

</bugzilla>