Summary: | Apply preserveAspectRatio and synthesize viewboxes in <img> | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Leif Arne Storset <lstorset> | ||||||||||
Component: | SVG | Assignee: | Nikolas Zimmermann <zimmermann> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | dino, gavin, lstorset, zimmermann | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Bug Depends on: | 47156, 62007 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Leif Arne Storset
2010-02-03 05:06:02 PST
Created attachment 48015 [details]
Images for test case
Created attachment 48016 [details]
Chrome rendering
Created attachment 48017 [details]
Opera rendering
I'm working on this, now that <object>/<embed>/<iframe> intrinsic sizing has been properly implemented. I can reproduce Operas rendering now, finally :-) Also works with zooming, etc - as expected. I still need to fix some related bugs (16167) before I'll upload the patch. 47156 fixes this. Here is a hosted test case: http://phrogz.net/SVG/svg-via-img.html The two <img> tag in this file are fixed size (one using width/height attributes, the other using width/height style) and reference this SVG file: http://phrogz.net/SVG/heart.svg which has 100% height and width. In Safari and Chrome, resizing the browser window causes the aspect ratio of the SVG displayed in the SVG tags to change. In Firefox the images appear unchanging, as intended. Thanks for the additional testcases. Unfortunately the fix did not land yet, I'll update the bug once it happens. Fixed in r98852. Thanks for the testcase! This one http://phrogz.net/SVG/svg-via-img.html is fixed as well. Nice! Thanks for contributing to compat and compliance. |