RESOLVED FIXED Bug 12095
Image (and thus SVGImage and PDFDocumentImage) need size-negotiation
https://bugs.webkit.org/show_bug.cgi?id=12095
Summary Image (and thus SVGImage and PDFDocumentImage) need size-negotiation
Eric Seidel (no email)
Reported 2007-01-03 07:59:17 PST
Image (and thus SVGImage and PDFDocumentImage) need size-negotiation Image needs new methods: virtual FloatSize Image::intrinsicSize() virtual FloatSize Image::sizeForViewport(const FloatSize& 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'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.
Attachments
Eric Seidel (no email)
Comment 1 2007-11-05 18:35:16 PST
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 <img> and <object> do proper size negotiation. I'll file a separate bug on that.
Eric Seidel (no email)
Comment 2 2007-11-28 16:52:02 PST
the CSS support bug is filed as bug 15849.
David Kilzer (:ddkilzer)
Comment 4 2011-04-28 10:19:25 PDT
See also Bug 5793.
Nikolas Zimmermann
Comment 5 2011-06-09 13:15:23 PDT
(In reply to comment #1) > 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 <img> and <object> do proper size negotiation. I'll file a separate bug on that. Fixed in trunk already for <object>/<iframe>/<embed>. Soon <img>/background-image will switch to the new size negotiation logic as well, see bug 15849.
Nikolas Zimmermann
Comment 6 2012-02-22 07:01:05 PST
Closing this master bug, it has been fixed for SVGImage. Its yet unclear if PDFDocumentImage wants this.
Note You need to log in before you can comment on or make changes to this bug.