Background doesn't fully repaint when body has margins.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Aug 2013 21:29:00 +0000 (21:29 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Aug 2013 21:29:00 +0000 (21:29 +0000)
commitcfa8412e6ffa107e8e49a7c94634aa66e4f7a8bf
tree18c5aa3afb81f3077b9656767d3361a52a46042f
parent79e2cc20f981f2e2e569e75297b73e781059c8fa
Background doesn't fully repaint when body has margins.
https://bugs.webkit.org/show_bug.cgi?id=119033

Reviewed by Simon Fraser.

Ensure that background-color changes do not leave unpainted areas when
body has margins.

Both <body> and <html> background-color get propagated up to the viewport.
If <body> has background-color attribute set, while <html> doesn't, the color is
applied not only on the <body> but on both the <html> and the viewport. However,
it's not enough to mark the RenderView dirty because with tiles backing on,
there could be areas outside of the viewport that need repaint. By marking
the RenderView's graphics layer dirty instead, we ensure that all the related
tiles get marked dirty too and the new background color covers all areas.

Manual test added. When forcing top-level composition on (even with embedded iframe to
make sure we don't do paintsIntoWindow rendering), the test case execution changes so much,
that the repaint rects don't reflect the functionality difference anymore.

.:

Reviewed by Simon Fraser.

* ManualTests/compositing/background-color-change-on-body-with-margin.html: Added.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::reset):
(WebCore::FrameView::layout):
* page/FrameView.h:
(WebCore::FrameView::needsFullRepaint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintRootContents):
(WebCore::RenderView::repaintViewAndCompositedLayers):
* rendering/RenderView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/compositing/background-color-change-on-body-with-margin.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderObjectChildList.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h