Closed Bug 263550 Opened 20 years ago Closed 20 years ago

Respect overflow attribute of svg:svg

Categories

(Core :: SVG, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: tor, Assigned: tor)

Details

Attachments

(1 file, 1 obsolete file)

 
Attached patch overflow attribute (obsolete) — Splinter Review
Attachment #161531 - Flags: review?(scootermorris)
Attachment #161531 - Attachment is obsolete: true
Attachment #161531 - Flags: review?(scootermorris)
Attachment #163476 - Flags: review?(scootermorris)
Comment on attachment 163476 [details] [diff] [review]
add bulletproofing

>Index: layout/svg/base/src/nsSVGInnerSVGFrame.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/layout/svg/base/src/nsSVGInnerSVGFrame.cpp,v
>retrieving revision 1.2
>diff -u -8 -p -r1.2 nsSVGInnerSVGFrame.cpp
>--- layout/svg/base/src/nsSVGInnerSVGFrame.cpp	13 Sep 2004 22:55:43 -0000	1.2
>+++ layout/svg/base/src/nsSVGInnerSVGFrame.cpp	26 Oct 2004 22:18:53 -0000
......
>+    if (svgElement)
>+      svgElement->GetViewBox(getter_AddRefs(viewBox));
>+    if (viewBox)
>+      viewBox->GetAnimVal(getter_AddRefs(vb));
>+    if (vb) {
>+      float x, y, width, height;
>+      vb->GetX(&x);
>+      vb->GetY(&y);
>+      vb->GetWidth(&width);
>+      vb->GetHeight(&height);
>+      nsCOMPtr<nsIDOMSVGMatrix> ctm = GetCanvasTM();
>+      canvas->SetClipRect(ctm, x, y, width, height);
>+    }
>+  }
>+
>

Alternatively,
  if (svgElement) {
    svgElement->GetViewBox(getter_AddRefs(viewBox));
    if (viewBox) {
      viewBox->GetAnimVal(getter_AddRefs(vb));
      if (vb) {
	float x, y, width, height;
	vb->GetX(&x);
	vb->GetY(&y);
	vb->GetWidth(&width);
	vb->GetHeight(&height);
	nsCOMPtr<nsIDOMSVGMatrix> ctm = GetCanvasTM();
	canvas->SetClipRect(ctm, x, y, width, height);
      }
    }
  }

..
Attachment #163476 - Flags: review?(scootermorris) → review+
Checked in, using straightline error test rather than nested blocks.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: