Closed Bug 384046 Opened 13 years ago Closed 12 years ago

nsSVGOuterSVGFrame::Reflow should not call NotifyViewportChange unconditionally

Categories

(Core :: SVG, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
In nsSVGOuterSVGFrame::Reflow we should not call NotifyViewportChange unconditionally. We only need to call NotifyViewportChange if the canvas transform matrix has changed, and that's only the case if we have a viewBox attribute and the computed width/height of the <svg> element has changed.

We should also really tidy up this Reflow method. It casts/QIs mContent to nsSVGSVGElement no less than three times, and it's much harder to follow than it needs to be.
Attachment #267993 - Attachment is obsolete: true
Attachment #268355 - Flags: superreview?(tor)
Attachment #268355 - Flags: review?(tor)
Attachment #268355 - Flags: superreview?(tor)
Attachment #268355 - Flags: superreview+
Attachment #268355 - Flags: review?(tor)
Attachment #268355 - Flags: review+
Checked in.
This caused the following reftests to fail:

  mozilla/layout/reftests/svg/foreignObject-01.svg
  mozilla/layout/reftests/svg/foreignObject-change-transform-01.svg
  mozilla/layout/reftests/svg/foreignObject-display-01.svg
  mozilla/layout/reftests/svg/foreignObject-move-repaint-01.svg
  mozilla/layout/reftests/svg/foreignObject-overflow-01.svg
  mozilla/layout/reftests/svg/nested-viewBox-01.svg

I commented out the optimization that checks for a viewBox attribute in NotifyViewportChange to fix these failures, but I'll need to come back and investigate this.
Depends on: 294086
This bug was just fixed by the fix for bug 294086. That checkin essentially included a modified version of this patch along with a bunch of reftests.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.