Closed Bug 369992 Opened 17 years ago Closed 17 years ago

Areas previously occupied by a foreignObject aren't repainted

Categories

(Core :: SVG, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jwatt, Assigned: jwatt)

Details

(Keywords: testcase)

Attachments

(2 files, 2 obsolete files)

Attached image testcase
When a foreignObject is moved, the area it previously covered is not repainted. The content of the foreignObject then appears in two places.
Assignee: general → jwatt
So the only possible caller of nsSVGDisplayContainerFrame::UpdateCoveredRegion is nsSVGMarkerFrame::RegionMark. Why doesn't anyone else need to call it? Alternatively, is it still necessary to call it there at all?
Attached patch patch (obsolete) — Splinter Review
Anyway, I guess nsSVGForeignObjectFrame should be doing something more like nsSVGPathGeometryFrame. The current problem is that the old area isn't invalidated before the covered region mRect is updated.
Attachment #254829 - Flags: superreview?(tor)
Attachment #254829 - Flags: review?(tor)
Comment on attachment 254829 [details] [diff] [review]
patch

This will need updating for bug 369911, and NotifyRedrawUnsuspended should probably check the SVG_DIRTY bit.
Attached patch patch v2 (obsolete) — Splinter Review
Yeah, that's a fairly trivial update from Robert's or my side.
Attachment #254829 - Attachment is obsolete: true
Attachment #254835 - Flags: superreview?(tor)
Attachment #254835 - Flags: review?(tor)
Attachment #254829 - Flags: superreview?(tor)
Attachment #254829 - Flags: review?(tor)
Robert landed his fix for bug 369911. Here's the updated patch.
Attachment #254835 - Attachment is obsolete: true
Attachment #254931 - Flags: superreview?(tor)
Attachment #254931 - Flags: review?(tor)
Attachment #254835 - Flags: superreview?(tor)
Attachment #254835 - Flags: review?(tor)
I suspect Bug 358718 is a duplicate of this.
No, that bug is invalid.
Comment on attachment 254931 [details] [diff] [review]
patch v2 updated to tip


> nsSVGForeignObjectFrame::NotifyRedrawUnsuspended()
> {
>-  if (!(mParent->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD))
>-    FlushDirtyRegion();
>+  if (!(mParent->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
>+    if (GetStateBits() & NS_STATE_SVG_DIRTY) {
>+      UpdateGraphic();
>+    }
>+    else {

Prevailing mozilla style is "} else {".
Attachment #254931 - Flags: superreview?(tor)
Attachment #254931 - Flags: superreview+
Attachment #254931 - Flags: review?(tor)
Attachment #254931 - Flags: review+
Checked in with style change.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.