Bug 33988 - Zoom applied to embedded SVG incorrectly
Summary: Zoom applied to embedded SVG incorrectly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-01-21 22:00 PST by mitz
Modified: 2010-01-22 00:20 PST (History)
0 users

See Also:


Attachments
Test case (302 bytes, application/xhtml+xml)
2010-01-21 22:00 PST, mitz
no flags Details
Patch (20.84 KB, patch)
2010-01-21 23:54 PST, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2010-01-21 22:00:29 PST
Created attachment 47176 [details]
Test case

To reproduce, open the attached test case in Safari, select View > Zoom Text Only, and then choose View > Zoom In a few times. Notice that the black HTML div stays put, but the blue SVG square moves and grows in size.

Deselect View > Zoom Text Only. Notice that the blue SVG rectangle is still not at the top left of the black box as it should be.

The issue appears to be that SVGSVGElement::currentScale() was designed for standalone SVG documents, where it’s appropriate to take the Frame’s zoom factor. For embedded SVG, this results in either applying text zoom to SVG (which is not text) or applying the full page zoom factor a second time to SVG.
Comment 1 mitz 2010-01-21 22:01:27 PST
<rdar://problem/7568696>
Comment 2 mitz 2010-01-21 23:54:39 PST
Created attachment 47179 [details]
Patch
Comment 3 mitz 2010-01-22 00:20:57 PST
Fixed in <http://trac.webkit.org/projects/webkit/changeset/53684>.