Closed Bug 384046 Opened 13 years ago Closed 12 years ago
SVGOuter SVGFrame::Reflow should not call Notify Viewport Change unconditionally
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.
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.
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
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.