Closed Bug 377263 Opened 17 years ago Closed 17 years ago

The percentage and fraction values relative to object bounding boxes do not work

Categories

(Core :: SVG, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: jan.pieniadz, Assigned: longsonr)

References

()

Details

Attachments

(2 files, 4 obsolete files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a4pre) Gecko/20070402 Minefield/3.0a4pre
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a4pre) Gecko/2007040204 Minefield/3.0a4pre

The percentage and fraction values relative to object bounding boxes do not work

Reproducible: Always

Steps to Reproduce:
1. Open attached test page.

Actual Results:  
SVG image is rendered incorrectly, as is shown on attached screenshot.
In third row of testing picture the blank rectangles are displayed for
percentage and fraction values.


Expected Results:  
SVG image is rendered correctly - it match to the reference PNG image placed on
the right side of page.

Happens also on PC/Linux
jar added to URL field.
Attached patch patch (obsolete) — Splinter Review
I'm not absolutely sure this is right but it does make the testcase work.
Attachment #261397 - Flags: review?(tor)
Attachment #261397 - Flags: review?(scootermorris)
Attached patch correct patch (obsolete) — Splinter Review
previous patch only worked if scale was 1.
Assignee: general → longsonr
Attachment #261397 - Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #261660 - Flags: review?(tor)
Attachment #261397 - Flags: review?(tor)
Attachment #261397 - Flags: review?(scootermorris)
Attached patch third time lucky (obsolete) — Splinter Review
This one also fixes bug 377399
Attachment #261660 - Attachment is obsolete: true
Attachment #261675 - Flags: review?(tor)
Attachment #261660 - Flags: review?(tor)
apologies for all the required attempts.
Attachment #261675 - Attachment is obsolete: true
Attachment #261677 - Flags: review?(tor)
Attachment #261675 - Flags: review?(tor)
Comment on attachment 261677 [details] [diff] [review]
works better if all files included

>@@ -637,23 +637,21 @@ nsSVGPatternFrame::ConstructCTM(nsIDOMSV
...
>+    float width,height;

Nit: add space.

> nsSVGPatternFrame::GetPatternMatrix(nsIDOMSVGMatrix **aCTM, 
>                                     nsIDOMSVGRect *bbox,
>+                                    nsIDOMSVGRect *callerBBox,
>                                     nsIDOMSVGMatrix *callerCTM)
> {
...
>+  if (type == nsIDOMSVGPatternElement::SVG_PUNITS_OBJECTBOUNDINGBOX) {
>+    float x,y;

Ditto.

>@@ -756,25 +764,28 @@ nsSVGPatternFrame::GetCallerGeometry(nsI
...
>-    float x,y,width,height,xscale,yscale;
>+    float x,y,width,height;

Ditto.

>+    float xpos,ypos,xscale,yscale;

Ditto.

>+    x = (x - xpos) / xscale;
>+    y = (y - ypos)/ yscale;

Ditto.
Attachment #261677 - Flags: review?(tor) → review+
Attachment #261677 - Attachment is obsolete: true
Attachment #261693 - Flags: superreview?(roc)
Attachment #261693 - Flags: superreview?(roc) → superreview+
checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Blocks: 377399
Blocks: 338596
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: