Compute image background size when testing for background visibility
https://bugs.webkit.org/show_bug.cgi?id=112313

Reviewed by Simon Fraser.

Source/WebCore: 

We can catch more cases where background is fully obscured.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackground):
                
    Use early returns.
    
(WebCore::RenderBox::backgroundPaintedExtent):
        
    Compute the bounds for image backgrounds.

(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
(WebCore::RenderBox::backgroundIsKnownToBeObscured):
        
    Rename to make clear that the answers are certain to one direction only.

* rendering/RenderBox.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::boxShadowShouldBeAppliedToBackground):
(WebCore::RenderImage::backgroundIsKnownToBeObscured):
* rendering/RenderImage.h:

LayoutTests: 

* fast/repaint/obscured-background-no-repaint.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145786 268f45cc-cd09-0410-ab3c-d52691b4dbfc