⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 121314 in webkit


Ignore:
Timestamp:
Jun 26, 2012, 8:02:48 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION(r107836): box shadow not drawn for opaque images with an opaque background
https://bugs.webkit.org/show_bug.cgi?id=89958

Patch by Douglas Stockwell <dstockwell@chromium.org> on 2012-06-26
Reviewed by Simon Fraser.

Source/WebCore:

Don't attempt to draw the box shadow as part of the background if the background is
obscured.

Test: fast/box-shadow/image-box-shadow.html

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::boxShadowShouldBeAppliedToBackground):
(WebCore):

  • rendering/RenderImage.h:

(RenderImage):

LayoutTests:

  • fast/box-shadow/image-box-shadow-expected.html: Added.
  • fast/box-shadow/image-box-shadow.html: Added.
  • fast/box-shadow/resources/green-alpha.png: Added.
  • fast/box-shadow/resources/green.jpg: Added.
  • fast/box-shadow/resources/green.png: Added.
Location:
trunk
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r121309 r121314  
     12012-06-26  Douglas Stockwell  <dstockwell@chromium.org>
     2
     3        REGRESSION(r107836): box shadow not drawn for opaque images with an opaque background
     4        https://bugs.webkit.org/show_bug.cgi?id=89958
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/box-shadow/image-box-shadow-expected.html: Added.
     9        * fast/box-shadow/image-box-shadow.html: Added.
     10        * fast/box-shadow/resources/green-alpha.png: Added.
     11        * fast/box-shadow/resources/green.jpg: Added.
     12        * fast/box-shadow/resources/green.png: Added.
     13
    1142012-06-26  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r121313 r121314  
     12012-06-26  Douglas Stockwell  <dstockwell@chromium.org>
     2
     3        REGRESSION(r107836): box shadow not drawn for opaque images with an opaque background
     4        https://bugs.webkit.org/show_bug.cgi?id=89958
     5
     6        Reviewed by Simon Fraser.
     7
     8        Don't attempt to draw the box shadow as part of the background if the background is
     9        obscured.
     10
     11        Test: fast/box-shadow/image-box-shadow.html
     12
     13        * rendering/RenderImage.cpp:
     14        (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground):
     15        (WebCore):
     16        * rendering/RenderImage.h:
     17        (RenderImage):
     18
    1192012-06-26  Nico Weber  <thakis@chromium.org>
    220
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r121127 r121314  
    454454}
    455455
     456bool RenderImage::boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance bleedAvoidance, InlineFlowBox*) const
     457{
     458    if (!RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(bleedAvoidance))
     459        return false;
     460
     461    return !backgroundIsObscured();
     462}
     463
    456464bool RenderImage::backgroundIsObscured() const
    457465{
  • trunk/Source/WebCore/rendering/RenderImage.h

    r120824 r121314  
    9292    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
    9393
     94    virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox*) const OVERRIDE;
     95
    9496    IntSize imageSizeForError(CachedImage*) const;
    9597    void imageDimensionsChanged(bool imageSizeChanged, const IntRect* = 0);
Note: See TracChangeset for help on using the changeset viewer.