Changeset 82520 in webkit


Ignore:
Timestamp:
Mar 30, 2011 4:56:12 PM (13 years ago)
Author:
morrita@google.com
Message:

2011-03-30 MORITA Hajime <morrita@google.com>

box-shadow radii stays the same regardless of any spread set
https://bugs.webkit.org/show_bug.cgi?id=49726

  • Added test for multiple inset shadows.
  • Updated wrong expectations which are fixed by this change.
  • Moved some expectation file location to platform/mac because they don't match against non-mac platform results due to the difference between graphics backends.
  • fast/box-shadow/spread-multiple-inset-expected.txt: Added.
  • fast/box-shadow/spread-multiple-inset.html: Added.
  • fast/box-shadow/spread-multiple-normal-expected.checksum: Removed.
  • fast/box-shadow/spread-multiple-normal-expected.png: Removed.
  • fast/box-shadow/spread-multiple-normal.html: Changed to avoid overlapping boxes.
  • platform/mac/fast/box-shadow/spread-expected.checksum:
  • platform/mac/fast/box-shadow/spread-expected.png:
  • platform/mac/fast/box-shadow/spread-multiple-inset-expected.checksum: Added.
  • platform/mac/fast/box-shadow/spread-multiple-inset-expected.png: Added.
  • platform/mac/fast/box-shadow/spread-multiple-normal-expected.checksum: Added.
  • platform/mac/fast/box-shadow/spread-multiple-normal-expected.png: Added.

2011-03-30 MORITA Hajime <morrita@google.com>

Reviewed by Simon Fraser.

box-shadow radii stays the same regardless of any spread set
https://bugs.webkit.org/show_bug.cgi?id=49726

  • Removed special shadowSpread handling path
  • Fixed broken multple inset shadow border computation.

Test: fast/box-shadow/spread-multiple-inset.html

  • rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBoxShadow):
Location:
trunk
Files:
6 added
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82518 r82520  
     12011-03-30  MORITA Hajime  <morrita@google.com>
     2
     3        box-shadow radii stays the same regardless of any spread set
     4        https://bugs.webkit.org/show_bug.cgi?id=49726
     5       
     6        - Added test for multiple inset shadows.
     7        - Updated wrong expectations which are fixed by this change.
     8        - Moved some expectation file location to platform/mac because they don't match
     9          against non-mac platform results due to the difference between graphics backends.
     10
     11        * fast/box-shadow/spread-multiple-inset-expected.txt: Added.
     12        * fast/box-shadow/spread-multiple-inset.html: Added.
     13        * fast/box-shadow/spread-multiple-normal-expected.checksum: Removed.
     14        * fast/box-shadow/spread-multiple-normal-expected.png: Removed.
     15        * fast/box-shadow/spread-multiple-normal.html: Changed to avoid overlapping boxes.
     16        * platform/mac/fast/box-shadow/spread-expected.checksum:
     17        * platform/mac/fast/box-shadow/spread-expected.png:
     18        * platform/mac/fast/box-shadow/spread-multiple-inset-expected.checksum: Added.
     19        * platform/mac/fast/box-shadow/spread-multiple-inset-expected.png: Added.
     20        * platform/mac/fast/box-shadow/spread-multiple-normal-expected.checksum: Added.
     21        * platform/mac/fast/box-shadow/spread-multiple-normal-expected.png: Added.
     22
    1232011-03-25  Matthew Delaney  <mdelaney@apple.com>
    224
  • trunk/LayoutTests/fast/box-shadow/spread-multiple-normal.html

    r74673 r82520  
    1919#negative {
    2020  -webkit-box-shadow: 110px 0px 0px -10px #00f,
    21                       210px 0px 0px -15px #00d,
    22                       310px 0px 0px -20px #00b,
    23                       410px 0px 0px -25px #009;
     21                      260px 0px 0px -15px #00d,
     22                      410px 0px 0px -20px #00b,
     23                      560px 0px 0px -25px #009;
    2424}
    2525
    2626#positive {
    2727  -webkit-box-shadow: 110px 0px 0px  10px #00f,
    28                       210px 0px 0px  15px #00d,
    29                       310px 0px 0px  20px #00b,
    30                       410px 0px 0px  25px #009;
     28                      260px 0px 0px  15px #00d,
     29                      410px 0px 0px  20px #00b,
     30                      560px 0px 0px  25px #009;
    3131}
    3232
  • trunk/LayoutTests/platform/mac/fast/box-shadow/spread-expected.checksum

    r46097 r82520  
    1 44728008ac7dd219e5b6a8a76d1995cb
     1126e608116c5a076b3cb8494a6ab9dfc
  • trunk/Source/WebCore/ChangeLog

    r82516 r82520  
     12011-03-30  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        box-shadow radii stays the same regardless of any spread set
     6        https://bugs.webkit.org/show_bug.cgi?id=49726
     7
     8        - Removed special shadowSpread handling path
     9        - Fixed broken multple inset shadow border computation.
     10
     11        Test: fast/box-shadow/spread-multiple-inset.html
     12
     13        * rendering/RenderBoxModelObject.cpp:
     14        (WebCore::RenderBoxModelObject::paintBoxShadow):
     15
    1162011-03-29  Matthew Delaney  <mdelaney@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r81992 r82520  
    16621662                    context->clipOutRoundedRect(rectToClipOut);
    16631663
    1664                 if (shadowSpread < 0)
    1665                     fillRect.expandRadii(shadowSpread);
    1666 
     1664                fillRect.expandRadii(shadowSpread);
    16671665                context->fillRoundedRect(fillRect, Color::black, s->colorSpace());
    16681666            } else {
     
    17321730            shadowOffset -= extraOffset;
    17331731
    1734             if (hasBorderRadius && shadowSpread > 0)
    1735                 border.shrinkRadii(shadowSpread);
    1736            
    17371732            if (shadow->isWebkitBoxShadow())
    17381733                context->setLegacyShadow(shadowOffset, shadowBlur, shadowColor, s->colorSpace());
     
    17411736
    17421737            RoundedIntRect roundedHole(holeRect, border.radii());
     1738            roundedHole.shrinkRadii(shadowSpread);
    17431739            context->fillRectWithRoundedHole(outerRect, roundedHole, fillColor, s->colorSpace());
    17441740
Note: See TracChangeset for help on using the changeset viewer.