<?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>12095</bug_id>
          
          <creation_ts>2007-01-03 07:59:17 -0800</creation_ts>
          <short_desc>Image (and thus SVGImage and PDFDocumentImage) need size-negotiation</short_desc>
          <delta_ts>2012-02-22 07:01:05 -0800</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>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>SVGHitList</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>15638</dependson>
    
    <dependson>15849</dependson>
          <blocked>15373</blocked>
    
    <blocked>21910</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ddkilzer</cc>
    
    <cc>hyatt</cc>
    
    <cc>jeffschiller</cc>
    
    <cc>rindahl</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37310</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-01-03 07:59:17 -0800</bug_when>
    <thetext>Image (and thus SVGImage and PDFDocumentImage) need size-negotiation

Image needs new methods:
virtual FloatSize Image::intrinsicSize()
virtual FloatSize Image::sizeForViewport(const FloatSize&amp; destSize)

(or some equivalent API)
to allow for scalable images to draw filling the viewport.  These would replace the current size() call.  SVGImage would override sizeForViewport() to return the maximum scaled size for that viewport.  Code already exists in SVGImage::size() for doing this kind of sizing, it&apos;s just not wired up (as no destSize is passed in).

SVGImage::draw will now likely require a call to FrameView::setSize, or perhaps that size call has moved to the Page now or one of the clients.  The layout machinery should automatically take care of re-laying out the SVG at the new size.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60360</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-11-05 18:35:16 -0800</bug_when>
    <thetext>Ok, so we need to support percentage based intrinsic widths as part of CSS 2.1:
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width

That will allow us to have &lt;img&gt; and &lt;object&gt; do proper size negotiation.  I&apos;ll file a separate bug on that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62617</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-11-28 16:52:02 -0800</bug_when>
    <thetext>the CSS support bug is filed as bug 15849.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97970</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2008-11-07 14:55:12 -0800</bug_when>
    <thetext>http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>394519</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2011-04-28 10:19:25 -0700</bug_when>
    <thetext>See also Bug 5793.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>418218</commentid>
    <comment_count>5</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2011-06-09 13:15:23 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Ok, so we need to support percentage based intrinsic widths as part of CSS 2.1:
&gt; http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width
&gt; 
&gt; That will allow us to have &lt;img&gt; and &lt;object&gt; do proper size negotiation.  I&apos;ll file a separate bug on that.


Fixed in trunk already for &lt;object&gt;/&lt;iframe&gt;/&lt;embed&gt;. Soon &lt;img&gt;/background-image will switch to the new size negotiation logic as well, see bug 15849.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>561949</commentid>
    <comment_count>6</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-02-22 07:01:05 -0800</bug_when>
    <thetext>Closing this master bug, it has been fixed for SVGImage. Its yet unclear if PDFDocumentImage wants this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>