Changeset 149918 in webkit


Ignore:
Timestamp:
May 10, 2013 5:59:25 PM (11 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it
https://bugs.webkit.org/show_bug.cgi?id=115840

Source/WebCore:

Reviewed by Antti Koivisto.

In r107836, we moved some box-shadow painting into the paintFillLayer code for performance.
However, in r145680 we started to skip background painting when we know the background is
obscured. This broke shadow painting in some cases.

Fix by always painting the background fill layers if we know that they will also
paint the shadow.

Test: fast/box-shadow/box-shadow-obscured-backgrounds.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintBackground):

LayoutTests:

Reviewed by Antti Koivisto.

  • fast/box-shadow/box-shadow-obscured-backgrounds-expected.html: Added.
  • fast/box-shadow/box-shadow-obscured-backgrounds.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r149915 r149918  
     12013-05-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it
     4        https://bugs.webkit.org/show_bug.cgi?id=115840
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/box-shadow/box-shadow-obscured-backgrounds-expected.html: Added.
     9        * fast/box-shadow/box-shadow-obscured-backgrounds.html: Added.
     10
    1112013-05-10  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r149915 r149918  
     12013-05-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it
     4        https://bugs.webkit.org/show_bug.cgi?id=115840
     5
     6        Reviewed by Antti Koivisto.
     7       
     8        In r107836, we moved some box-shadow painting into the paintFillLayer code for performance.
     9        However, in r145680 we started to skip background painting when we know the background is
     10        obscured. This broke shadow painting in some cases.
     11       
     12        Fix by always painting the background fill layers if we know that they will also
     13        paint the shadow.
     14
     15        Test: fast/box-shadow/box-shadow-obscured-backgrounds.html
     16
     17        * rendering/RenderBox.cpp:
     18        (WebCore::RenderBox::paintBackground):
     19
    1202013-05-10  Simon Fraser  <simon.fraser@apple.com>
    221
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r148921 r149918  
    11411141    if (isBody() && skipBodyBackground(this))
    11421142        return;
    1143     if (backgroundIsKnownToBeObscured())
     1143    if (backgroundIsKnownToBeObscured() && !boxShadowShouldBeAppliedToBackground(bleedAvoidance))
    11441144        return;
    11451145    paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), paintRect, bleedAvoidance);
Note: See TracChangeset for help on using the changeset viewer.