Background doesn't fully repaint when body has margins.
[WebKit-https.git] / Source / WebCore / rendering / RenderView.cpp
index 251659fc10fbe7decb4b395c00fbd938a551aa87..b29122779f57c2e38c8485825078b0d5da2d63e1 100644 (file)
@@ -526,6 +526,17 @@ bool RenderView::shouldRepaint(const LayoutRect& r) const
     return true;
 }
 
+void RenderView::repaintRootContents()
+{
+#if USE(ACCELERATED_COMPOSITING)
+    if (layer()->isComposited()) {
+        layer()->setBackingNeedsRepaint();
+        return;
+    }
+#endif
+    repaint();
+}
+
 void RenderView::repaintViewRectangle(const LayoutRect& ur, bool immediate) const
 {
     if (!shouldRepaint(ur))
@@ -567,8 +578,7 @@ void RenderView::repaintRectangleInViewAndCompositedLayers(const LayoutRect& ur,
 
 void RenderView::repaintViewAndCompositedLayers()
 {
-    repaint();
-    
+    repaintRootContents();
 #if USE(ACCELERATED_COMPOSITING)
     if (compositor()->inCompositingMode())
         compositor()->repaintCompositedLayers();