Closed
Bug 774133
Opened 12 years ago
Closed 12 years ago
Make nsDisplayTransform take account of zooming for SVG transforms
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Attachments
(1 file, 1 obsolete file)
2.12 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
nsDisplayTransform needs to take account of zooming in the translation components of SVG transforms.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #642451 -
Flags: review?(roc)
Comment on attachment 642451 [details] [diff] [review] patch Review of attachment 642451 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/nsDisplayList.cpp @@ +2784,1 @@ > result = gfx3DMatrix::From2D(svgTransform); Don't we need to scale the whole transform here? @@ +2791,5 @@ > if (hasSVGTransforms && !transformFromSVGParent.IsIdentity()) { > + // Correct translation components for zoom: > + float devPixelsPerCSSPx = aFrame->PresContext()->CSSPixelsToDevPixels(1.0f); > + transformFromSVGParent.x0 *= devPixelsPerCSSPx; > + transformFromSVGParent.y0 *= devPixelsPerCSSPx; Don't we need to scale the whole transform here?
Comment 3•12 years ago
|
||
I don't think we need to, no. Only the 'translation' components of the matrix have units (CSS pixels in this case) and need to be converted, the rest are just scale factors and can't have their units converted. We also shouldn't be converting to dev pixels here, we should instead convert into AppUnits, and then use the passed in aAppUnitsPerPixel to convert into the correct pixel type. Some of the callers to this function are using AppUnitsPerCSSPixel(), and converting to dev pixels will change this behaviour.
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #3) > We also shouldn't be converting to dev pixels here, we should instead > convert into AppUnits, and then use the passed in aAppUnitsPerPixel to > convert into the correct pixel type. Good point.
Attachment #642451 -
Attachment is obsolete: true
Attachment #642451 -
Flags: review?(roc)
Attachment #643317 -
Flags: review?(roc)
Attachment #643317 -
Flags: review?(roc) → review+
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a0746d9a89f
Target Milestone: --- → mozilla17
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4a0746d9a89f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•