Closed
Bug 298098
Opened 20 years ago
Closed 20 years ago
currentScale and currentTranslate should be in viewPort coordinates
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: holger, Assigned: jwatt)
Details
Attachments
(4 files)
|
423 bytes,
image/svg+xml
|
Details | |
|
277 bytes,
image/svg+xml
|
Details | |
|
278 bytes,
image/svg+xml
|
Details | |
|
1.61 KB,
patch
|
tor
:
review+
chofmann
:
approval1.8b3+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050616 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050616 Firefox/1.0+ when setting currentScale, the effect differs to the behaviour of ASV and Batik, in the testcase, setting currentScale=0.5 causes the graphic to be offset by exacly a forth of the viewBox's width . Reproducible: Always Steps to Reproduce: 1.open the testcase 2.compare output to ASV and Batik 3. Actual Results: the red rect becomes visible Expected Results: the red rect should be outside of the viewport this is important to make getScreenCTM() behave correctly when the document is zoomed and paned, see https://bugzilla.mozilla.org/show_bug.cgi?id=293224 getScreenCTM() again is important to get my Zoom and Pan controlls to work. probably also effecting https://bugzilla.mozilla.org/show_bug.cgi?id=163068
| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
ok, i got getScreenCTM working correctly now, and my Zoom and Pan controlls, too. for me it seems, that the discribed behavior is not a bug, but in fact ASV6 and Batik are doing it wrong... i try to find clearification . in the meantime please ignore this bug.
| Reporter | ||
Comment 3•20 years ago
|
||
so it seems, this is indeed a bug in mozilla, the spec says that: If "magnification" is enabled (i.e., zoomAndPan="magnify"), then the effect is as if an extra transformation were placed at the outermost level on the SVG document fragment (i.e., outside the outermost 'svg' element). so currentTransform and currentScale should be in viewPort coordinates, not in viewBox coordinates.
| Reporter | ||
Comment 4•20 years ago
|
||
this should result in a 500x500 svg image, where 1/10th is white, and the rest is black, actual result half of the image is white.
| Reporter | ||
Comment 5•20 years ago
|
||
half of this image should be white, the other half black. actual result, the black rect is outside of the viewPort, the whole image is white.
| Reporter | ||
Updated•20 years ago
|
Summary: currentScale not implemented correctly → currentScale and currentTranslate should be in viewPort coordinates
| Reporter | ||
Comment 6•20 years ago
|
||
could someone please confirm this bug ? this is a very important issue! if not fixed before FF1.1 , it will break any!! script that needs document or element coordinates (drawing , dragndrop, page navigation, gui elements , tooltips , fixed positioned Elements, nonscaling stroke/symbols ...). additionaly people will write scripts that only run in moz, increasing the number of broken SVG files on the net, so please, could someone take care about this Bug ? Jonathan ? tor ?
| Assignee | ||
Comment 7•20 years ago
|
||
Oops, yeah, you're right. Thanks for catching this Holger. The fix should be trivial.
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
| Assignee | ||
Comment 8•20 years ago
|
||
Something like this should do the trick.
| Reporter | ||
Comment 9•20 years ago
|
||
i guessed it would be something simple, thank for taking care, jonathan !
Attachment #187312 -
Flags: review?(tor) → review+
| Assignee | ||
Updated•20 years ago
|
Attachment #187312 -
Flags: approval1.8b3?
Comment 10•20 years ago
|
||
Comment on attachment 187312 [details] [diff] [review] patch a=chofmann
Attachment #187312 -
Flags: approval1.8b3? → approval1.8b3+
| Assignee | ||
Comment 11•20 years ago
|
||
Marking FIXED. Checking in mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp; /cvsroot/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp,v <-- nsSVGOuterSVGFrame.cpp new revision: 1.44; previous revision: 1.43 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 12•20 years ago
|
||
confirming fix, thanks !
You need to log in
before you can comment on or make changes to this bug.
Description
•