Changeset 148049 in webkit


Ignore:
Timestamp:
Apr 9, 2013 1:52:55 PM (11 years ago)
Author:
Simon Fraser
Message:

Repaint rect too small on elements with shadows
https://bugs.webkit.org/show_bug.cgi?id=114225

Source/WebCore:

Reviewed by Dain Adler.

We assumed that shadows (box-shadow, text-shadow, svg shadows)
only required inflating the repaint rect by the blur radius of
the shadow. However, this is incorrect; the shadow can extend
further, which resulted in clipped or incorrectly invalidated
shadows.

Fix by disambiguating the blur radius (which is 2x the standard
deviation of the Gaussian distribution used to generate the blur),
from the painting extent, which is how far the shadow visually
projects. Using a 1.4 multiplier of the blur radius is a good
approximation for the painting extent.

Renamed ShadowData::blur() to ShadowData::radius(), and added
ShadowData::paintingExtent(). Use the latter in all places
which relate to invalidation.

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

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::valueForShadow):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::fontAttributesForSelectionStart):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::paint):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::applyShadowToGraphicsContext):
(WebCore::InlineTextBox::paintDecoration):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::applyBoxShadowForBackground):
(WebCore::areaCastingShadowInHole):
(WebCore::RenderBoxModelObject::paintBoxShadow):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::getShadowExtent):
(WebCore::RenderStyle::getShadowInsetExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):

  • rendering/style/ShadowData.cpp:

(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::operator==):
(WebCore::calculateShadowExtent):

  • rendering/style/ShadowData.h:

(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::radius):
(WebCore::ShadowData::paintingExtent):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

LayoutTests:

Reviewed by Darin Alder.

New test for invalidation with box-shadow. Update test results affected
by shadow extent.

  • compositing/geometry/foreground-layer-expected.txt:
  • compositing/iframes/composited-parent-iframe-expected.txt:
  • compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
  • compositing/iframes/connect-compositing-iframe-expected.txt:
  • compositing/iframes/connect-compositing-iframe2-expected.txt:
  • compositing/iframes/connect-compositing-iframe3-expected.txt:
  • compositing/iframes/enter-compositing-iframe-expected.txt:
  • compositing/iframes/iframe-resize-expected.txt:
  • compositing/iframes/invisible-nested-iframe-show-expected.txt:
  • compositing/iframes/overlapped-iframe-expected.txt:
  • compositing/iframes/page-cache-layer-tree-expected.txt:
  • compositing/iframes/scrolling-iframe-expected.txt:
  • compositing/visible-rect/iframe-and-layers-expected.txt:
  • fast/box-shadow/shadow-repaint-expected.txt: Added.
  • fast/box-shadow/shadow-repaint.html: Added.
  • platform/mac/fast/multicol/shadow-breaking-expected.png:
  • platform/mac/fast/multicol/shadow-breaking-expected.txt:
  • platform/mac/fast/repaint/moving-shadow-on-container-expected.txt:
  • platform/mac/fast/repaint/moving-shadow-on-path-expected.png:
  • platform/mac/fast/repaint/moving-shadow-on-path-expected.txt:
  • platform/mac/svg/css/arrow-with-shadow-expected.png:
  • platform/mac/svg/css/circle-in-mask-with-shadow-expected.png:
  • platform/mac/svg/css/clippath-with-shadow-expected.png:
  • platform/mac/svg/css/composite-shadow-example-expected.png:
  • platform/mac/svg/css/composite-shadow-example-expected.txt:
  • platform/mac/svg/css/composite-shadow-text-expected.txt:
  • platform/mac/svg/css/composite-shadow-with-opacity-expected.png:
  • platform/mac/svg/css/composite-shadow-with-opacity-expected.txt:
  • platform/mac/svg/css/group-with-shadow-expected.png:
  • platform/mac/svg/css/group-with-shadow-expected.txt:
  • platform/mac/svg/css/mask-with-shadow-expected.png:
  • platform/mac/svg/css/path-with-shadow-expected.png:
  • platform/mac/svg/css/path-with-shadow-expected.txt:
  • platform/mac/svg/css/shadow-and-opacity-expected.png:
  • platform/mac/svg/css/shadow-and-opacity-expected.txt:
  • platform/mac/svg/css/shadow-changes-expected.png:
  • platform/mac/svg/css/shadow-changes-expected.txt:
  • platform/mac/svg/css/shadow-with-large-radius-expected.png:
  • platform/mac/svg/css/shadow-with-negative-offset-expected.png:
  • platform/mac/svg/css/stars-with-shadow-expected.png:
  • platform/mac/svg/css/stars-with-shadow-expected.txt:
  • platform/mac/svg/css/text-gradient-shadow-expected.png:
  • platform/mac/svg/css/text-gradient-shadow-expected.txt:
  • platform/mac/svg/css/text-shadow-multiple-expected.png:
  • platform/mac/svg/custom/repaint-shadow-expected.png:
  • platform/mac/svg/custom/transform-with-shadow-and-gradient-expected.txt:
  • svg/css/arrow-with-shadow-expected.txt:
  • svg/css/circle-in-mask-with-shadow-expected.txt:
  • svg/css/clippath-with-shadow-expected.txt:
  • svg/css/mask-with-shadow-expected.txt:
  • svg/css/shadow-with-large-radius-expected.txt:
  • svg/css/shadow-with-negative-offset-expected.txt:
  • svg/css/text-shadow-multiple-expected.txt:
  • svg/custom/repaint-shadow-expected.txt:
  • svg/filters/shadow-on-rect-with-filter-expected.txt:
  • svg/repaint/repaint-webkit-svg-shadow-container-expected.txt:
Location:
trunk
Files:
2 added
66 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r148040 r148049  
     12013-04-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Repaint rect too small on elements with shadows
     4        https://bugs.webkit.org/show_bug.cgi?id=114225
     5
     6        Reviewed by Darin Alder.
     7       
     8        New test for invalidation with box-shadow. Update test results affected
     9        by shadow extent.
     10
     11        * compositing/geometry/foreground-layer-expected.txt:
     12        * compositing/iframes/composited-parent-iframe-expected.txt:
     13        * compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
     14        * compositing/iframes/connect-compositing-iframe-expected.txt:
     15        * compositing/iframes/connect-compositing-iframe2-expected.txt:
     16        * compositing/iframes/connect-compositing-iframe3-expected.txt:
     17        * compositing/iframes/enter-compositing-iframe-expected.txt:
     18        * compositing/iframes/iframe-resize-expected.txt:
     19        * compositing/iframes/invisible-nested-iframe-show-expected.txt:
     20        * compositing/iframes/overlapped-iframe-expected.txt:
     21        * compositing/iframes/page-cache-layer-tree-expected.txt:
     22        * compositing/iframes/scrolling-iframe-expected.txt:
     23        * compositing/visible-rect/iframe-and-layers-expected.txt:
     24        * fast/box-shadow/shadow-repaint-expected.txt: Added.
     25        * fast/box-shadow/shadow-repaint.html: Added.
     26        * platform/mac/fast/multicol/shadow-breaking-expected.png:
     27        * platform/mac/fast/multicol/shadow-breaking-expected.txt:
     28        * platform/mac/fast/repaint/moving-shadow-on-container-expected.txt:
     29        * platform/mac/fast/repaint/moving-shadow-on-path-expected.png:
     30        * platform/mac/fast/repaint/moving-shadow-on-path-expected.txt:
     31        * platform/mac/svg/css/arrow-with-shadow-expected.png:
     32        * platform/mac/svg/css/circle-in-mask-with-shadow-expected.png:
     33        * platform/mac/svg/css/clippath-with-shadow-expected.png:
     34        * platform/mac/svg/css/composite-shadow-example-expected.png:
     35        * platform/mac/svg/css/composite-shadow-example-expected.txt:
     36        * platform/mac/svg/css/composite-shadow-text-expected.txt:
     37        * platform/mac/svg/css/composite-shadow-with-opacity-expected.png:
     38        * platform/mac/svg/css/composite-shadow-with-opacity-expected.txt:
     39        * platform/mac/svg/css/group-with-shadow-expected.png:
     40        * platform/mac/svg/css/group-with-shadow-expected.txt:
     41        * platform/mac/svg/css/mask-with-shadow-expected.png:
     42        * platform/mac/svg/css/path-with-shadow-expected.png:
     43        * platform/mac/svg/css/path-with-shadow-expected.txt:
     44        * platform/mac/svg/css/shadow-and-opacity-expected.png:
     45        * platform/mac/svg/css/shadow-and-opacity-expected.txt:
     46        * platform/mac/svg/css/shadow-changes-expected.png:
     47        * platform/mac/svg/css/shadow-changes-expected.txt:
     48        * platform/mac/svg/css/shadow-with-large-radius-expected.png:
     49        * platform/mac/svg/css/shadow-with-negative-offset-expected.png:
     50        * platform/mac/svg/css/stars-with-shadow-expected.png:
     51        * platform/mac/svg/css/stars-with-shadow-expected.txt:
     52        * platform/mac/svg/css/text-gradient-shadow-expected.png:
     53        * platform/mac/svg/css/text-gradient-shadow-expected.txt:
     54        * platform/mac/svg/css/text-shadow-multiple-expected.png:
     55        * platform/mac/svg/custom/repaint-shadow-expected.png:
     56        * platform/mac/svg/custom/transform-with-shadow-and-gradient-expected.txt:
     57        * svg/css/arrow-with-shadow-expected.txt:
     58        * svg/css/circle-in-mask-with-shadow-expected.txt:
     59        * svg/css/clippath-with-shadow-expected.txt:
     60        * svg/css/mask-with-shadow-expected.txt:
     61        * svg/css/shadow-with-large-radius-expected.txt:
     62        * svg/css/shadow-with-negative-offset-expected.txt:
     63        * svg/css/text-shadow-multiple-expected.txt:
     64        * svg/custom/repaint-shadow-expected.txt:
     65        * svg/filters/shadow-on-rect-with-filter-expected.txt:
     66        * svg/repaint/repaint-webkit-svg-shadow-container-expected.txt:
     67
    1682013-04-09  Benjamin Poulain  <bpoulain@apple.com>
    269
  • trunk/LayoutTests/compositing/geometry/foreground-layer-expected.txt

    r141634 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (position 18.00 18.00)
    11           (bounds 320.00 320.00)
     10          (position 10.00 10.00)
     11          (bounds 336.00 336.00)
    1212          (drawsContent 1)
    1313          (children 2
    1414            (GraphicsLayer
    15               (position 60.00 60.00)
     15              (position 68.00 68.00)
    1616              (bounds 50.00 50.00)
    1717              (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
    1818            )
    1919            (GraphicsLayer
    20               (bounds 320.00 320.00)
     20              (bounds 336.00 336.00)
    2121              (drawsContent 1)
    2222            )
     
    2424        )
    2525        (GraphicsLayer
    26           (position 362.00 18.00)
    27           (bounds 320.00 320.00)
     26          (position 354.00 10.00)
     27          (bounds 336.00 336.00)
    2828          (drawsContent 1)
    2929          (children 1
    3030            (GraphicsLayer
    31               (position 60.00 60.00)
     31              (position 68.00 68.00)
    3232              (bounds 200.00 200.00)
    3333              (children 2
  • trunk/LayoutTests/compositing/iframes/composited-parent-iframe-expected.txt

    r146531 r148049  
    88      (children 1
    99        (GraphicsLayer
    10           (position -12.00 -12.00)
    11           (bounds 370.00 220.00)
     10          (position -20.00 -20.00)
     11          (bounds 386.00 236.00)
    1212          (drawsContent 1)
    1313          (children 1
    1414            (GraphicsLayer
    15               (position 35.00 35.00)
     15              (position 43.00 43.00)
    1616              (children 1
    1717                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/connect-compositing-iframe-delayed-expected.txt

    r146531 r148049  
    1010      (children 2
    1111        (GraphicsLayer
    12           (position 8.00 108.00)
    13           (bounds 370.00 220.00)
     12          (position 0.00 100.00)
     13          (bounds 386.00 236.00)
    1414          (drawsContent 1)
    1515          (children 1
    1616            (GraphicsLayer
    17               (position 35.00 35.00)
     17              (position 43.00 43.00)
    1818              (children 1
    1919                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/connect-compositing-iframe-expected.txt

    r146531 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (position 8.00 8.00)
    11           (bounds 370.00 220.00)
     10          (bounds 386.00 236.00)
    1211          (drawsContent 1)
    1312          (children 1
    1413            (GraphicsLayer
    15               (position 35.00 35.00)
     14              (position 43.00 43.00)
    1615              (children 1
    1716                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/connect-compositing-iframe2-expected.txt

    r146531 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (position 8.00 8.00)
    11           (bounds 370.00 220.00)
     10          (bounds 386.00 236.00)
    1211          (drawsContent 1)
    1312          (children 1
    1413            (GraphicsLayer
    15               (position 35.00 35.00)
     14              (position 43.00 43.00)
    1615              (children 1
    1716                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/connect-compositing-iframe3-expected.txt

    r146531 r148049  
    88      (children 1
    99        (GraphicsLayer
    10           (position 8.00 8.00)
    11           (bounds 370.00 220.00)
     10          (bounds 386.00 236.00)
    1211          (drawsContent 1)
    1312          (children 1
    1413            (GraphicsLayer
    15               (position 35.00 35.00)
     14              (position 43.00 43.00)
    1615              (children 1
    1716                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/enter-compositing-iframe-expected.txt

    r146531 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (position 8.00 8.00)
    11           (bounds 370.00 220.00)
     10          (bounds 386.00 236.00)
    1211          (drawsContent 1)
    1312          (children 1
    1413            (GraphicsLayer
    15               (position 35.00 35.00)
     14              (position 43.00 43.00)
    1615              (children 1
    1716                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/iframe-resize-expected.txt

    r146531 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (position 8.00 8.00)
    11           (bounds 470.00 190.00)
     10          (bounds 486.00 206.00)
    1211          (drawsContent 1)
    1312          (children 1
    1413            (GraphicsLayer
    15               (position 35.00 35.00)
     14              (position 43.00 43.00)
    1615              (children 1
    1716                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt

    r146531 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (bounds 358.00 208.00)
     10          (bounds 366.00 216.00)
    1111          (drawsContent 1)
    1212          (children 1
  • trunk/LayoutTests/compositing/iframes/overlapped-iframe-expected.txt

    r146531 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (position 8.00 8.00)
    11           (bounds 370.00 220.00)
     10          (bounds 386.00 236.00)
    1211          (drawsContent 1)
    1312          (children 1
    1413            (GraphicsLayer
    15               (position 35.00 35.00)
     14              (position 43.00 43.00)
    1615              (children 1
    1716                (GraphicsLayer
  • trunk/LayoutTests/compositing/iframes/page-cache-layer-tree-expected.txt

    r146531 r148049  
    1414      (children 4
    1515        (GraphicsLayer
    16           (position 8.00 50.00)
    17           (bounds 370.00 220.00)
     16          (position 0.00 42.00)
     17          (bounds 386.00 236.00)
    1818          (drawsContent 1)
    1919          (children 1
    2020            (GraphicsLayer
    21               (position 35.00 35.00)
     21              (position 43.00 43.00)
    2222              (children 1
    2323                (GraphicsLayer
     
    5858        (GraphicsLayer
    5959          (position 8.00 274.00)
    60           (bounds 370.00 220.00)
     60          (bounds 784.00 224.00)
    6161          (drawsContent 1)
    6262          (children 1
    6363            (GraphicsLayer
    64               (position 35.00 35.00)
     64              (position -8.00 -8.00)
     65              (bounds 386.00 236.00)
     66              (drawsContent 1)
    6567              (children 1
    6668                (GraphicsLayer
    67                   (bounds 285.00 135.00)
     69                  (position 43.00 43.00)
    6870                  (children 1
    6971                    (GraphicsLayer
     72                      (bounds 285.00 135.00)
    7073                      (children 1
    7174                        (GraphicsLayer
    72                           (bounds 508.00 608.00)
    7375                          (children 1
    7476                            (GraphicsLayer
    7577                              (bounds 508.00 608.00)
    76                               (drawsContent 1)
    7778                              (children 1
    7879                                (GraphicsLayer
    79                                   (position 108.00 100.00)
    80                                   (bounds 200.00 200.00)
    81                                   (contentsOpaque 1)
     80                                  (bounds 508.00 608.00)
     81                                  (drawsContent 1)
     82                                  (children 1
     83                                    (GraphicsLayer
     84                                      (position 108.00 100.00)
     85                                      (bounds 200.00 200.00)
     86                                      (contentsOpaque 1)
     87                                    )
     88                                  )
    8289                                )
    8390                              )
  • trunk/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt

    r146531 r148049  
    88      (children 2
    99        (GraphicsLayer
    10           (position 8.00 8.00)
    11           (bounds 370.00 220.00)
     10          (bounds 386.00 236.00)
    1211          (drawsContent 1)
    1312          (children 1
    1413            (GraphicsLayer
    15               (position 35.00 35.00)
     14              (position 43.00 43.00)
    1615              (children 1
    1716                (GraphicsLayer
  • trunk/LayoutTests/compositing/visible-rect/iframe-and-layers-expected.txt

    r146531 r148049  
    1010      (children 2
    1111        (GraphicsLayer
    12           (position 18.00 18.00)
    13           (bounds 344.00 194.00)
     12          (position 10.00 10.00)
     13          (bounds 360.00 210.00)
    1414          (drawsContent 1)
    15           (visible rect 0.00, 0.00 344.00 x 194.00)
     15          (visible rect 0.00, 0.00 360.00 x 210.00)
    1616          (children 1
    1717            (GraphicsLayer
    18               (position 22.00 22.00)
     18              (position 30.00 30.00)
    1919              (visible rect 0.00, 0.00 0.00 x 0.00)
    2020              (children 1
  • trunk/LayoutTests/platform/mac/fast/multicol/shadow-breaking-expected.txt

    r67660 r148049  
    55    RenderBody {BODY} at (8,8) size 784x0
    66      RenderBlock {DIV} at (0,0) size 784x0
    7 layer at (20,36) size 424x270
    8   RenderBlock (positioned) {P} at (20,36) size 424x270 [border: (2px solid #000000)]
     7layer at (20,36) size 424x272
     8  RenderBlock (positioned) {P} at (20,36) size 424x272 [border: (2px solid #000000)]
    99    RenderBlock (floating) at (2,2) size 24x41
    1010      RenderText {#text} at (0,0) size 24x41
    1111        text run at (0,0) width 24: "L"
    12     RenderText {#text} at (30,2) size 200x491
     12    RenderText {#text} at (30,2) size 200x497
    1313      text run at (30,2) width 172: "orem ipsum dolor sit"
    1414      text run at (30,20) width 172: "amet, consectetur"
     
    2525      text run at (2,218) width 200: "Nam non ligula massa, sed"
    2626      text run at (2,236) width 200: "suscipit turpis. Etiam eget"
    27       text run at (2,277) width 200: "ligula sit amet turpis"
    28       text run at (2,295) width 200: "venenatis dictum in eleifend"
    29       text run at (2,313) width 200: "augue. Duis tellus lectus,"
    30       text run at (2,331) width 200: "volutpat et adipiscing a,"
    31       text run at (2,349) width 200: "pellentesque eu metus."
    32       text run at (2,367) width 200: "Aenean suscipit congue"
    33       text run at (2,385) width 200: "mauris at gravida. Integer"
    34       text run at (2,403) width 200: "lectus ligula, consectetur sit"
    35       text run at (2,421) width 200: "amet venenatis id, scelerisque"
    36       text run at (2,439) width 200: "eget nisl. Nunc dapibus"
    37       text run at (2,457) width 200: "posuere risus, vitae tempor"
    38       text run at (2,475) width 97: "nibh iaculis et."
     27      text run at (2,283) width 200: "ligula sit amet turpis"
     28      text run at (2,301) width 200: "venenatis dictum in eleifend"
     29      text run at (2,319) width 200: "augue. Duis tellus lectus,"
     30      text run at (2,337) width 200: "volutpat et adipiscing a,"
     31      text run at (2,355) width 200: "pellentesque eu metus."
     32      text run at (2,373) width 200: "Aenean suscipit congue"
     33      text run at (2,391) width 200: "mauris at gravida. Integer"
     34      text run at (2,409) width 200: "lectus ligula, consectetur sit"
     35      text run at (2,427) width 200: "amet venenatis id, scelerisque"
     36      text run at (2,445) width 200: "eget nisl. Nunc dapibus"
     37      text run at (2,463) width 200: "posuere risus, vitae tempor"
     38      text run at (2,481) width 97: "nibh iaculis et."
  • trunk/LayoutTests/platform/mac/fast/repaint/moving-shadow-on-container-expected.txt

    r133834 r148049  
    44  RenderBlock {HTML} at (0,0) size 785x616
    55    RenderBody {BODY} at (8,8) size 769x600
    6       RenderSVGRoot {svg} at (8,8) size 488x193
    7         RenderSVGPath {path} at (8,8) size 78x68 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    8         RenderSVGPath {path} at (200,46) size 128x125 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    9         RenderSVGPath {path} at (349,46) size 117x122 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
     6      RenderSVGRoot {svg} at (8,8) size 496x201
     7        RenderSVGPath {path} at (8,8) size 80x70 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     8        RenderSVGPath {path} at (198,44) size 132x129 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     9        RenderSVGPath {path} at (347,44) size 121x126 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
  • trunk/LayoutTests/platform/mac/fast/repaint/moving-shadow-on-path-expected.txt

    r69387 r148049  
    44  RenderBlock {HTML} at (0,0) size 785x616
    55    RenderBody {BODY} at (8,8) size 769x600
    6       RenderSVGRoot {svg} at (8,8) size 458x163
    7         RenderSVGPath {path} at (8,8) size 88x78 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    8         RenderSVGPath {path} at (200,46) size 138x135 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    9         RenderSVGPath {path} at (349,46) size 127x132 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
     6      RenderSVGRoot {svg} at (8,8) size 460x165
     7        RenderSVGPath {path} at (8,8) size 92x82 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     8        RenderSVGPath {path} at (196,42) size 146x143 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     9        RenderSVGPath {path} at (345,42) size 135x140 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
  • trunk/LayoutTests/platform/mac/svg/css/composite-shadow-example-expected.txt

    r133834 r148049  
    44  RenderBlock {HTML} at (0,0) size 785x616
    55    RenderBody {BODY} at (8,8) size 769x600
    6       RenderSVGRoot {svg} at (40,36) size 456x170
    7         RenderSVGContainer {g} at (40,36) size 156x150
    8           RenderSVGPath {path} at (40,36) size 146x140 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    9         RenderSVGContainer {g} at (200,46) size 138x135
    10           RenderSVGPath {path} at (200,46) size 128x125 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    11         RenderSVGContainer {g} at (349,46) size 127x132
    12           RenderSVGPath {path} at (349,46) size 117x122 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
     6      RenderSVGRoot {svg} at (32,28) size 472x186
     7        RenderSVGContainer {g} at (36,32) size 164x158
     8          RenderSVGPath {path} at (38,34) size 150x144 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     9        RenderSVGContainer {g} at (196,42) size 146x143
     10          RenderSVGPath {path} at (198,44) size 132x129 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     11        RenderSVGContainer {g} at (345,42) size 135x140
     12          RenderSVGPath {path} at (347,44) size 121x126 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
  • trunk/LayoutTests/platform/mac/svg/css/composite-shadow-text-expected.txt

    r103407 r148049  
    1010        RenderSVGRect {rect} at (0,0) size 10x10 [fill={[type=SOLID] [color=#0000FF]}] [x=0.00] [y=0.00] [width=10.00] [height=10.00]
    1111        RenderSVGRect {rect} at (0,10) size 10x10 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=10.00] [width=10.00] [height=10.00]
    12     RenderSVGContainer {g} at (9,9) size 245x427
     12    RenderSVGContainer {g} at (9,9) size 249x431
    1313      RenderSVGText {text} at (10,10) size 183x115 contains 1 chunk(s)
    1414        RenderSVGInlineText {#text} at (0,0) size 183x115
  • trunk/LayoutTests/platform/mac/svg/css/composite-shadow-with-opacity-expected.txt

    r133834 r148049  
    55    RenderBody {BODY} at (8,8) size 769x600
    66layer at (8,8) size 769x600
    7   RenderSVGRoot {svg} at (40,36) size 456x170 [opacity=0.50]
    8     RenderSVGContainer {g} at (40,36) size 156x150
    9       RenderSVGPath {path} at (40,36) size 146x140 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    10     RenderSVGContainer {g} at (200,46) size 138x135
    11       RenderSVGPath {path} at (200,46) size 128x125 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    12     RenderSVGContainer {g} at (349,46) size 127x132
    13       RenderSVGPath {path} at (349,46) size 117x122 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
     7  RenderSVGRoot {svg} at (32,28) size 472x186 [opacity=0.50]
     8    RenderSVGContainer {g} at (36,32) size 164x158
     9      RenderSVGPath {path} at (38,34) size 150x144 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     10    RenderSVGContainer {g} at (196,42) size 146x143
     11      RenderSVGPath {path} at (198,44) size 132x129 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     12    RenderSVGContainer {g} at (345,42) size 135x140
     13      RenderSVGPath {path} at (347,44) size 121x126 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=10.00] [dash array={20.00}]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
  • trunk/LayoutTests/platform/mac/svg/css/group-with-shadow-expected.txt

    r133834 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (30,31) size 289x286
    5     RenderSVGContainer {g} at (30,31) size 355x353 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
    6       RenderSVGPath {line} at (33,31) size 284x38 [stroke={[type=SOLID] [color=#800080]}] [fill={[type=SOLID] [color=#000000]}] [x1=10.00] [y1=10.00] [x2=85.00] [y2=10.00]
    7       RenderSVGRect {rect} at (31,65) size 288x204 [stroke={[type=SOLID] [color=#800080]}] [fill={[type=SOLID] [color=#800080]}] [x=10.00] [y=20.00] [width=75.00] [height=50.00]
     4  RenderSVGRoot {svg} at (25,25) size 300x292
     5    RenderSVGContainer {g} at (11,11) size 394x386 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
     6      RenderSVGPath {line} at (26,25) size 298x50 [stroke={[type=SOLID] [color=#800080]}] [fill={[type=SOLID] [color=#000000]}] [x1=10.00] [y1=10.00] [x2=85.00] [y2=10.00]
     7      RenderSVGRect {rect} at (25,58) size 300x217 [stroke={[type=SOLID] [color=#800080]}] [fill={[type=SOLID] [color=#800080]}] [x=10.00] [y=20.00] [width=75.00] [height=50.00]
    88      RenderSVGText {text} at (10,75) size 78x19 contains 1 chunk(s)
    99        RenderSVGInlineText {#text} at (0,0) size 78x19
  • trunk/LayoutTests/platform/mac/svg/css/path-with-shadow-expected.txt

    r69386 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (200,200) size 110x210
    5     RenderSVGPath {path} at (200,200) size 120x220 [fill={[type=SOLID] [color=#0000FF]}] [data="M 200 200 L 300 200 L 300 400 L 200 400 Z"]
     4  RenderSVGRoot {svg} at (198,198) size 114x214
     5    RenderSVGPath {path} at (196,196) size 128x228 [fill={[type=SOLID] [color=#0000FF]}] [data="M 200 200 L 300 200 L 300 400 L 200 400 Z"]
  • trunk/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.txt

    r103407 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (87,87) size 213x213
    5     RenderSVGRect {rect} at (74,74) size 226x226 [opacity=0.50] [fill={[type=SOLID] [color=#008000]}] [x=100.00] [y=100.00] [width=200.00] [height=200.00]
     4  RenderSVGRoot {svg} at (85,85) size 215x215
     5    RenderSVGRect {rect} at (70,70) size 230x230 [opacity=0.50] [fill={[type=SOLID] [color=#008000]}] [x=100.00] [y=100.00] [width=200.00] [height=200.00]
  • trunk/LayoutTests/platform/mac/svg/css/shadow-changes-expected.txt

    r140779 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (135,5) size 326x285
    5     RenderSVGContainer {g} at (105,0) size 356x290
    6       RenderSVGRect {rect} at (135,5) size 215x215 [fill={[type=SOLID] [color=#FF0000]}] [x=150.00] [y=20.00] [width=200.00] [height=200.00]
    7       RenderSVGEllipse {circle} at (205,75) size 215x215 [fill={[type=SOLID] [color=#0000FF]}] [cx=320.00] [cy=190.00] [r=100.00]
     4  RenderSVGRoot {svg} at (132,2) size 329x288
     5    RenderSVGContainer {g} at (96,0) size 365x290
     6      RenderSVGRect {rect} at (132,2) size 218x218 [fill={[type=SOLID] [color=#FF0000]}] [x=150.00] [y=20.00] [width=200.00] [height=200.00]
     7      RenderSVGEllipse {circle} at (202,72) size 218x218 [fill={[type=SOLID] [color=#0000FF]}] [cx=320.00] [cy=190.00] [r=100.00]
    88      RenderSVGText {text} at (270,36) size 191x108 contains 1 chunk(s)
    99        RenderSVGInlineText {#text} at (0,0) size 191x107
  • trunk/LayoutTests/platform/mac/svg/css/stars-with-shadow-expected.txt

    r69386 r148049  
    44  RenderBlock {HTML} at (0,0) size 785x616
    55    RenderBody {BODY} at (8,8) size 769x600
    6       RenderSVGRoot {svg} at (40,36) size 437x140
    7         RenderSVGPath {path} at (40,36) size 156x150 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [stroke={[type=SOLID] [color=#800080] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    8         RenderSVGPath {path} at (190,36) size 156x150 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#800080] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
    9         RenderSVGPath {path} at (349,46) size 138x132 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#800080] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
     6      RenderSVGRoot {svg} at (38,34) size 441x144
     7        RenderSVGPath {path} at (36,32) size 164x158 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [stroke={[type=SOLID] [color=#800080] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     8        RenderSVGPath {path} at (186,32) size 164x158 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,100.00)}] [stroke={[type=SOLID] [color=#800080] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.83697e-15 30 L -35.2671 48.541 L -28.5317 9.27051 L -57.0634 -18.541 L -17.6336 -24.2705 L -1.10218e-14 -60 L 17.6336 -24.2705 L 57.0634 -18.541 L 28.5317 9.27051 L 35.2671 48.541 Z"]
     9        RenderSVGPath {path} at (345,42) size 146x140 [transform={m=((1.00,0.00)(0.00,1.00)) t=(400.00,100.00)}] [stroke={[type=SOLID] [color=#800080] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 1.53081e-15 25 L -29.3893 40.4509 L -23.7764 7.72542 L -47.5528 -15.4508 L -14.6946 -20.2254 L -9.18485e-15 -50 L 14.6946 -20.2254 L 47.5528 -15.4508 L 23.7764 7.72542 L 29.3893 40.4509 Z"]
  • trunk/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.txt

    r76029 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (200,20) size 439x270
     4  RenderSVGRoot {svg} at (192,12) size 455x286
    55    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    66      RenderSVGResourceLinearGradient {linearGradient} [id="gradient"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,0)]
  • trunk/LayoutTests/platform/mac/svg/custom/transform-with-shadow-and-gradient-expected.txt

    r112667 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (18,16) size 542x544
     4  RenderSVGRoot {svg} at (14,0) size 578x592
    55    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    66      RenderSVGResourceLinearGradient {linearGradient} [id="gradient"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,0)]
    77        RenderSVGGradientStop {stop} [offset=0.00] [color=#0000FF]
    88        RenderSVGGradientStop {stop} [offset=1.00] [color=#008000]
    9     RenderSVGEllipse {circle} at (20,20) size 176x176 [transform={m=((4.00,0.00)(0.00,4.00)) t=(0.00,0.00)}] [fill={[type=LINEAR-GRADIENT] [id="gradient"]}] [cx=25.00] [cy=25.00] [r=20.00]
    10     RenderSVGRect {rect} at (320,16) size 288x288 [transform={m=((32.00,0.00)(0.00,32.00)) t=(0.00,0.00)}] [fill={[type=LINEAR-GRADIENT] [id="gradient"]}] [x=10.00] [y=0.50] [width=5.00] [height=5.00]
    11     RenderSVGEllipse {circle} at (18,318) size 180x180 [transform={m=((4.00,0.00)(0.00,4.00)) t=(0.00,0.00)}] [stroke={[type=LINEAR-GRADIENT] [id="gradient"]}] [fill={[type=SOLID] [color=#00000000]}] [cx=25.00] [cy=100.00] [r=20.00]
    12     RenderSVGRect {rect} at (304,304) size 320x296 [transform={m=((32.00,0.00)(0.00,32.00)) t=(0.00,0.00)}] [stroke={[type=LINEAR-GRADIENT] [id="gradient"]}] [fill={[type=SOLID] [color=#00000000]}] [x=10.00] [y=10.00] [width=5.00] [height=5.00]
     9    RenderSVGEllipse {circle} at (12,12) size 192x192 [transform={m=((4.00,0.00)(0.00,4.00)) t=(0.00,0.00)}] [fill={[type=LINEAR-GRADIENT] [id="gradient"]}] [cx=25.00] [cy=25.00] [r=20.00]
     10    RenderSVGRect {rect} at (256,0) size 416x368 [transform={m=((32.00,0.00)(0.00,32.00)) t=(0.00,0.00)}] [fill={[type=LINEAR-GRADIENT] [id="gradient"]}] [x=10.00] [y=0.50] [width=5.00] [height=5.00]
     11    RenderSVGEllipse {circle} at (10,310) size 196x196 [transform={m=((4.00,0.00)(0.00,4.00)) t=(0.00,0.00)}] [stroke={[type=LINEAR-GRADIENT] [id="gradient"]}] [fill={[type=SOLID] [color=#00000000]}] [cx=25.00] [cy=100.00] [r=20.00]
     12    RenderSVGRect {rect} at (240,240) size 448x360 [transform={m=((32.00,0.00)(0.00,32.00)) t=(0.00,0.00)}] [stroke={[type=LINEAR-GRADIENT] [id="gradient"]}] [fill={[type=SOLID] [color=#00000000]}] [x=10.00] [y=10.00] [width=5.00] [height=5.00]
  • trunk/LayoutTests/svg/css/arrow-with-shadow-expected.txt

    r146455 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (79,23) size 605x414
    5     RenderSVGContainer {g} at (79,23) size 671x480 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
    6       RenderSVGContainer {a} at (79,23) size 638x447
    7         RenderSVGPath {path} at (79,23) size 605x414 [stroke={[type=SOLID] [color=#0000FF] [stroke width=20.00]}] [data="M 185 40 L 85 40 L 85 28 L 40 64 L 85 100 L 85 88 L 185 88 Z"]
     4  RenderSVGRoot {svg} at (73,17) size 617x426
     5    RenderSVGContainer {g} at (59,3) size 711x520 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
     6      RenderSVGContainer {a} at (66,10) size 664x473
     7        RenderSVGPath {path} at (73,17) size 617x426 [stroke={[type=SOLID] [color=#0000FF] [stroke width=20.00]}] [data="M 185 40 L 85 40 L 85 28 L 40 64 L 85 100 L 85 88 L 185 88 Z"]
  • trunk/LayoutTests/svg/css/circle-in-mask-with-shadow-expected.txt

    r112667 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 450x500
    4   RenderSVGRoot {svg} at (5,5) size 220x220
    5     RenderSVGContainer {g} at (5,5) size 220x220
     4  RenderSVGRoot {svg} at (3,3) size 224x224
     5    RenderSVGContainer {g} at (3,3) size 224x224
    66      RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    77        RenderSVGResourceLinearGradient {linearGradient} [id="maskedGradient"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,1)]
     
    1010        RenderSVGRect {rect} at (0,0) size 300x300 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]
    1111        RenderSVGResourceMasker {mask} [id="mask_1"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
    12           RenderSVGEllipse {circle} at (5,5) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=55.00] [r=50.00]
    13           RenderSVGEllipse {circle} at (5,115) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=165.00] [r=50.00]
    14           RenderSVGEllipse {circle} at (115,5) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=55.00] [r=50.00]
    15           RenderSVGEllipse {circle} at (115,115) size 120x120 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=165.00] [r=50.00]
    16       RenderSVGContainer {g} at (5,5) size 220x220
    17         RenderSVGContainer {use} at (5,5) size 220x220
    18           [masker="mask_1"] RenderSVGResourceMasker {mask} at (5,5) size 220x220
     12          RenderSVGEllipse {circle} at (1,1) size 128x128 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=55.00] [r=50.00]
     13          RenderSVGEllipse {circle} at (1,111) size 128x128 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=165.00] [r=50.00]
     14          RenderSVGEllipse {circle} at (111,1) size 128x128 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=55.00] [r=50.00]
     15          RenderSVGEllipse {circle} at (111,111) size 128x128 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=165.00] [r=50.00]
     16      RenderSVGContainer {g} at (3,3) size 224x224
     17        RenderSVGContainer {use} at (3,3) size 224x224
     18          [masker="mask_1"] RenderSVGResourceMasker {mask} at (3,3) size 224x224
    1919          RenderSVGRect {rect} at (0,0) size 300x300 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]
  • trunk/LayoutTests/svg/css/clippath-with-shadow-expected.txt

    r146455 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (0,0) size 210x200
     4  RenderSVGRoot {svg} at (0,0) size 212x200
    55    RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
    66    RenderSVGRect {rect} at (0,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-200.00,0.00)}] [x=200.00] [y=0.00] [width=200.00] [height=200.00]
    77    RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
    8       RenderSVGContainer {use} at (0,0) size 220x220
    9         RenderSVGRect {rect} at (0,0) size 210x210 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-200.00,0.00)}] [x=200.00] [y=0.00] [width=200.00] [height=200.00]
    10     RenderSVGRect {rect} at (0,0) size 210x200 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
    11       [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 210x210
     8      RenderSVGContainer {use} at (0,0) size 224x224
     9        RenderSVGRect {rect} at (0,0) size 212x212 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-200.00,0.00)}] [x=200.00] [y=0.00] [width=200.00] [height=200.00]
     10    RenderSVGRect {rect} at (0,0) size 212x200 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
     11      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (-2,-2) size 214x214
  • trunk/LayoutTests/svg/css/mask-with-shadow-expected.txt

    r133834 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 450x500
    4   RenderSVGRoot {svg} at (5,5) size 220x220
    5     RenderSVGContainer {g} at (5,5) size 220x220
     4  RenderSVGRoot {svg} at (3,3) size 224x224
     5    RenderSVGContainer {g} at (3,3) size 224x224
    66      RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    77        RenderSVGResourceLinearGradient {linearGradient} [id="maskedGradient"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,1)]
     
    1010        RenderSVGRect {rect} at (0,0) size 300x300 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]
    1111        RenderSVGResourceMasker {mask} [id="mask_1"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
    12           RenderSVGEllipse {circle} at (5,5) size 110x110 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=55.00] [r=50.00]
    13           RenderSVGEllipse {circle} at (5,115) size 110x110 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=165.00] [r=50.00]
    14           RenderSVGEllipse {circle} at (115,5) size 110x110 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=55.00] [r=50.00]
    15           RenderSVGEllipse {circle} at (115,115) size 110x110 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=165.00] [r=50.00]
    16       RenderSVGContainer {g} at (5,5) size 220x220
    17         RenderSVGContainer {use} at (5,5) size 220x220
    18           [masker="mask_1"] RenderSVGResourceMasker {mask} at (5,5) size 220x220
     12          RenderSVGEllipse {circle} at (3,3) size 114x114 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=55.00] [r=50.00]
     13          RenderSVGEllipse {circle} at (3,113) size 114x114 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=55.00] [cy=165.00] [r=50.00]
     14          RenderSVGEllipse {circle} at (113,3) size 114x114 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=55.00] [r=50.00]
     15          RenderSVGEllipse {circle} at (113,113) size 114x114 [fill={[type=SOLID] [color=#FFFFFF]}] [cx=165.00] [cy=165.00] [r=50.00]
     16      RenderSVGContainer {g} at (3,3) size 224x224
     17        RenderSVGContainer {use} at (3,3) size 224x224
     18          [masker="mask_1"] RenderSVGResourceMasker {mask} at (3,3) size 224x224
    1919          RenderSVGRect {rect} at (0,0) size 300x300 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [x=0.00] [y=0.00] [width=300.00] [height=300.00]
  • trunk/LayoutTests/svg/css/shadow-with-large-radius-expected.txt

    r114393 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (50,50) size 210x210
    5     RenderSVGPath {path} at (5,5) size 310x310 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 100 100 L 200 100 L 200 200 L 100 200 Z"]
     4  RenderSVGRoot {svg} at (30,30) size 250x250
     5    RenderSVGPath {path} at (0,0) size 355x355 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 100 100 L 200 100 L 200 200 L 100 200 Z"]
  • trunk/LayoutTests/svg/css/shadow-with-negative-offset-expected.txt

    r114393 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (40,40) size 210x210
    5     RenderSVGPath {path} at (0,0) size 295x295 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 100 100 L 200 100 L 200 200 L 100 200 Z"]
     4  RenderSVGRoot {svg} at (20,20) size 250x250
     5    RenderSVGPath {path} at (0,0) size 335x335 [stroke={[type=SOLID] [color=#000000] [stroke width=10.00]}] [fill={[type=SOLID] [color=#999999]}] [data="M 100 100 L 200 100 L 200 200 L 100 200 Z"]
  • trunk/LayoutTests/svg/css/text-shadow-multiple-expected.txt

    r140779 r148049  
    3131          text run at (0,0) width 556: "The next two texts have subtle differences, as the stroke/fill is painted seperated in SVG."
    3232      RenderBlock (anonymous) at (0,238) size 800x154
    33         RenderSVGRoot {svg} at (0,307) size 747x90
     33        RenderSVGRoot {svg} at (0,305) size 747x93
    3434          RenderSVGText {text} at (20,20) size 720x57 contains 1 chunk(s)
    3535            RenderSVGTSpan {tspan} at (0,0) size 95x56
  • trunk/LayoutTests/svg/custom/repaint-shadow-expected.txt

    r107241 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (20,20) size 406x255
     4  RenderSVGRoot {svg} at (20,20) size 408x257
    55    RenderSVGText {text} at (20,20) size 50x50 contains 1 chunk(s)
    66      RenderSVGInlineText {#text} at (0,0) size 50x50
  • trunk/LayoutTests/svg/filters/shadow-on-rect-with-filter-expected.txt

    r114293 r148049  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (37,37) size 493x493
     4  RenderSVGRoot {svg} at (35,35) size 495x495
    55    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    66      RenderSVGResourceFilter {filter} [id="filter"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
     
    99            [feFlood flood-color="#FF0000" flood-opacity="1.00"]
    1010            [feFlood flood-color="#008000" flood-opacity="1.00"]
    11     RenderSVGRect {rect} at (24,24) size 506x506 [fill={[type=SOLID] [color=#008000]}] [x=200.00] [y=200.00] [width=300.00] [height=300.00]
     11    RenderSVGRect {rect} at (20,20) size 510x510 [fill={[type=SOLID] [color=#008000]}] [x=200.00] [y=200.00] [width=300.00] [height=300.00]
    1212      [filter="filter"] RenderSVGResourceFilter {filter} at (50,50) size 480x480
  • trunk/LayoutTests/svg/repaint/repaint-webkit-svg-shadow-container-expected.txt

    r137393 r148049  
    11 (repaint rects
    2   (rect 8 8 300 300)
    3   (rect 8 8 510 510)
    4   (rect 8 8 600 600)
     2  (rect 8 8 340 340)
     3  (rect 8 8 594 594)
     4  (rect 8 8 720 600)
    55)
    66
  • trunk/Source/WebCore/ChangeLog

    r148048 r148049  
     12013-04-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Repaint rect too small on elements with shadows
     4        https://bugs.webkit.org/show_bug.cgi?id=114225
     5
     6        Reviewed by Dain Adler.
     7       
     8        We assumed that shadows (box-shadow, text-shadow, svg shadows)
     9        only required inflating the repaint rect by the blur radius of
     10        the shadow. However, this is incorrect; the shadow can extend
     11        further, which resulted in clipped or incorrectly invalidated
     12        shadows.
     13       
     14        Fix by disambiguating the blur radius (which is 2x the standard
     15        deviation of the Gaussian distribution used to generate the blur),
     16        from the painting extent, which is how far the shadow visually
     17        projects. Using a 1.4 multiplier of the blur radius is a good
     18        approximation for the painting extent.
     19       
     20        Renamed ShadowData::blur() to ShadowData::radius(), and added
     21        ShadowData::paintingExtent(). Use the latter in all places
     22        which relate to invalidation.
     23
     24        Test: fast/box-shadow/shadow-repaint.html
     25
     26        * css/CSSComputedStyleDeclaration.cpp:
     27        (WebCore::CSSComputedStyleDeclaration::valueForShadow):
     28        * editing/mac/EditorMac.mm:
     29        (WebCore::Editor::fontAttributesForSelectionStart):
     30        * page/animation/CSSPropertyAnimation.cpp:
     31        (WebCore::blendFunc):
     32        * rendering/EllipsisBox.cpp:
     33        (WebCore::EllipsisBox::paint):
     34        * rendering/InlineTextBox.cpp:
     35        (WebCore::InlineTextBox::applyShadowToGraphicsContext):
     36        (WebCore::InlineTextBox::paintDecoration):
     37        * rendering/RenderBoxModelObject.cpp:
     38        (WebCore::applyBoxShadowForBackground):
     39        (WebCore::areaCastingShadowInHole):
     40        (WebCore::RenderBoxModelObject::paintBoxShadow):
     41        * rendering/style/RenderStyle.cpp:
     42        (WebCore::RenderStyle::getShadowExtent):
     43        (WebCore::RenderStyle::getShadowInsetExtent):
     44        (WebCore::RenderStyle::getShadowHorizontalExtent):
     45        (WebCore::RenderStyle::getShadowVerticalExtent):
     46        * rendering/style/ShadowData.cpp:
     47        (WebCore::ShadowData::ShadowData):
     48        (WebCore::ShadowData::operator==):
     49        (WebCore::calculateShadowExtent):
     50        * rendering/style/ShadowData.h:
     51        (WebCore::ShadowData::ShadowData):
     52        (WebCore::ShadowData::radius):
     53        (WebCore::ShadowData::paintingExtent):
     54        * rendering/svg/SVGRenderingContext.cpp:
     55        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
     56
    1572013-04-08  Simon Fraser  <simon.fraser@apple.com>
    258
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r147348 r148049  
    12731273        RefPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(s->x(), style);
    12741274        RefPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(s->y(), style);
    1275         RefPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(s->blur(), style);
     1275        RefPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(s->radius(), style);
    12761276        RefPtr<CSSPrimitiveValue> spread = propertyID == CSSPropertyTextShadow ? PassRefPtr<CSSPrimitiveValue>() : zoomAdjustedPixelValue(s->spread(), style);
    12771277        RefPtr<CSSPrimitiveValue> style = propertyID == CSSPropertyTextShadow || s->style() == Normal ? PassRefPtr<CSSPrimitiveValue>() : cssValuePool().createIdentifierValue(CSSValueInset);
  • trunk/Source/WebCore/editing/mac/EditorMac.mm

    r146835 r148049  
    208208        RetainPtr<NSShadow> s(AdoptNS, [[NSShadow alloc] init]);
    209209        [s.get() setShadowOffset:NSMakeSize(shadow->x(), shadow->y())];
    210         [s.get() setShadowBlurRadius:shadow->blur()];
     210        [s.get() setShadowBlurRadius:shadow->radius()];
    211211        [s.get() setShadowColor:nsColor(shadow->color())];
    212212        [result setObject:s.get() forKey:NSShadowAttributeName];
  • trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp

    r144568 r148049  
    115115
    116116    return adoptPtr(new ShadowData(blend(from->location(), to->location(), progress),
    117                                    blend(from->blur(), to->blur(), progress),
     117                                   blend(from->radius(), to->radius(), progress),
    118118                                   blend(from->spread(), to->spread(), progress),
    119119                                   blendFunc(anim, from->style(), to->style(), progress),
  • trunk/Source/WebCore/rendering/EllipsisBox.cpp

    r144542 r148049  
    4343    if (style->textShadow()) {
    4444        context->setShadow(LayoutSize(style->textShadow()->x(), style->textShadow()->y()),
    45                            style->textShadow()->blur(), style->textShadow()->color(), style->colorSpace());
     45                           style->textShadow()->radius(), style->textShadow()->color(), style->colorSpace());
    4646        setShadow = true;
    4747    }
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r147832 r148049  
    390390    int shadowY = horizontal ? shadow->y() : -shadow->x();
    391391    FloatSize shadowOffset(shadowX, shadowY);
    392     int shadowBlur = shadow->blur();
     392    int shadowRadius = shadow->radius();
    393393    const Color& shadowColor = shadow->color();
    394394
    395395    if (shadow->next() || stroked || !opaque) {
    396396        FloatRect shadowRect(textRect);
    397         shadowRect.inflate(shadowBlur);
     397        shadowRect.inflate(shadow->paintingExtent());
    398398        shadowRect.move(shadowOffset);
    399399        context->save();
    400400        context->clip(shadowRect);
    401401
    402         extraOffset = FloatSize(0, 2 * textRect.height() + max(0.0f, shadowOffset.height()) + shadowBlur);
     402        extraOffset = FloatSize(0, 2 * textRect.height() + max(0.0f, shadowOffset.height()) + shadowRadius);
    403403        shadowOffset -= extraOffset;
    404404    }
    405405
    406     context->setShadow(shadowOffset, shadowBlur, shadowColor, context->fillColorSpace());
     406    context->setShadow(shadowOffset, shadowRadius, shadowColor, context->fillColorSpace());
    407407    return extraOffset;
    408408}
     
    11511151        FloatRect clipRect(localOrigin, FloatSize(width, baseline + 2));
    11521152        for (const ShadowData* s = shadow; s; s = s->next()) {
     1153            int shadowExtent = s->paintingExtent();
    11531154            FloatRect shadowRect(localOrigin, FloatSize(width, baseline + 2));
    1154             shadowRect.inflate(s->blur());
     1155            shadowRect.inflate(shadowExtent);
    11551156            int shadowX = isHorizontal() ? s->x() : s->y();
    11561157            int shadowY = isHorizontal() ? s->y() : -s->x();
    11571158            shadowRect.move(shadowX, shadowY);
    11581159            clipRect.unite(shadowRect);
    1159             extraOffset = max(extraOffset, max(0, shadowY) + s->blur());
     1160            extraOffset = max(extraOffset, max(0, shadowY) + shadowExtent);
    11601161        }
    11611162        context->save();
     
    11781179            int shadowX = isHorizontal() ? shadow->x() : shadow->y();
    11791180            int shadowY = isHorizontal() ? shadow->y() : -shadow->x();
    1180             context->setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->blur(), shadow->color(), colorSpace);
     1181            context->setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->radius(), shadow->color(), colorSpace);
    11811182            setShadow = true;
    11821183            shadow = shadow->next();
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r147638 r148049  
    718718    FloatSize shadowOffset(boxShadow->x(), boxShadow->y());
    719719    if (!boxShadow->isWebkitBoxShadow())
    720         context->setShadow(shadowOffset, boxShadow->blur(), boxShadow->color(), style->colorSpace());
     720        context->setShadow(shadowOffset, boxShadow->radius(), boxShadow->color(), style->colorSpace());
    721721    else
    722         context->setLegacyShadow(shadowOffset, boxShadow->blur(), boxShadow->color(), style->colorSpace());
     722        context->setLegacyShadow(shadowOffset, boxShadow->radius(), boxShadow->color(), style->colorSpace());
    723723}
    724724
     
    25272527}
    25282528
    2529 static inline IntRect areaCastingShadowInHole(const IntRect& holeRect, int shadowBlur, int shadowSpread, const IntSize& shadowOffset)
     2529static inline IntRect areaCastingShadowInHole(const IntRect& holeRect, int shadowExtent, int shadowSpread, const IntSize& shadowOffset)
    25302530{
    25312531    IntRect bounds(holeRect);
    25322532   
    2533     bounds.inflate(shadowBlur);
     2533    bounds.inflate(shadowExtent);
    25342534
    25352535    if (shadowSpread < 0)
     
    25602560
    25612561        IntSize shadowOffset(shadow->x(), shadow->y());
    2562         int shadowBlur = shadow->blur();
     2562        int shadowRadius = shadow->radius();
     2563        int shadowPaintingExtent = shadow->paintingExtent();
    25632564        int shadowSpread = shadow->spread();
    25642565       
    2565         if (shadowOffset.isZero() && !shadowBlur && !shadowSpread)
     2566        if (shadowOffset.isZero() && !shadowRadius && !shadowSpread)
    25662567            continue;
    25672568       
     
    25752576
    25762577            IntRect shadowRect(border.rect());
    2577             shadowRect.inflate(shadowBlur + shadowSpread);
     2578            shadowRect.inflate(shadowPaintingExtent + shadowSpread);
    25782579            shadowRect.move(shadowOffset);
    25792580
     
    25832584            // Move the fill just outside the clip, adding 1 pixel separation so that the fill does not
    25842585            // bleed in (due to antialiasing) if the context is transformed.
    2585             IntSize extraOffset(paintRect.pixelSnappedWidth() + max(0, shadowOffset.width()) + shadowBlur + 2 * shadowSpread + 1, 0);
     2586            IntSize extraOffset(paintRect.pixelSnappedWidth() + max(0, shadowOffset.width()) + shadowPaintingExtent + 2 * shadowSpread + 1, 0);
    25862587            shadowOffset -= extraOffset;
    25872588            fillRect.move(extraOffset);
    25882589
    25892590            if (shadow->isWebkitBoxShadow())
    2590                 context->setLegacyShadow(shadowOffset, shadowBlur, shadowColor, s->colorSpace());
     2591                context->setLegacyShadow(shadowOffset, shadowRadius, shadowColor, s->colorSpace());
    25912592            else
    2592                 context->setShadow(shadowOffset, shadowBlur, shadowColor, s->colorSpace());
     2593                context->setShadow(shadowOffset, shadowRadius, shadowColor, s->colorSpace());
    25932594
    25942595            if (hasBorderRadius) {
     
    26062607
    26072608                RoundedRect influenceRect(shadowRect, border.radii());
    2608                 influenceRect.expandRadii(2 * shadowBlur + shadowSpread);
     2609                influenceRect.expandRadii(2 * shadowPaintingExtent + shadowSpread);
    26092610                if (allCornersClippedOut(influenceRect, info.rect))
    26102611                    context->fillRect(fillRect.rect(), Color::black, s->colorSpace());
     
    26492650            if (!includeLogicalLeftEdge) {
    26502651                if (isHorizontal) {
    2651                     holeRect.move(-max(shadowOffset.width(), 0) - shadowBlur, 0);
    2652                     holeRect.setWidth(holeRect.width() + max(shadowOffset.width(), 0) + shadowBlur);
     2652                    holeRect.move(-max(shadowOffset.width(), 0) - shadowPaintingExtent, 0);
     2653                    holeRect.setWidth(holeRect.width() + max(shadowOffset.width(), 0) + shadowPaintingExtent);
    26532654                } else {
    2654                     holeRect.move(0, -max(shadowOffset.height(), 0) - shadowBlur);
    2655                     holeRect.setHeight(holeRect.height() + max(shadowOffset.height(), 0) + shadowBlur);
     2655                    holeRect.move(0, -max(shadowOffset.height(), 0) - shadowPaintingExtent);
     2656                    holeRect.setHeight(holeRect.height() + max(shadowOffset.height(), 0) + shadowPaintingExtent);
    26562657                }
    26572658            }
    26582659            if (!includeLogicalRightEdge) {
    26592660                if (isHorizontal)
    2660                     holeRect.setWidth(holeRect.width() - min(shadowOffset.width(), 0) + shadowBlur);
     2661                    holeRect.setWidth(holeRect.width() - min(shadowOffset.width(), 0) + shadowPaintingExtent);
    26612662                else
    2662                     holeRect.setHeight(holeRect.height() - min(shadowOffset.height(), 0) + shadowBlur);
     2663                    holeRect.setHeight(holeRect.height() - min(shadowOffset.height(), 0) + shadowPaintingExtent);
    26632664            }
    26642665
    26652666            Color fillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), 255);
    26662667
    2667             IntRect outerRect = areaCastingShadowInHole(border.rect(), shadowBlur, shadowSpread, shadowOffset);
     2668            IntRect outerRect = areaCastingShadowInHole(border.rect(), shadowPaintingExtent, shadowSpread, shadowOffset);
    26682669            RoundedRect roundedHole(holeRect, border.radii());
    26692670
     
    26772678                context->clip(border.rect());
    26782679
    2679             IntSize extraOffset(2 * paintRect.pixelSnappedWidth() + max(0, shadowOffset.width()) + shadowBlur - 2 * shadowSpread + 1, 0);
     2680            IntSize extraOffset(2 * paintRect.pixelSnappedWidth() + max(0, shadowOffset.width()) + shadowPaintingExtent - 2 * shadowSpread + 1, 0);
    26802681            context->translate(extraOffset.width(), extraOffset.height());
    26812682            shadowOffset -= extraOffset;
    26822683
    26832684            if (shadow->isWebkitBoxShadow())
    2684                 context->setLegacyShadow(shadowOffset, shadowBlur, shadowColor, s->colorSpace());
     2685                context->setLegacyShadow(shadowOffset, shadowRadius, shadowColor, s->colorSpace());
    26852686            else
    2686                 context->setShadow(shadowOffset, shadowBlur, shadowColor, s->colorSpace());
     2687                context->setShadow(shadowOffset, shadowRadius, shadowColor, s->colorSpace());
    26872688
    26882689            context->fillRectWithRoundedHole(outerRect, roundedHole, fillColor, s->colorSpace());
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r146408 r148049  
    13461346        if (shadow->style() == Inset)
    13471347            continue;
    1348         int blurAndSpread = shadow->blur() + shadow->spread();
    1349 
    1350         top = min<LayoutUnit>(top, shadow->y() - blurAndSpread);
    1351         right = max<LayoutUnit>(right, shadow->x() + blurAndSpread);
    1352         bottom = max<LayoutUnit>(bottom, shadow->y() + blurAndSpread);
    1353         left = min<LayoutUnit>(left, shadow->x() - blurAndSpread);
     1348
     1349        int extentAndSpread = shadow->paintingExtent() + shadow->spread();
     1350        top = min<LayoutUnit>(top, shadow->y() - extentAndSpread);
     1351        right = max<LayoutUnit>(right, shadow->x() + extentAndSpread);
     1352        bottom = max<LayoutUnit>(bottom, shadow->y() + extentAndSpread);
     1353        left = min<LayoutUnit>(left, shadow->x() - extentAndSpread);
    13541354    }
    13551355}
     
    13651365        if (shadow->style() == Normal)
    13661366            continue;
    1367         int blurAndSpread = shadow->blur() + shadow->spread();
    1368         top = max<LayoutUnit>(top, shadow->y() + blurAndSpread);
    1369         right = min<LayoutUnit>(right, shadow->x() - blurAndSpread);
    1370         bottom = min<LayoutUnit>(bottom, shadow->y() - blurAndSpread);
    1371         left = max<LayoutUnit>(left, shadow->x() + blurAndSpread);
     1367
     1368        int extentAndSpread = shadow->paintingExtent() + shadow->spread();
     1369        top = max<LayoutUnit>(top, shadow->y() + extentAndSpread);
     1370        right = min<LayoutUnit>(right, shadow->x() - extentAndSpread);
     1371        bottom = min<LayoutUnit>(bottom, shadow->y() - extentAndSpread);
     1372        left = max<LayoutUnit>(left, shadow->x() + extentAndSpread);
    13721373    }
    13731374
     
    13831384        if (shadow->style() == Inset)
    13841385            continue;
    1385         int blurAndSpread = shadow->blur() + shadow->spread();
    1386 
    1387         left = min<LayoutUnit>(left, shadow->x() - blurAndSpread);
    1388         right = max<LayoutUnit>(right, shadow->x() + blurAndSpread);
     1386
     1387        int extentAndSpread = shadow->paintingExtent() + shadow->spread();
     1388        left = min<LayoutUnit>(left, shadow->x() - extentAndSpread);
     1389        right = max<LayoutUnit>(right, shadow->x() + extentAndSpread);
    13891390    }
    13901391}
     
    13981399        if (shadow->style() == Inset)
    13991400            continue;
    1400         int blurAndSpread = shadow->blur() + shadow->spread();
    1401 
    1402         top = min<LayoutUnit>(top, shadow->y() - blurAndSpread);
    1403         bottom = max<LayoutUnit>(bottom, shadow->y() + blurAndSpread);
     1401
     1402        int extentAndSpread = shadow->paintingExtent() + shadow->spread();
     1403        top = min<LayoutUnit>(top, shadow->y() - extentAndSpread);
     1404        bottom = max<LayoutUnit>(bottom, shadow->y() + extentAndSpread);
    14041405    }
    14051406}
  • trunk/Source/WebCore/rendering/style/ShadowData.cpp

    r133779 r148049  
    3131ShadowData::ShadowData(const ShadowData& o)
    3232    : m_location(o.m_location)
    33     , m_blur(o.m_blur)
     33    , m_radius(o.m_radius)
    3434    , m_spread(o.m_spread)
    3535    , m_color(o.m_color)
     
    4747   
    4848    return m_location == o.m_location
    49         && m_blur == o.m_blur
     49        && m_radius == o.m_radius
    5050        && m_spread == o.m_spread
    5151        && m_style == o.m_style
     
    5757{
    5858    do {
    59         int blurAndSpread = shadow->blur() + shadow->spread() + additionalOutlineSize;
     59        int extentAndSpread = shadow->paintingExtent() + shadow->spread() + additionalOutlineSize;
    6060        if (shadow->style() == Normal) {
    61             shadowLeft = min(shadow->x() - blurAndSpread, shadowLeft);
    62             shadowRight = max(shadow->x() + blurAndSpread, shadowRight);
    63             shadowTop = min(shadow->y() - blurAndSpread, shadowTop);
    64             shadowBottom = max(shadow->y() + blurAndSpread, shadowBottom);
     61            shadowLeft = min(shadow->x() - extentAndSpread, shadowLeft);
     62            shadowRight = max(shadow->x() + extentAndSpread, shadowRight);
     63            shadowTop = min(shadow->y() - extentAndSpread, shadowTop);
     64            shadowBottom = max(shadow->y() + extentAndSpread, shadowBottom);
    6565        }
    6666
  • trunk/Source/WebCore/rendering/style/ShadowData.h

    r133779 r148049  
    4242public:
    4343    ShadowData()
    44         : m_blur(0)
     44        : m_radius(0)
    4545        , m_spread(0)
    4646        , m_style(Normal)
     
    4949    }
    5050
    51     ShadowData(const IntPoint& location, int blur, int spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
     51    ShadowData(const IntPoint& location, int radius, int spread, ShadowStyle style, bool isWebkitBoxShadow, const Color& color)
    5252        : m_location(location)
    53         , m_blur(blur)
     53        , m_radius(radius)
    5454        , m_spread(spread)
    5555        , m_color(color)
     
    7070    int y() const { return m_location.y(); }
    7171    IntPoint location() const { return m_location; }
    72     int blur() const { return m_blur; }
     72    int radius() const { return m_radius; }
     73    int paintingExtent() const
     74    {
     75        // Blurring uses a Gaussian function whose std. deviation is m_radius/2, and which in theory
     76        // extends to infinity. In 8-bit contexts, however, rounding causes the effect to become
     77        // undetectable at around 1.4x the radius.
     78        const float radiusExtentMultiplier = 1.4;
     79        return ceilf(m_radius * radiusExtentMultiplier);
     80    }
    7381    int spread() const { return m_spread; }
    7482    ShadowStyle style() const { return m_style; }
     
    8492private:
    8593    IntPoint m_location;
    86     int m_blur;
     94    int m_radius; // This is the "blur radius", or twice the standard deviation of the Gaussian blur.
    8795    int m_spread;
    8896    Color m_color;
  • trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp

    r147348 r148049  
    121121        if (shadow) {
    122122            m_paintInfo->context->clip(repaintRect);
    123             m_paintInfo->context->setShadow(IntSize(roundToInt(shadow->x()), roundToInt(shadow->y())), shadow->blur(), shadow->color(), style->colorSpace());
     123            m_paintInfo->context->setShadow(IntSize(roundToInt(shadow->x()), roundToInt(shadow->y())), shadow->radius(), shadow->color(), style->colorSpace());
    124124            m_paintInfo->context->beginTransparencyLayer(1);
    125125            m_renderingFlags |= EndShadowLayer;
Note: See TracChangeset for help on using the changeset viewer.