[Webkit-unassigned] [Bug 76282] New: ForeignObject content is zoomed two times
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 13 09:33:46 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=76282
Summary: ForeignObject content is zoomed two times
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: SVG
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: fmalita at google.com
CC: zimmermann at kde.org, fmalita at google.com
Created an attachment (id=122441)
--> (https://bugs.webkit.org/attachment.cgi?id=122441&action=review)
FO content zoomed twice
The zoom factor is applied twice to FO-embedded elements. This affects both SVG and HTML content, but for different reasons:
* When embedding foreign SVG content, we end up with two RenderSVGRoot nodes on the render path:
RenderSVGRoot {svg}
RenderSVGForeignObject {foreignObject}
RenderSVGRoot {svg}
RenderSVGRect {rect}
...
Each RenderSVGRoot::paint() applies the zoom factor to its current canvas context - hence the duplicate zooming: http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp#L310 , http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp#L355
* When embedding foreign HTML content, the CSS properties appear to be pre-scaled by the zoom factor (http://trac.webkit.org/browser/trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp#L334), so the zoom introduced by RenderSVGRoot up the tree is compounding the effect.
See the attached test for an example; try zooming in/out a few times and observe how the FO content is scaled twice.
The test works correctly in FF8+.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list