This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The Canvas spec states that when using the drawImage() call, If the sx, sy, sw, and sh arguments are omitted, they must default to 0, 0, the image's intrinsic width in image pixels, and the image's intrinsic height in image pixels, respectively. However, for the case that the drawImage(img) is called with img, such that img is a SVG image with a percent height and width, the spec is not clear on what the intrinsic dimension should be. Considering it may be difficult to determine what the intentions of the SVG image creator was, in this case, I recommend the spec indicate that the Canvas width and height should be used.
I believe that the CSSWG recently agreed that percentage dimensions on the SVG root wouldn't create any intrinsic dimensions at all; I don't know whether or not it would create an intrinsic aspect-ratio (depends on what the %s are supposed to be relative to - if they're relative to the same thing, then it can define an intrinsic aspect-ratio).
If such images don't have intrinsic dimensions, what should I say the default intrinsic dimensions are? How about the case of intrinsic ration but no intrinsic dimensions?
I have a general algorithm for resolving intrinsic dimensions into definite dimensions in the Image Values spec <http://dev.w3.org/csswg/css3-images/#sizing>. Figure out just what intrinsic dimensions/ratio are present, and then resolve them using a "default background sizing area" equal to the size of the canvas.
Is there some terminology I can use to just invoke the existing algorithm? I'd rather not duplicate it...
http://krijnhoetmer.nl/irc-logs/whatwg/20110212#l-86
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: see diff given below Rationale: Concurred with reporter's comments.
Checked in as WHATWG revision r6044. Check-in comment: Define how an SVG image gets sized in drawImage() http://html5.org/tools/web-apps-tracker?from=6043&to=6044
mass-move component to LC1