Bug 94377 - canvas.context.drawImage() should draw SVG at the correct scale.
Summary: canvas.context.drawImage() should draw SVG at the correct scale.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philip Rogers
URL:
Keywords:
Depends on:
Blocks: 93772
  Show dependency treegraph
 
Reported: 2012-08-17 13:21 PDT by Philip Rogers
Modified: 2012-08-20 16:50 PDT (History)
5 users (show)

See Also:


Attachments
Canvas drawImage() should draw SVG at the correct scale. (5.62 KB, patch)
2012-08-17 14:05 PDT, Philip Rogers
no flags Details | Formatted Diff | Diff
Minor cleanup of test--removed spurious setTimeout. (5.56 KB, patch)
2012-08-17 14:59 PDT, Philip Rogers
thorton: review+
thorton: commit-queue-
Details | Formatted Diff | Diff
Fix grammar mistake (5.56 KB, patch)
2012-08-20 14:07 PDT, Philip Rogers
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Fix reviewer's name. (5.55 KB, patch)
2012-08-20 14:38 PDT, Philip Rogers
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Rogers 2012-08-17 13:21:35 PDT
This is the first bug from wkbug.com/93772.

Using drawImage() with an SVG image will incorrectly scale the image as SVG is scaled up for hi resolution displays ("retina", "hidpi") but canvas does not take this into account.

Patch forthcoming.
Comment 1 Philip Rogers 2012-08-17 14:05:42 PDT
Created attachment 159199 [details]
Canvas drawImage() should draw SVG at the correct scale.
Comment 2 Philip Rogers 2012-08-17 14:59:01 PDT
Created attachment 159214 [details]
Minor cleanup of test--removed spurious setTimeout.
Comment 3 Philip Rogers 2012-08-17 15:00:06 PDT
Adding some people who know this area really well.
Comment 4 Tim Horton 2012-08-20 14:02:05 PDT
Comment on attachment 159214 [details]
Minor cleanup of test--removed spurious setTimeout.

View in context: https://bugs.webkit.org/attachment.cgi?id=159214&action=review

This seems right to me!

> Source/WebCore/ChangeLog:8
> +        After this patch, we now take incorporate the page scale in

Grammar ("take incorporate").
Comment 5 Philip Rogers 2012-08-20 14:07:32 PDT
Created attachment 159515 [details]
Fix grammar mistake

Thanks for the quick review.
Comment 6 WebKit Review Bot 2012-08-20 14:34:23 PDT
Comment on attachment 159515 [details]
Fix grammar mistake

Rejecting attachment 159515 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1

Timothy Horton found in /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog does not appear to be a valid reviewer according to committers.py.
ERROR: /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/13548148
Comment 7 Philip Rogers 2012-08-20 14:38:41 PDT
Created attachment 159525 [details]
Fix reviewer's name.
Comment 8 WebKit Review Bot 2012-08-20 16:50:39 PDT
Comment on attachment 159525 [details]
Fix reviewer's name.

Clearing flags on attachment: 159525

Committed r126094: <http://trac.webkit.org/changeset/126094>
Comment 9 WebKit Review Bot 2012-08-20 16:50:45 PDT
All reviewed patches have been landed.  Closing bug.