Summary: | Unpainted white area appears at the edge of the page when body has bg color | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kinuko Yasuda <kinuko> | ||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | ap, darin, hyatt, jmacaulay, jon, mitz, nic, simon.fraser, tkent, will | ||||||||
Priority: | P2 | Keywords: | HasReduction, InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Kinuko Yasuda
2010-02-12 16:38:18 PST
I'm attaching a workaround patch that worked for me, but am not sure if it does the right thing in the whole repainting flow. It has no tests either for now. Confirmed with Safari 4.0.4 on Mac OS X. Also happens in TOT. Nice to finally see a reduction for this bug. Thank you! Created attachment 48862 [details]
a patch that worked for me
It seems a shame to have to add yet another data member to resolve this, but perhaps this is the best solution. Can we create a regression test or not? Saying “for now” makes me want to do review- and wait for you to create the test. But perhaps that is impractical. (In reply to comment #5) > It seems a shame to have to add yet another data member to resolve this, but > perhaps this is the best solution. > > Can we create a regression test or not? Saying “for now” makes me want to do > review- and wait for you to create the test. But perhaps that is impractical. Well, sorry the patch description may have been inadequate - I tried a bit after sending a patch, but so far have not been able to make up a good test for this one. If you guys think it's ok to have a manual-test only (and if the patch itself looks ok), I'd like it to be review+'ed. (And I've removed the 'for now' part from the attachment description...:)) Comment on attachment 48862 [details]
a patch that worked for me
This sounds like an important bug to fix, given the simplicity (and apparent generality) of the manual test. Like Darin, I wish there was an automated way to test this patch, but one doesn't appear to be forthcoming.
It's a shame this patch has been sitting around for so long.
Comment on attachment 48862 [details]
a patch that worked for me
This is not the right fix. It's just a workaround hack. A real fix would make sure the right repainting happens when the body becomes available (i.e., detect propagation and then make sure the larger area is repainted).
Yeah I suspect so. *** Bug 30258 has been marked as a duplicate of this bug. *** *** Bug 28607 has been marked as a duplicate of this bug. *** *** Bug 27531 has been marked as a duplicate of this bug. *** The likely duplicates above will need to be double-checked when this bug is fixed. *** Bug 40368 has been marked as a duplicate of this bug. *** See also bug 16400. Didn’t realize that this was already in Radar by way of bug 27531. <rdar://problem/7232109> Created attachment 61897 [details]
Repaint the view when the body renderer appears or goes away
Comment on attachment 61897 [details] Repaint the view when the body renderer appears or goes away > Index: WebCore/rendering/RenderObjectChildList.cpp > =================================================================== > --- WebCore/rendering/RenderObjectChildList.cpp (revision 63603) > +++ WebCore/rendering/RenderObjectChildList.cpp (working copy) > @@ -62,9 +62,11 @@ RenderObject* RenderObjectChildList::rem > // disappears gets repainted properly. > if (!owner->documentBeingDestroyed() && fullRemove && oldChild->m_everHadLayout) { > oldChild->setNeedsLayoutAndPrefWidthsRecalc(); > + if (oldChild->isBody()) > + owner->view()->repaint(); > oldChild->repaint(); Shouldn't this get an else rather than arbitrarily repainting oldChild? Otherwise we end up computing the dirty rect for all intersecting elements unnecessarily don't we? (In reply to comment #20) > (From update of attachment 61897 [details]) > > Index: WebCore/rendering/RenderObjectChildList.cpp > > =================================================================== > > --- WebCore/rendering/RenderObjectChildList.cpp (revision 63603) > > +++ WebCore/rendering/RenderObjectChildList.cpp (working copy) > > @@ -62,9 +62,11 @@ RenderObject* RenderObjectChildList::rem > > // disappears gets repainted properly. > > if (!owner->documentBeingDestroyed() && fullRemove && oldChild->m_everHadLayout) { > > oldChild->setNeedsLayoutAndPrefWidthsRecalc(); > > + if (oldChild->isBody()) > > + owner->view()->repaint(); > > oldChild->repaint(); > > Shouldn't this get an else rather than arbitrarily repainting oldChild? Otherwise we end up computing the dirty rect for all intersecting elements unnecessarily don't we? If oldChild is the body renderer, the oldChild->repaint() computes that renderer’s and only that renderer’s repaint rect, a computation whose complexity is linear in the number of ancestors (typically 2 in this case). I can add “else” when landing. Comment on attachment 61897 [details]
Repaint the view when the body renderer appears or goes away
r=me but I'd like to see HTML comments in the test files explaining what the expected results are.
|