Closed Bug 379922 Opened 19 years ago Closed 19 years ago

Canvas frame's invalidation no longer correct

Categories

(Core :: Web Painting, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: sharparrow1)

Details

(Keywords: regression)

Attachments

(1 file)

The block in nsCanvasFrame::Reflow which does: 589 // If the child frame was just inserted, then we're responsible for making sure 590 // it repaints 591 if (kidDirty) { 592 // But we have a new child, which will affect our background, so 593 // invalidate our whole rect. 594 // Note: Even though we request to be sized to our child's size, our 595 // scroll frame ensures that we are always the size of the viewport. 596 // Also note: GetPosition() on a CanvasFrame is always going to return 597 // (0, 0). We only want to invalidate GetRect() since GetOverflowRect() 598 // could also include overflow to our top and left (out of the viewport) 599 // which doesn't need to be painted. 600 Invalidate(GetRect(), PR_FALSE); 601 } is no longer correct. In particular, the canvas frame is NOT the size of the viewport anymore. Not sure when this changed. This is most visible with the testcase in bug 71191 on Linux. When I load it, the canvas background doesn't paint green until I move the mouse out of the window...
Flags: blocking1.9?
Keywords: regression
That's possible.. it was some scrollframe change that changed this, yes.
Flags: blocking1.9? → blocking1.9+
We shouldn't be depending on the canvas frame for background invalidation anyway... InvalidateCanvasIfNeeded is supposed to take care of that. I think it's buggy, though.
Okay, so it looks like the canvas frame's invalidation is the only place we handle fixing the background after frame reconstruction. So I guess we should fix it.
Attached patch PatchSplinter Review
Assignee: roc → sharparrow1
Status: NEW → ASSIGNED
Attachment #269921 - Flags: review?(dbaron)
Flags: in-testsuite?
Note that we don't have any testing framework for catching invalidation bugs.
Comment on attachment 269921 [details] [diff] [review] Patch r+sr=dbaron
Attachment #269921 - Flags: superreview+
Attachment #269921 - Flags: review?(dbaron)
Attachment #269921 - Flags: review+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: