Changeset 64275 in webkit
- Timestamp:
- Jul 29, 2010 6:50:51 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 134 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64272 r64275 1 2010-07-29 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Dirk Schulze. 4 5 WebKit shouldn't ignore resource cycles, but break them as Opera does 6 https://bugs.webkit.org/show_bug.cgi?id=43031 7 8 Rebaseline results now that cycles are broken, instead of ignored. 9 10 * platform/mac/svg/clip-path/clip-path-recursive-call-by-child-expected.txt: 11 * platform/mac/svg/clip-path/clip-path-recursive-call-expected.checksum: 12 * platform/mac/svg/clip-path/clip-path-recursive-call-expected.png: 13 * platform/mac/svg/custom/circular-marker-reference-4-expected.txt: 14 * platform/mac/svg/custom/gradient-cycle-detection-expected.checksum: 15 * platform/mac/svg/custom/gradient-cycle-detection-expected.png: 16 * platform/mac/svg/custom/recursive-clippath-expected.checksum: 17 * platform/mac/svg/custom/recursive-clippath-expected.png: 18 * platform/mac/svg/custom/recursive-clippath-expected.txt: 19 * platform/mac/svg/custom/recursive-filter-expected.checksum: 20 * platform/mac/svg/custom/recursive-filter-expected.png: 21 * platform/mac/svg/custom/recursive-filter-expected.txt: 22 * platform/mac/svg/custom/recursive-gradient-expected.checksum: 23 * platform/mac/svg/custom/recursive-gradient-expected.png: 24 * platform/mac/svg/custom/recursive-gradient-expected.txt: 25 * platform/mac/svg/custom/recursive-mask-expected.checksum: 26 * platform/mac/svg/custom/recursive-mask-expected.png: 27 * platform/mac/svg/custom/recursive-mask-expected.txt: 28 * platform/mac/svg/custom/recursive-pattern-expected.checksum: 29 * platform/mac/svg/custom/recursive-pattern-expected.png: 30 * platform/mac/svg/custom/recursive-pattern-expected.txt: 31 * platform/mac/svg/custom/use-events-crash-expected.txt: 32 * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr-expected.checksum: 33 * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr-expected.png: 34 * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerWidth-attr-expected.checksum: 35 * platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerWidth-attr-expected.png: 36 * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerHeight-prop-expected.checksum: 37 * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerHeight-prop-expected.png: 38 * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerWidth-prop-expected.checksum: 39 * platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerWidth-prop-expected.png: 40 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.checksum: 41 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png: 42 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.checksum: 43 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png: 44 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskUnits-attr-expected.checksum: 45 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskUnits-attr-expected.png: 46 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.checksum: 47 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png: 48 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.checksum: 49 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png: 50 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.checksum: 51 * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png: 52 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.checksum: 53 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png: 54 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.checksum: 55 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png: 56 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskUnits-prop-expected.checksum: 57 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskUnits-prop-expected.png: 58 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.checksum: 59 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png: 60 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.checksum: 61 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png: 62 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.checksum: 63 * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png: 64 * platform/mac/svg/hixie/error/017-expected.txt: 65 * svg/clip-path/clip-path-recursive-call-by-child.svg: Rewrite test to match expectations, now that cycles are broken, not ignored. Looks like in Opera. 66 * svg/custom/js-late-clipPath-and-object-creation.svg: Don't update from within the onload event, instead use zero-ms timeouts, to test updating reliable. It failed before this patch. 67 * svg/custom/js-late-clipPath-creation.svg: Ditto. 68 * svg/custom/js-late-gradient-and-object-creation.svg: Ditto. 69 * svg/custom/js-late-gradient-creation.svg: Ditto. 70 * svg/custom/js-late-marker-and-object-creation.svg: Ditto. 71 * svg/custom/js-late-marker-creation.svg: Ditto. 72 * svg/custom/js-late-mask-and-object-creation.svg: Ditto. 73 * svg/custom/js-late-mask-creation.svg: Ditto. 74 * svg/custom/js-late-pattern-and-object-creation.svg: Ditto. 75 * svg/custom/js-late-pattern-creation.svg: Ditto. 76 * svg/custom/recursive-clippath.svg: Add a reference rendering, side by side to the test, for the ease of comparision. Passes in WebKit + Opera. 77 * svg/custom/recursive-filter.svg: Ditto. 78 * svg/custom/recursive-gradient.svg: Ditto. 79 * svg/custom/recursive-mask.svg: Ditto. 80 * svg/custom/recursive-pattern.svg: Ditto. 81 1 82 2010-07-21 Antonio Gomes <tonikitoo@webkit.org> , Grace Kloba <klobag@gmail.com> 2 83 -
trunk/LayoutTests/platform/mac/svg/clip-path/clip-path-recursive-call-by-child-expected.txt
r63420 r64275 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 6 RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse] 7 RenderPath {rect} at (0,0) size 100x 50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,50.00 L0.00,50.00 Z"]8 [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x 507 RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 8 [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100 9 9 RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 10 RenderPath {rect} at (0,0) size 100x 50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]11 [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x 5010 RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 11 [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100 -
trunk/LayoutTests/platform/mac/svg/clip-path/clip-path-recursive-call-expected.checksum
r57511 r64275 1 853de00567d121bea0b7bece66a5d61c 1 778803df0a824ed8f2c7dfa07c56832e -
trunk/LayoutTests/platform/mac/svg/custom/circular-marker-reference-4-expected.txt
r62922 r64275 6 6 RenderPath {path} at (310,240) size 180x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark2] [middle marker=mark2] [end marker=mark2] [data="M-5.00,-2.00 L0.00,-2.00 L5.00,-2.00"] 7 7 RenderSVGResourceMarker {marker} [id="mark2"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00] 8 RenderPath {path} at ( 280,270) size 210x90 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark1] [middle marker=mark1] [end marker=mark1] [data="M-5.00,2.00 L0.00,2.00 L5.00,2.00"]8 RenderPath {path} at (310,300) size 180x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark1] [middle marker=mark1] [end marker=mark1] [data="M-5.00,2.00 L0.00,2.00 L5.00,2.00"] 9 9 RenderPath {path} at (130,270) size 450x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark1] [middle marker=mark1] [end marker=mark1] [data="M-5.00,2.00 L0.00,2.00 L5.00,2.00"] -
trunk/LayoutTests/platform/mac/svg/custom/gradient-cycle-detection-expected.checksum
r38008 r64275 1 c31435453e4b5fe90b3b618f35608ef3 1 a7754e874db94ad931cb2db1054e361f -
trunk/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.checksum
r63421 r64275 1 67516477d9f265bd907635bbade318cd 1 72e669ce7be88c04c721d627b566c3cb -
trunk/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt
r63421 r64275 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at ( 0,0) size 200x3004 RenderSVGRoot {svg} at (29,0) size 292x304 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 6 RenderSVGResourceClipper {clipPath} [id="clipPath_0"] [clipPathUnits=userSpaceOnUse] 7 RenderPath {rect} at ( 0,0) size 100x100 [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]8 [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at ( 0,0) size 100x1009 RenderPath {rect} at ( 0,100) size 100x100 [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"]10 [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at ( 0,100) size 100x1007 RenderPath {rect} at (50,0) size 50x50 [data="M50.00,0.00 L100.00,0.00 L100.00,50.00 L50.00,50.00 Z"] 8 [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at (50,0) size 50x50 9 RenderPath {rect} at (50,150) size 50x50 [data="M50.00,150.00 L100.00,150.00 L100.00,200.00 L50.00,200.00 Z"] 10 [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (50,150) size 50x50 11 11 RenderSVGResourceClipper {clipPath} [id="clipPath_1"] [clipPathUnits=userSpaceOnUse] 12 RenderSVGContainer {use} at (0,100) size 100x100 13 RenderSVGContainer {g} at (0,100) size 100x100 14 RenderPath {rect} at (0,100) size 100x100 [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] 15 [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (0,100) size 100x100 16 RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"] 17 RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"] 18 [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100 19 RenderPath {rect} at (0,100) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,100.00 L200.00,100.00 L200.00,300.00 L0.00,300.00 Z"] 20 RenderPath {rect} at (0,100) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,100.00 L200.00,100.00 L200.00,300.00 L0.00,300.00 Z"] 21 [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (0,100) size 100x100 12 RenderSVGContainer {use} at (50,150) size 50x50 13 RenderSVGContainer {g} at (50,150) size 50x50 14 RenderPath {rect} at (50,150) size 50x50 [data="M50.00,150.00 L100.00,150.00 L100.00,200.00 L50.00,200.00 Z"] 15 [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (50,150) size 50x50 16 RenderPath {rect} at (50,0) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,0.00 L150.00,0.00 L150.00,100.00 L50.00,100.00 Z"] 17 RenderPath {rect} at (50,0) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,0.00 L150.00,0.00 L150.00,100.00 L50.00,100.00 Z"] 18 [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at (50,0) size 50x50 19 RenderPath {rect} at (50,150) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,150.00 L150.00,150.00 L150.00,250.00 L50.00,250.00 Z"] 20 RenderPath {rect} at (50,150) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,150.00 L150.00,150.00 L150.00,250.00 L50.00,250.00 Z"] 21 [clipPath="clipPath_1"] RenderSVGResourceClipper {clipPath} at (50,150) size 50x50 22 RenderPath {line} at (174,0) size 2x250 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#000000]}] [data="M175.00,0.00 L175.00,250.00"] 23 RenderSVGText {text} at (29,286) size 292x18 contains 1 chunk(s) 24 RenderSVGInlineText {#text} at (0,0) size 292x18 25 chunk 1 (middle anchor) text run 1 at (29.00,300.00) startOffset 0 endOffset 48 width 292.00: "Both sides of the red line should look identical" 26 RenderSVGContainer {g} at (200,0) size 100x250 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}] 27 RenderPath {rect} at (200,0) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,0.00 L150.00,0.00 L150.00,100.00 L50.00,100.00 Z"] 28 RenderPath {rect} at (200,0) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,0.00 L100.00,0.00 L100.00,50.00 L50.00,50.00 Z"] 29 RenderPath {rect} at (200,150) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,150.00 L150.00,150.00 L150.00,250.00 L50.00,250.00 Z"] 30 RenderPath {rect} at (200,150) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,150.00 L100.00,150.00 L100.00,200.00 L50.00,200.00 Z"] -
trunk/LayoutTests/platform/mac/svg/custom/recursive-filter-expected.checksum
r63300 r64275 1 dda4f1b67cf9fb2058815ce9466326fc 1 0e4859e3b02f2f48bba2c68cad4e0e7b -
trunk/LayoutTests/platform/mac/svg/custom/recursive-filter-expected.txt
r63300 r64275 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at ( 0,0) size 111x2104 RenderSVGRoot {svg} at (29,0) size 292x304 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 RenderSVGResourceFilter {filter} [id="filter0"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse] 7 [feGaussianBlur stdDeviation="4.00, 4.00"] 8 [SourceGraphic] 6 9 RenderSVGResourceFilter {filter} [id="filter1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse] 7 10 [feGaussianBlur stdDeviation="4.00, 4.00"] 8 11 [SourceGraphic] 9 12 RenderSVGResourceFilter {filter} [id="filter2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse] 10 RenderPath {rect} at (0,0) size 111x111 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 11 [filter="filter1"] RenderSVGResourceFilter {filter} at (-10,-10) size 120x120 12 RenderPath {rect} at (0,90) size 111x120 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] 13 [filter="filter2"] RenderSVGResourceFilter {filter} at (-10,90) size 120x120 13 RenderPath {rect} at (40,0) size 120x111 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,0.00 L150.00,0.00 L150.00,100.00 L50.00,100.00 Z"] 14 [filter="filter1"] RenderSVGResourceFilter {filter} at (40,-10) size 120x120 15 RenderPath {rect} at (40,140) size 120x120 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,150.00 L150.00,150.00 L150.00,250.00 L50.00,250.00 Z"] 16 [filter="filter2"] RenderSVGResourceFilter {filter} at (40,140) size 120x120 17 RenderPath {line} at (174,0) size 2x250 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#000000]}] [data="M175.00,0.00 L175.00,250.00"] 18 RenderSVGText {text} at (29,286) size 292x18 contains 1 chunk(s) 19 RenderSVGInlineText {#text} at (0,0) size 292x18 20 chunk 1 (middle anchor) text run 1 at (29.00,300.00) startOffset 0 endOffset 48 width 292.00: "Both sides of the red line should look identical" 21 RenderSVGContainer {g} at (190,0) size 120x111 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}] 22 RenderPath {rect} at (190,0) size 120x111 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,0.00 L150.00,0.00 L150.00,100.00 L50.00,100.00 Z"] 23 [filter="filter0"] RenderSVGResourceFilter {filter} at (40,-10) size 120x120 -
trunk/LayoutTests/platform/mac/svg/custom/recursive-gradient-expected.checksum
r63416 r64275 1 efd46e2c198be8ead9a8d0392dbc1e94 1 2e73268fd422007888f75dd8c8ba6490 -
trunk/LayoutTests/platform/mac/svg/custom/recursive-gradient-expected.txt
r63416 r64275 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (0,0) size 201x2014 RenderSVGRoot {svg} at (0,0) size 451x254 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 RenderSVGResourceRadialGradient {radialGradient} [id="gradient 1"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.15,0.15)] [radius=0.50]6 RenderSVGResourceRadialGradient {radialGradient} [id="gradient0"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50] 7 7 RenderSVGGradientStop {stop} [offset=0.00] [color=#0000FF] 8 8 RenderSVGGradientStop {stop} [offset=1.00] [color=#FF0000] 9 RenderSVGResourceRadialGradient {radialGradient} [id="gradient2"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.15,0.15)] [radius=0.50] 10 RenderSVGResourceRadialGradient {radialGradient} [id="gradient3"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.15,0.15)] [radius=0.50] 9 RenderSVGResourceRadialGradient {radialGradient} [id="gradient1"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50] 10 RenderSVGGradientStop {stop} [offset=0.00] [color=#0000FF] 11 RenderSVGGradientStop {stop} [offset=1.00] [color=#FF0000] 12 RenderSVGResourceRadialGradient {radialGradient} [id="gradient2"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50] 13 RenderSVGResourceRadialGradient {radialGradient} [id="gradient4"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50] 14 RenderSVGResourceRadialGradient {radialGradient} [id="gradient3"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50] 11 15 RenderPath {rect} at (0,0) size 101x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=RADIAL-GRADIENT] [id="gradient1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 12 16 RenderPath {rect} at (99,0) size 102x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=RADIAL-GRADIENT] [id="gradient2"]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"] 13 17 RenderPath {rect} at (0,99) size 101x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=RADIAL-GRADIENT] [id="gradient3"]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] 18 RenderPath {line} at (224,0) size 2x200 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#000000]}] [data="M225.00,0.00 L225.00,200.00"] 19 RenderSVGText {text} at (79,236) size 292x18 contains 1 chunk(s) 20 RenderSVGInlineText {#text} at (0,0) size 292x18 21 chunk 1 (middle anchor) text run 1 at (79.00,250.00) startOffset 0 endOffset 48 width 292.00: "Both sides of the red line should look identical" 22 RenderSVGContainer {g} at (249,0) size 202x201 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,0.00)}] 23 RenderPath {rect} at (249,0) size 102x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=RADIAL-GRADIENT] [id="gradient0"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 24 RenderPath {rect} at (349,0) size 102x101 [stroke={[type=SOLID] [color=#008000]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"] 25 RenderPath {rect} at (249,99) size 102x102 [stroke={[type=SOLID] [color=#008000]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] -
trunk/LayoutTests/platform/mac/svg/custom/recursive-mask-expected.checksum
r63300 r64275 1 7f078b4f3971b046bbab30231bfb350c 1 a3e27e4285fbd10b7edbf738101b1339 -
trunk/LayoutTests/platform/mac/svg/custom/recursive-mask-expected.txt
r63421 r64275 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (0,0) size 150x2504 RenderSVGRoot {svg} at (0,0) size 350x204 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 6 RenderSVGResourceMasker {mask} [id="mask1"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse] … … 14 14 RenderPath {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M100.00,100.00 L150.00,100.00 L150.00,150.00 L100.00,150.00 Z"] 15 15 [masker="mask2"] RenderSVGResourceMasker {mask} at (0,0) size 0x0 16 RenderPath {rect} at (0, 200) size 50x50 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,200.00 L50.00,200.00 L50.00,250.00 L0.00,250.00 Z"]17 [masker="mask4"] RenderSVGResourceMasker {mask} at (0, 200) size 50x5016 RenderPath {rect} at (0,100) size 50x50 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,100.00 L50.00,100.00 L50.00,150.00 L0.00,150.00 Z"] 17 [masker="mask4"] RenderSVGResourceMasker {mask} at (0,100) size 50x50 18 18 RenderSVGResourceMasker {mask} [id="mask4"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse] 19 RenderSVGContainer {use} at (0, 200) size 50x5020 RenderSVGContainer {g} at (0, 200) size 50x5021 RenderPath {rect} at (0, 200) size 50x50 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,200.00 L50.00,200.00 L50.00,250.00 L0.00,250.00 Z"]22 [masker="mask4"] RenderSVGResourceMasker {mask} at (0, 200) size 50x5023 RenderPath {rect} at (0,0) size 50x50 [ stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]19 RenderSVGContainer {use} at (0,100) size 50x50 20 RenderSVGContainer {g} at (0,100) size 50x50 21 RenderPath {rect} at (0,100) size 50x50 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,100.00 L50.00,100.00 L50.00,150.00 L0.00,150.00 Z"] 22 [masker="mask4"] RenderSVGResourceMasker {mask} at (0,100) size 50x50 23 RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 24 24 [masker="mask1"] RenderSVGResourceMasker {mask} at (0,0) size 50x50 25 RenderPath {rect} at (100,0) size 50x50 [ stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"]25 RenderPath {rect} at (100,0) size 50x50 [fill={[type=SOLID] [color=#0000FF]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"] 26 26 [masker="mask2"] RenderSVGResourceMasker {mask} at (100,0) size 50x50 27 RenderPath {rect} at (0,0) size 0x0 [ stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"]27 RenderPath {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#0000FF]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"] 28 28 [masker="mask3"] RenderSVGResourceMasker {mask} at (0,0) size 0x0 29 RenderPath {rect} at (0,200) size 50x50 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,200.00 L100.00,200.00 L100.00,300.00 L0.00,300.00 Z"] 30 [masker="mask4"] RenderSVGResourceMasker {mask} at (0,200) size 50x50 29 RenderPath {rect} at (0,100) size 50x50 [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] 30 [masker="mask4"] RenderSVGResourceMasker {mask} at (0,100) size 50x50 31 RenderPath {line} at (174,0) size 2x150 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#000000]}] [data="M175.00,0.00 L175.00,150.00"] 32 RenderSVGText {text} at (29,186) size 292x18 contains 1 chunk(s) 33 RenderSVGInlineText {#text} at (0,0) size 292x18 34 chunk 1 (middle anchor) text run 1 at (29.00,200.00) startOffset 0 endOffset 48 width 292.00: "Both sides of the red line should look identical" 35 RenderSVGContainer {g} at (200,0) size 150x150 [transform={m=((1.00,0.00)(0.00,1.00)) t=(200.00,0.00)}] 36 RenderPath {rect} at (200,0) size 50x50 [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 37 RenderPath {rect} at (300,0) size 50x50 [fill={[type=SOLID] [color=#0000FF]}] [data="M100.00,0.00 L150.00,0.00 L150.00,50.00 L100.00,50.00 Z"] 38 RenderPath {rect} at (200,100) size 50x50 [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,100.00 L50.00,100.00 L50.00,150.00 L0.00,150.00 Z"] -
trunk/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
r63421 r64275 1 c313c4ce6fc9ac267436fef6a4d7f5d6 1 2886112189091c741b0f22d4331cd31c -
trunk/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.txt
r63421 r64275 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (0,0) size 201x4014 RenderSVGRoot {svg} at (0,0) size 650x354 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 RenderSVGResourcePattern {pattern} [id="pattern1"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 7 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 8 RenderSVGResourcePattern {pattern} [id="pattern2"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 9 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 10 RenderSVGResourcePattern {pattern} [id="pattern3"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 11 RenderSVGResourcePattern {pattern} [id="pattern4"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 12 RenderSVGResourcePattern {pattern} [id="pattern6"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 13 RenderSVGResourcePattern {pattern} [id="pattern5"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 14 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern6"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 15 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 16 RenderSVGResourcePattern {pattern} [id="pattern7"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 17 RenderSVGContainer {use} at (0,0) size 100x100 18 RenderSVGContainer {g} at (0,0) size 100x100 19 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 20 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 21 RenderSVGContainer {use} at (0,0) size 100x100 22 RenderSVGContainer {g} at (0,0) size 100x100 23 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 24 RenderSVGResourcePattern {pattern} [id="pattern8"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 25 RenderSVGContainer {use} at (0,0) size 100x100 26 RenderSVGContainer {g} at (0,0) size 100x100 27 RenderSVGContainer {g} at (0,0) size 100x100 28 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 29 RenderPath {rect} at (0,0) size 101x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 30 RenderPath {rect} at (0,99) size 101x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern2"]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] 31 RenderPath {rect} at (99,0) size 102x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern3"]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"] 32 RenderPath {rect} at (99,99) size 102x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern4"]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"] 33 RenderPath {rect} at (0,199) size 101x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern5"]}] [data="M0.00,200.00 L100.00,200.00 L100.00,300.00 L0.00,300.00 Z"] 34 RenderPath {rect} at (99,199) size 102x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern6"]}] [data="M100.00,200.00 L200.00,200.00 L200.00,300.00 L100.00,300.00 Z"] 35 RenderPath {rect} at (0,299) size 101x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,300.00 L100.00,300.00 L100.00,400.00 L0.00,400.00 Z"] 36 RenderPath {rect} at (99,299) size 102x102 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=PATTERN] [id="pattern8"]}] [data="M100.00,300.00 L200.00,300.00 L200.00,400.00 L100.00,400.00 Z"] 6 RenderSVGResourcePattern {pattern} [id="pattern0"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 7 RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 8 RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L150.00,50.00 L150.00,150.00 L50.00,150.00 Z"] 9 RenderSVGResourcePattern {pattern} [id="pattern1"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 10 RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 11 RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L150.00,50.00 L150.00,150.00 L50.00,150.00 Z"] 12 RenderSVGResourcePattern {pattern} [id="pattern2"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 13 RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L150.00,50.00 L150.00,150.00 L50.00,150.00 Z"] 14 RenderPath {rect} at (0,0) size 50x50 [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 15 RenderSVGResourcePattern {pattern} [id="pattern3"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 16 RenderSVGResourcePattern {pattern} [id="pattern4"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 17 RenderSVGResourcePattern {pattern} [id="pattern6"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 18 RenderSVGResourcePattern {pattern} [id="pattern5"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 19 RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 20 RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L150.00,50.00 L150.00,150.00 L50.00,150.00 Z"] 21 RenderPath {rect} at (0,0) size 50x50 [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 22 RenderSVGResourcePattern {pattern} [id="pattern7"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 23 RenderSVGContainer {use} at (0,0) size 50x50 24 RenderSVGContainer {g} at (0,0) size 50x50 25 RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 26 RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L150.00,50.00 L150.00,150.00 L50.00,150.00 Z"] 27 RenderPath {rect} at (0,0) size 50x50 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 28 RenderSVGContainer {use} at (0,0) size 50x50 29 RenderSVGContainer {g} at (0,0) size 50x50 30 RenderPath {rect} at (0,0) size 50x50 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 31 RenderSVGResourcePattern {pattern} [id="pattern8"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 32 RenderSVGContainer {g} at (0,0) size 150x150 33 RenderSVGContainer {use} at (50,50) size 100x100 34 RenderSVGContainer {g} at (50,50) size 100x100 35 RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L150.00,50.00 L150.00,150.00 L50.00,150.00 Z"] 36 RenderSVGContainer {use} at (0,0) size 50x50 37 RenderSVGContainer {g} at (0,0) size 50x50 38 RenderSVGContainer {g} at (0,0) size 50x50 39 RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 40 RenderSVGResourcePattern {pattern} [id="pattern9"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] 41 RenderSVGContainer {use} at (0,0) size 150x150 42 RenderSVGContainer {g} at (0,0) size 150x150 43 RenderSVGContainer {g} at (0,0) size 150x150 44 RenderSVGContainer {g} at (50,50) size 100x100 45 RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M50.00,50.00 L150.00,50.00 L150.00,150.00 L50.00,150.00 Z"] 46 RenderSVGContainer {g} at (0,0) size 50x50 47 RenderSVGContainer {g} at (0,0) size 50x50 48 RenderPath {rect} at (0,0) size 50x50 [fill={[type=PATTERN] [id="pattern8"]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"] 49 RenderPath {rect} at (0,0) size 100x100 [fill={[type=PATTERN] [id="pattern1"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 50 RenderPath {rect} at (100,0) size 100x100 [fill={[type=PATTERN] [id="pattern2"]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"] 51 RenderPath {rect} at (200,0) size 100x100 [fill={[type=PATTERN] [id="pattern3"]}] [data="M200.00,0.00 L300.00,0.00 L300.00,100.00 L200.00,100.00 Z"] 52 RenderPath {rect} at (0,100) size 100x100 [fill={[type=PATTERN] [id="pattern4"]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] 53 RenderPath {rect} at (100,100) size 100x100 [fill={[type=PATTERN] [id="pattern5"]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"] 54 RenderPath {rect} at (200,100) size 100x100 [fill={[type=PATTERN] [id="pattern6"]}] [data="M200.00,100.00 L300.00,100.00 L300.00,200.00 L200.00,200.00 Z"] 55 RenderPath {rect} at (0,200) size 100x100 [fill={[type=PATTERN] [id="pattern7"]}] [data="M0.00,200.00 L100.00,200.00 L100.00,300.00 L0.00,300.00 Z"] 56 RenderPath {rect} at (100,200) size 100x100 [fill={[type=PATTERN] [id="pattern8"]}] [data="M100.00,200.00 L200.00,200.00 L200.00,300.00 L100.00,300.00 Z"] 57 RenderPath {rect} at (200,200) size 100x100 [fill={[type=PATTERN] [id="pattern9"]}] [data="M200.00,200.00 L300.00,200.00 L300.00,300.00 L200.00,300.00 Z"] 58 RenderPath {line} at (324,0) size 2x300 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#000000]}] [data="M325.00,0.00 L325.00,300.00"] 59 RenderSVGText {text} at (179,336) size 292x18 contains 1 chunk(s) 60 RenderSVGInlineText {#text} at (0,0) size 292x18 61 chunk 1 (middle anchor) text run 1 at (179.00,350.00) startOffset 0 endOffset 48 width 292.00: "Both sides of the red line should look identical" 62 RenderSVGContainer {g} at (350,0) size 300x300 [transform={m=((1.00,0.00)(0.00,1.00)) t=(350.00,0.00)}] 63 RenderPath {rect} at (350,0) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"] 64 RenderPath {rect} at (450,0) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M100.00,0.00 L200.00,0.00 L200.00,100.00 L100.00,100.00 Z"] 65 RenderPath {rect} at (550,0) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M200.00,0.00 L300.00,0.00 L300.00,100.00 L200.00,100.00 Z"] 66 RenderPath {rect} at (350,100) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M0.00,100.00 L100.00,100.00 L100.00,200.00 L0.00,200.00 Z"] 67 RenderPath {rect} at (450,100) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"] 68 RenderPath {rect} at (550,100) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M200.00,100.00 L300.00,100.00 L300.00,200.00 L200.00,200.00 Z"] 69 RenderPath {rect} at (350,200) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M0.00,200.00 L100.00,200.00 L100.00,300.00 L0.00,300.00 Z"] 70 RenderPath {rect} at (450,200) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M100.00,200.00 L200.00,200.00 L200.00,300.00 L100.00,300.00 Z"] 71 RenderPath {rect} at (550,200) size 100x100 [fill={[type=PATTERN] [id="pattern0"]}] [data="M200.00,200.00 L300.00,200.00 L300.00,300.00 L200.00,300.00 Z"] -
trunk/LayoutTests/platform/mac/svg/custom/use-events-crash-expected.txt
r62922 r64275 20 20 RenderSVGContainer {g} at (350,25) size 40x40 21 21 RenderPath {rect} at (350,25) size 40x40 [fill={[type=SOLID] [color=#00FF00]}] [data="M0.00,0.00 L40.00,0.00 L40.00,40.00 L0.00,40.00 Z"] 22 caret: position 0 of child 0 {#text} of child 1 {text} of child 1 {g} of child 3 {g} of child 3 {g} of child 1 {svg} of document -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr-expected.checksum
r63730 r64275 1 224fae800d3d427aba91701730990d02 1 7d9ed1ba3cca05516d0a91561ed24feb -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMarkerElement-dom-markerWidth-attr-expected.checksum
r63730 r64275 1 11c3c4e16ba9180cdaeb785027d292e21 5bf96e5173d6653c73e6163b7e203c72 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerHeight-prop-expected.checksum
r63730 r64275 1 c2ba9334d9a0f68b163099615799ac391 31c467d114864ed4ea30162d45c6c289 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMarkerElement-svgdom-markerWidth-prop-expected.checksum
r63730 r64275 1 7ef89ade3d06a052d987f755b9dfcaf21 4080ad4d8c7c50db21c1b2a2b98e0562 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.checksum
r63730 r64275 1 d11382e9cbf749aadd4a0953a865956e 1 6669ab446ddc0ff912c784ee18705928 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.checksum
r63730 r64275 1 173b41ad238e25454717720add78ea84 1 cca7e1243ffc4052ae39c1729fe5676a -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskUnits-attr-expected.checksum
r63730 r64275 1 382386d8794e17490484c55f5b025481 1 4d9ca776de74d7e38d9e758a89b93d27 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.checksum
r63730 r64275 1 c 17365eee489e97e9b1bb7f649414ee11 ca73b7faa6d86098712f37b66bbc1c82 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.checksum
r63730 r64275 1 716714632a1b9c8b0c947a52a354e676 1 3019c8444d91d7c726cd6a6d2540fb1e -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.checksum
r63730 r64275 1 0c5df953535e3db2abb9d999b01032b7 1 70ef44d927c6ad84a702c9771c169905 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.checksum
r63730 r64275 1 d6ce0b1dc577c6fbff58f0f3f4f56d32 1 414528c414a3ad821d167564502995bb -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.checksum
r63730 r64275 1 0e2770c1b7a4543ad89484ef9fa5a0b6 1 51768de61cfef35e4c8f5d45029ffa8c -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskUnits-prop-expected.checksum
r63730 r64275 1 4dcda8de30ac50477518851d437d282d 1 21e1b5d7baf0d61fe046185ce31c8263 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.checksum
r63730 r64275 1 5d0b62709f3a4d7733ab98e58ccc7b1f 1 d79313dfe1948cb30b740f17f7861030 -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.checksum
r63730 r64275 1 b 0d903966f3ebfa1be3346b5bd0a85211 bb05754e3fbf1cd483529bc6024a8e0e -
trunk/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.checksum
r63730 r64275 1 0ec6e3c4aef5a60c2b8f0efcc05b26cb 1 a3b34c5887a55c800641ee576b137d06 -
trunk/LayoutTests/platform/mac/svg/hixie/error/017-expected.txt
r62922 r64275 7 7 RenderSVGContainer {use} at (0,0) size 0x0 8 8 RenderSVGContainer {g} at (0,0) size 0x0 9 RenderSVGContainer {g} at (0,0) size 0x010 RenderSVGContainer {g} at (0,0) size 0x011 9 RenderSVGContainer {g} at (0,0) size 0x0 12 10 RenderSVGContainer {use} at (0,0) size 0x0 -
trunk/LayoutTests/svg/clip-path/clip-path-recursive-call-by-child.svg
r63420 r64275 2 2 <defs> 3 3 <clipPath id="clip"> 4 <rect x="0" y="0" width="100" height=" 50" clip-path="url(#clip)"/>4 <rect x="0" y="0" width="100" height="100" clip-path="url(#clip)"/> 5 5 </clipPath> 6 6 </defs> -
trunk/LayoutTests/svg/custom/js-late-clipPath-and-object-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createClipPath()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <g id="content" transform="scale(1, 1.5)"/> 5 5 <script> 6 6 var content = document.getElementById("content"); 7 7 8 if (window.layoutTestController) 9 layoutTestController.waitUntilDone(); 10 11 setTimeout(createObject, 0); 12 8 13 function createObject() 9 14 { … … 17 22 text.appendChild(document.createTextNode("Clipped. INVISIBLE.")); 18 23 content.appendChild(text); 24 25 setTimeout(createClipPath, 0); 19 26 } 20 27 21 28 function createClipPath() 22 29 { 23 createObject();24 25 30 var clipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"); 26 31 clipPath.setAttribute("id", "dynClip"); … … 32 37 clipPath.appendChild(path); 33 38 content.appendChild(clipPath); 39 40 if (window.layoutTestController) 41 layoutTestController.notifyDone(); 34 42 } 35 43 </script> -
trunk/LayoutTests/svg/custom/js-late-clipPath-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createClipPath()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <g id="content" transform="scale(1, 1.5)"> 5 5 <text font-size="60" fill="navy" clip-path="url(#dynClip)" x="10" y="70">Clipped. INVISIBLE.</text> … … 7 7 <script> 8 8 var content = document.getElementById("content"); 9 10 if (window.layoutTestController) 11 layoutTestController.waitUntilDone(); 12 13 setTimeout(createClipPath, 0); 9 14 10 15 function createClipPath() … … 19 24 clipPath.appendChild(path); 20 25 content.appendChild(clipPath); 26 27 if (window.layoutTestController) 28 layoutTestController.notifyDone(); 21 29 } 22 30 </script> -
trunk/LayoutTests/svg/custom/js-late-gradient-and-object-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createGradients()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <g id="content"/> 5 5 6 6 <script> 7 7 var content = document.getElementById("content"); 8 8 9 function createGradients() 10 { 11 // Setup "fillLinearGradient" 12 var gradient1 = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"); 13 gradient1.setAttribute("id", "fillLinearGradient"); 14 gradient1.setAttribute("x1", "0"); 15 gradient1.setAttribute("x2", "1"); 9 if (window.layoutTestController) 10 layoutTestController.waitUntilDone(); 16 11 17 var stop11 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 18 stop11.setAttribute("stop-color", "blue"); 19 stop11.setAttribute("offset", "0"); 12 setTimeout(createGradients, 0); 20 13 21 var stop21 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 22 stop21.setAttribute("stop-color", "red"); 23 stop21.setAttribute("offset", "1"); 14 function createGradients() 15 { 16 // Setup "fillLinearGradient" 17 var gradient1 = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"); 18 gradient1.setAttribute("id", "fillLinearGradient"); 19 gradient1.setAttribute("x1", "0"); 20 gradient1.setAttribute("x2", "1"); 24 21 25 gradient1.appendChild(stop11); 26 gradient1.appendChild(stop21); 22 var stop11 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 23 stop11.setAttribute("stop-color", "blue"); 24 stop11.setAttribute("offset", "0"); 27 25 28 content.appendChild(gradient1); 26 var stop21 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 27 stop21.setAttribute("stop-color", "red"); 28 stop21.setAttribute("offset", "1"); 29 29 30 // Setup "strokeLinearGradient" 31 var gradient2 = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"); 32 gradient2.setAttribute("id", "strokeLinearGradient"); 33 gradient2.setAttribute("x1", "0"); 34 gradient2.setAttribute("x2", "1"); 30 gradient1.appendChild(stop11); 31 gradient1.appendChild(stop21); 35 32 36 var stop22 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 37 stop22.setAttribute("stop-color", "yellow"); 38 stop22.setAttribute("offset", "0"); 33 content.appendChild(gradient1); 39 34 40 var stop22 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 41 stop22.setAttribute("stop-color", "green"); 42 stop22.setAttribute("offset", "1"); 35 // Setup "strokeLinearGradient" 36 var gradient2 = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"); 37 gradient2.setAttribute("id", "strokeLinearGradient"); 38 gradient2.setAttribute("x1", "0"); 39 gradient2.setAttribute("x2", "1"); 43 40 44 gradient2.appendChild(stop22); 45 gradient2.appendChild(stop22); 41 var stop22 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 42 stop22.setAttribute("stop-color", "yellow"); 43 stop22.setAttribute("offset", "0"); 46 44 47 content.appendChild(gradient2); 45 var stop22 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 46 stop22.setAttribute("stop-color", "green"); 47 stop22.setAttribute("offset", "1"); 48 48 49 setupGradientUsers();50 } 49 gradient2.appendChild(stop22); 50 gradient2.appendChild(stop22); 51 51 52 function setupGradientUsers() 53 { 54 var text1 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 55 text1.setAttribute("font-size", "68"); 56 text1.setAttribute("x", "-150"); 57 text1.setAttribute("y", "70") 58 text1.setAttribute("fill", "url(#fillLinearGradient)"); 59 text1.setAttribute("stroke", "none"); 60 text1.appendChild(document.createTextNode("Gradient on fill")); 52 content.appendChild(gradient2); 53 setTimeout(setupGradientUsers, 0); 54 } 61 55 62 content.appendChild(text1); 56 function setupGradientUsers() 57 { 58 var text1 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 59 text1.setAttribute("font-size", "68"); 60 text1.setAttribute("x", "-150"); 61 text1.setAttribute("y", "70") 62 text1.setAttribute("fill", "url(#fillLinearGradient)"); 63 text1.setAttribute("stroke", "none"); 64 text1.appendChild(document.createTextNode("Gradient on fill")); 63 65 64 var text2 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 65 text2.setAttribute("font-size", "68"); 66 text2.setAttribute("x", "-150"); 67 text2.setAttribute("y", "140") 68 text2.setAttribute("fill", "none"); 69 text2.setAttribute("stroke", "url(#strokeLinearGradient)"); 70 text2.appendChild(document.createTextNode("Gradient on stroke")); 66 content.appendChild(text1); 71 67 72 content.appendChild(text2); 68 var text2 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 69 text2.setAttribute("font-size", "68"); 70 text2.setAttribute("x", "-150"); 71 text2.setAttribute("y", "140") 72 text2.setAttribute("fill", "none"); 73 text2.setAttribute("stroke", "url(#strokeLinearGradient)"); 74 text2.appendChild(document.createTextNode("Gradient on stroke")); 73 75 74 var text3 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 75 text3.setAttribute("font-size", "68"); 76 text3.setAttribute("x", "-150"); 77 text3.setAttribute("y", "210") 78 text3.setAttribute("fill", "url(#fillLinearGradient)"); 79 text3.setAttribute("stroke", "url(#strokeLinearGradient)"); 80 text3.appendChild(document.createTextNode("Gradient on fill/stroke")); 76 content.appendChild(text2); 81 77 82 content.appendChild(text3); 83 } 78 var text3 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 79 text3.setAttribute("font-size", "68"); 80 text3.setAttribute("x", "-150"); 81 text3.setAttribute("y", "210") 82 text3.setAttribute("fill", "url(#fillLinearGradient)"); 83 text3.setAttribute("stroke", "url(#strokeLinearGradient)"); 84 text3.appendChild(document.createTextNode("Gradient on fill/stroke")); 85 86 content.appendChild(text3); 87 88 if (window.layoutTestController) 89 layoutTestController.notifyDone(); 90 } 84 91 </script> 85 92 -
trunk/LayoutTests/svg/custom/js-late-gradient-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createGradient()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <g id="content" transform="scale(1, 1.5)"> 5 5 <text font-size="68" fill="url(#dynGrad)" x="20" y="70">Gradient on fill</text> 6 6 </g> 7 7 <script> 8 8 var content = document.getElementById("content"); 9 9 10 function createGradient() 11 { 12 var gradient = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"); 13 gradient.setAttribute("id", "dynGrad"); 14 gradient.setAttribute("x1", "0"); 15 gradient.setAttribute("x2", "1"); 10 if (window.layoutTestController) 11 layoutTestController.waitUntilDone(); 16 12 17 var stop1 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 18 stop1.setAttribute("stop-color", "blue"); 19 stop1.setAttribute("offset", "0"); 13 setTimeout(createGradient, 0); 20 14 21 var stop2 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 22 stop2.setAttribute("stop-color", "red"); 23 stop2.setAttribute("offset", "1"); 15 function createGradient() 16 { 17 var gradient = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"); 18 gradient.setAttribute("id", "dynGrad"); 19 gradient.setAttribute("x1", "0"); 20 gradient.setAttribute("x2", "1"); 24 21 25 gradient.appendChild(stop1); 26 gradient.appendChild(stop2); 22 var stop1 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 23 stop1.setAttribute("stop-color", "blue"); 24 stop1.setAttribute("offset", "0"); 27 25 28 content.appendChild(gradient); 29 } 26 var stop2 = document.createElementNS("http://www.w3.org/2000/svg", "stop"); 27 stop2.setAttribute("stop-color", "red"); 28 stop2.setAttribute("offset", "1"); 29 30 gradient.appendChild(stop1); 31 gradient.appendChild(stop2); 32 33 content.appendChild(gradient); 34 35 if (window.layoutTestController) 36 layoutTestController.notifyDone(); 37 } 30 38 </script> 31 39 -
trunk/LayoutTests/svg/custom/js-late-marker-and-object-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createMarker()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <defs id="defs"> 5 5 <marker id="markerStart" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth"> … … 17 17 var content = document.getElementById("content"); 18 18 19 if (window.layoutTestController) 20 layoutTestController.waitUntilDone(); 21 22 setTimeout(createObject, 0); 23 19 24 function createObject() 20 25 { … … 29 34 30 35 content.appendChild(path); 36 setTimeout(createMarker, 0); 31 37 } 32 38 33 39 function createMarker() 34 40 { 35 createObject();36 37 41 var marker = document.createElementNS("http://www.w3.org/2000/svg", "marker"); 38 42 marker.setAttribute("id", "markerMiddle"); … … 53 57 marker.appendChild(circle); 54 58 defs.appendChild(marker); 59 60 if (window.layoutTestController) 61 layoutTestController.notifyDone(); 55 62 } 56 63 </script> -
trunk/LayoutTests/svg/custom/js-late-marker-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createMarker()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <defs id="defs"> 5 5 <marker id="markerStart" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth"> … … 16 16 <script> 17 17 var defs = document.getElementById("defs"); 18 19 if (window.layoutTestController) 20 layoutTestController.waitUntilDone(); 21 22 setTimeout(createMarker, 0); 18 23 19 24 function createMarker() … … 37 42 marker.appendChild(circle); 38 43 defs.appendChild(marker); 44 45 if (window.layoutTestController) 46 layoutTestController.notifyDone(); 39 47 } 40 48 </script> -
trunk/LayoutTests/svg/custom/js-late-mask-and-object-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 800 600" onload="createMask()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 800 600"> 4 4 5 5 <g id="content"/> … … 7 7 <script> 8 8 var content = document.getElementById("content"); 9 10 if (window.layoutTestController) 11 layoutTestController.waitUntilDone(); 12 13 setTimeout(createObject, 0); 9 14 10 15 function createObject() … … 18 23 19 24 content.appendChild(rect); 25 setTimeout(createMask, 0); 20 26 } 21 27 22 28 function createMask() 23 29 { 24 createObject();25 26 30 var mask = document.createElementNS("http://www.w3.org/2000/svg", "mask"); 27 31 mask.setAttribute("id", "dynMask"); … … 39 43 mask.appendChild(rect); 40 44 content.appendChild(mask); 45 46 if (window.layoutTestController) 47 layoutTestController.notifyDone(); 41 48 } 42 49 </script> -
trunk/LayoutTests/svg/custom/js-late-mask-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 800 600" onload="createMask()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 800 600"> 4 4 5 5 <rect x="0" y="100" width="800" height="100" fill="blue" mask="url(#dynMask)"/> … … 8 8 <script> 9 9 var content = document.getElementById("content"); 10 11 if (window.layoutTestController) 12 layoutTestController.waitUntilDone(); 13 14 setTimeout(createMask, 0); 10 15 11 16 function createMask() … … 26 31 mask.appendChild(rect); 27 32 content.appendChild(mask); 33 34 if (window.layoutTestController) 35 layoutTestController.notifyDone(); 28 36 } 29 37 </script> -
trunk/LayoutTests/svg/custom/js-late-pattern-and-object-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createPatterns()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <g id="content"/> 5 5 6 6 <script> 7 7 var content = document.getElementById("content"); 8 8 9 function createPatterns() 10 { 11 // Setup "fillPattern" 12 var pattern1 = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); 13 pattern1.setAttribute("id", "fillPattern"); 14 pattern1.setAttribute("patternUnits", "userSpaceOnUse"); 15 pattern1.setAttribute("x", "0"); 16 pattern1.setAttribute("y", "0"); 17 pattern1.setAttribute("width", "20"); 18 pattern1.setAttribute("height", "20"); 9 if (window.layoutTestController) 10 layoutTestController.waitUntilDone(); 19 11 20 var rect11 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 21 rect11.setAttribute("x", "5"); 22 rect11.setAttribute("y", "5"); 23 rect11.setAttribute("width", "10"); 24 rect11.setAttribute("height", "10"); 25 rect11.setAttribute("fill", "red"); 12 setTimeout(createPatterns, 0); 26 13 27 var rect21 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 28 rect21.setAttribute("x", "10"); 29 rect21.setAttribute("y", "10"); 30 rect21.setAttribute("width", "10"); 31 rect21.setAttribute("height", "10"); 32 rect21.setAttribute("fill", "green"); 14 function createPatterns() 15 { 16 // Setup "fillPattern" 17 var pattern1 = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); 18 pattern1.setAttribute("id", "fillPattern"); 19 pattern1.setAttribute("patternUnits", "userSpaceOnUse"); 20 pattern1.setAttribute("x", "0"); 21 pattern1.setAttribute("y", "0"); 22 pattern1.setAttribute("width", "20"); 23 pattern1.setAttribute("height", "20"); 33 24 34 pattern1.appendChild(rect11); 35 pattern1.appendChild(rect21); 25 var rect11 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 26 rect11.setAttribute("x", "5"); 27 rect11.setAttribute("y", "5"); 28 rect11.setAttribute("width", "10"); 29 rect11.setAttribute("height", "10"); 30 rect11.setAttribute("fill", "red"); 36 31 37 content.appendChild(pattern1); 32 var rect21 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 33 rect21.setAttribute("x", "10"); 34 rect21.setAttribute("y", "10"); 35 rect21.setAttribute("width", "10"); 36 rect21.setAttribute("height", "10"); 37 rect21.setAttribute("fill", "green"); 38 38 39 // Setup "strokePattern" 40 var pattern2 = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); 41 pattern2.setAttribute("id", "strokePattern"); 42 pattern2.setAttribute("patternUnits", "userSpaceOnUse"); 43 pattern2.setAttribute("x", "0"); 44 pattern2.setAttribute("y", "0"); 45 pattern2.setAttribute("width", "20"); 46 pattern2.setAttribute("height", "20"); 39 pattern1.appendChild(rect11); 40 pattern1.appendChild(rect21); 47 41 48 var rect12 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 49 rect12.setAttribute("x", "5"); 50 rect12.setAttribute("y", "5"); 51 rect12.setAttribute("width", "10"); 52 rect12.setAttribute("height", "10"); 53 rect12.setAttribute("fill", "yellow"); 42 content.appendChild(pattern1); 54 43 55 var rect22 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 56 rect22.setAttribute("x", "10"); 57 rect22.setAttribute("y", "10"); 58 rect22.setAttribute("width", "10"); 59 rect22.setAttribute("height", "10"); 60 rect22.setAttribute("fill", "blue"); 44 // Setup "strokePattern" 45 var pattern2 = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); 46 pattern2.setAttribute("id", "strokePattern"); 47 pattern2.setAttribute("patternUnits", "userSpaceOnUse"); 48 pattern2.setAttribute("x", "0"); 49 pattern2.setAttribute("y", "0"); 50 pattern2.setAttribute("width", "20"); 51 pattern2.setAttribute("height", "20"); 61 52 62 pattern2.appendChild(rect12); 63 pattern2.appendChild(rect22); 53 var rect12 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 54 rect12.setAttribute("x", "5"); 55 rect12.setAttribute("y", "5"); 56 rect12.setAttribute("width", "10"); 57 rect12.setAttribute("height", "10"); 58 rect12.setAttribute("fill", "yellow"); 64 59 65 content.appendChild(pattern2); 60 var rect22 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 61 rect22.setAttribute("x", "10"); 62 rect22.setAttribute("y", "10"); 63 rect22.setAttribute("width", "10"); 64 rect22.setAttribute("height", "10"); 65 rect22.setAttribute("fill", "blue"); 66 66 67 setupPatternUsers();68 } 67 pattern2.appendChild(rect12); 68 pattern2.appendChild(rect22); 69 69 70 function setupPatternUsers() 71 { 72 var text1 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 73 text1.setAttribute("font-size", "68"); 74 text1.setAttribute("x", "-150"); 75 text1.setAttribute("y", "70") 76 text1.setAttribute("fill", "url(#fillPattern)"); 77 text1.setAttribute("stroke", "none"); 78 text1.appendChild(document.createTextNode("Pattern on fill")); 70 content.appendChild(pattern2); 79 71 80 content.appendChild(text1); 72 setTimeout(setupPatternUsers, 0); 73 } 81 74 82 var text2 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 83 text2.setAttribute("font-size", "68"); 84 text2.setAttribute("x", "-150"); 85 text2.setAttribute("y", "140") 86 text2.setAttribute("fill", "none"); 87 text2.setAttribute("stroke", "url(#strokePattern)"); 88 text2.appendChild(document.createTextNode("Pattern on stroke")); 75 function setupPatternUsers() 76 { 77 var text1 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 78 text1.setAttribute("font-size", "68"); 79 text1.setAttribute("x", "-150"); 80 text1.setAttribute("y", "70") 81 text1.setAttribute("fill", "url(#fillPattern)"); 82 text1.setAttribute("stroke", "none"); 83 text1.appendChild(document.createTextNode("Pattern on fill")); 89 84 90 content.appendChild(text2);85 content.appendChild(text1); 91 86 92 var text3= document.createElementNS("http://www.w3.org/2000/svg", "text");93 text3.setAttribute("font-size", "68");94 text3.setAttribute("x", "-150");95 text3.setAttribute("y", "210")96 text3.setAttribute("fill", "url(#fillPattern)"); 97 text3.setAttribute("stroke", "url(#strokePattern)");98 text3.appendChild(document.createTextNode("Pattern on fill/stroke"));87 var text2 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 88 text2.setAttribute("font-size", "68"); 89 text2.setAttribute("x", "-150"); 90 text2.setAttribute("y", "140") 91 text2.setAttribute("fill", "none"); 92 text2.setAttribute("stroke", "url(#strokePattern)"); 93 text2.appendChild(document.createTextNode("Pattern on stroke")); 99 94 100 content.appendChild(text3); 101 } 95 content.appendChild(text2); 96 97 var text3 = document.createElementNS("http://www.w3.org/2000/svg", "text"); 98 text3.setAttribute("font-size", "68"); 99 text3.setAttribute("x", "-150"); 100 text3.setAttribute("y", "210") 101 text3.setAttribute("fill", "url(#fillPattern)"); 102 text3.setAttribute("stroke", "url(#strokePattern)"); 103 text3.appendChild(document.createTextNode("Pattern on fill/stroke")); 104 105 content.appendChild(text3); 106 107 if (window.layoutTestController) 108 layoutTestController.notifyDone(); 109 } 102 110 </script> 103 111 -
trunk/LayoutTests/svg/custom/js-late-pattern-creation.svg
r24146 r64275 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="createPattern()">3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> 4 4 <g id="content" transform="scale(1, 1.5)"> 5 5 <text font-size="68" fill="url(#dynPattern)" x="20" y="70">Pattern on fill</text> 6 6 </g> 7 7 <script> 8 8 var content = document.getElementById("content"); 9 9 10 function createPattern() 11 { 12 var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); 13 pattern.setAttribute("id", "dynPattern"); 14 pattern.setAttribute("patternUnits", "userSpaceOnUse"); 15 pattern.setAttribute("x", "0"); 16 pattern.setAttribute("y", "0"); 17 pattern.setAttribute("width", "20"); 18 pattern.setAttribute("height", "20"); 10 if (window.layoutTestController) 11 layoutTestController.waitUntilDone(); 19 12 20 var rect1 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 21 rect1.setAttribute("x", "5"); 22 rect1.setAttribute("y", "5"); 23 rect1.setAttribute("width", "10"); 24 rect1.setAttribute("height", "10"); 25 rect1.setAttribute("fill", "red"); 13 setTimeout(createPattern, 0); 26 14 27 var rect2 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 28 rect2.setAttribute("x", "10"); 29 rect2.setAttribute("y", "10"); 30 rect2.setAttribute("width", "10"); 31 rect2.setAttribute("height", "10"); 32 rect2.setAttribute("fill", "green"); 15 function createPattern() 16 { 17 var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); 18 pattern.setAttribute("id", "dynPattern"); 19 pattern.setAttribute("patternUnits", "userSpaceOnUse"); 20 pattern.setAttribute("x", "0"); 21 pattern.setAttribute("y", "0"); 22 pattern.setAttribute("width", "20"); 23 pattern.setAttribute("height", "20"); 33 24 34 pattern.appendChild(rect1); 35 pattern.appendChild(rect2); 25 var rect1 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 26 rect1.setAttribute("x", "5"); 27 rect1.setAttribute("y", "5"); 28 rect1.setAttribute("width", "10"); 29 rect1.setAttribute("height", "10"); 30 rect1.setAttribute("fill", "red"); 36 31 37 content.appendChild(pattern); 38 } 32 var rect2 = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 33 rect2.setAttribute("x", "10"); 34 rect2.setAttribute("y", "10"); 35 rect2.setAttribute("width", "10"); 36 rect2.setAttribute("height", "10"); 37 rect2.setAttribute("fill", "green"); 38 39 pattern.appendChild(rect1); 40 pattern.appendChild(rect2); 41 42 content.appendChild(pattern); 43 44 if (window.layoutTestController) 45 layoutTestController.notifyDone(); 46 } 39 47 </script> 40 48 -
trunk/LayoutTests/svg/custom/recursive-clippath.svg
r63421 r64275 2 2 <defs> 3 3 <clipPath id='clipPath_0'> 4 <rect x=' 0' y='0' width='100' height='100' fill='none' clip-path='url(#clipPath_0)'/>4 <rect x='50' y='0' width='50' height='50' fill='none' clip-path='url(#clipPath_0)'/> 5 5 </clipPath> 6 6 7 <rect x=' 0' y='100' width='100' height='100' id="rect" fill='none' clip-path='url(#clipPath_1)'/>7 <rect x='50' y='150' width='50' height='50' id="rect" fill='none' clip-path='url(#clipPath_1)'/> 8 8 <clipPath id='clipPath_1'> 9 9 <use xlink:href="#rect"/> … … 14 14 Spec: clip-path: If the IRI reference is not valid (e.g it points to an object that doesn't exist or the object 15 15 is not a ‘clipPath’ element) the ‘clip-path’ property must be treated as if it hadn't been specified. 16 17 Our view is that an clipPath containing a cycle is not valid, and thus should be ignored.18 But the object that references the clipPath should still be drawn.19 16 --> 20 17 21 <rect x=' 0' y='0' width='200' height='200' fill='red'/>22 <rect x=' 0' y='0' width='200' height='200' fill='green' clip-path='url(#clipPath_0)'/>18 <rect x='50' y='0' width='100' height='100' fill='blue'/> 19 <rect x='50' y='0' width='100' height='100' fill='green' clip-path='url(#clipPath_0)'/> 23 20 24 <rect x='0' y='100' width='200' height='200' fill='red'/> 25 <rect x='0' y='100' width='200' height='200' fill='green' clip-path='url(#clipPath_1)'/> 21 <rect x='50' y='150' width='100' height='100' fill='blue'/> 22 <rect x='50' y='150' width='100' height='100' fill='green' clip-path='url(#clipPath_1)'/> 23 24 <line x1="175" x2="175" y1="0" y2="250" stroke="red"/> 25 <text text-anchor="middle" x="175" y="300">Both sides of the red line should look identical</text> 26 27 <!-- This is the reference rendering --> 28 <g transform="translate(150,0)"> 29 <rect x="50" y="0" width="100" height="100" fill="blue"/> 30 <rect x="50" y="0" width="50" height="50" fill="green"/> 31 <rect x="50" y="150" width="100" height="100" fill="blue"/> 32 <rect x="50" y="150" width="50" height="50" fill="green"/> 33 </g> 26 34 </svg> -
trunk/LayoutTests/svg/custom/recursive-filter.svg
r63300 r64275 1 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2 2 <defs> 3 <filter id="filter0"> 4 <feGaussianBlur stdDeviation="4"/> 5 </filter> 6 3 7 <filter id="filter1" filter="url(#filter1)"> 4 8 <feGaussianBlur stdDeviation="4"/> 5 9 </filter> 6 10 11 <!-- WebKit currently does not implement filter chaining --> 7 12 <filter id="filter2" xlink:href="#filter2"/> 8 13 </defs> 9 14 10 15 <!-- This should be blurred --> 11 <rect x=" 0" y="0" width="100" height="100" filter="url(#filter1)" fill="blue" stroke="green"/>16 <rect x="50" y="0" width="100" height="100" filter="url(#filter1)" fill="blue"/> 12 17 13 <!-- This should not crash and not render anything --> 14 <rect x="0" y="100" width="100" height="100" filter="url(#filter2)" fill="blue" stroke="green"/> 18 <!-- This should not render anything --> 19 <rect x="50" y="150" width="100" height="100" filter="url(#filter2)" fill="blue"/> 20 21 <line x1="175" x2="175" y1="0" y2="250" stroke="red"/> 22 <text text-anchor="middle" x="175" y="300">Both sides of the red line should look identical</text> 23 24 <!-- This is the reference rendering --> 25 <g transform="translate(150,0)"> 26 <rect x="50" y="0" width="100" height="100" filter="url(#filter0)" fill="blue"/> 27 </g> 15 28 </svg> -
trunk/LayoutTests/svg/custom/recursive-gradient.svg
r63416 r64275 1 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2 2 <defs> 3 <radialGradient id="gradient0" gradientUnits="objectBoundingBox" cx=".5" cy=".5" fx=".5" fy=".5" r=".5"> 4 <stop stop-color="blue" offset="0"/> 5 <stop stop-color="red" offset="1"/> 6 </radialGradient> 7 3 8 <radialGradient xlink:href="#gradient1" id="gradient1" gradientUnits="objectBoundingBox" cx=".5" cy=".5" fx=".5" fy=".5" r=".5"> 4 9 <stop stop-color="blue" offset="0"/> 5 10 <stop stop-color="red" offset="1"/> 6 11 </radialGradient> 7 <radialGradient id="gradient2" xlink:href="#gradient3"/> 12 13 <radialGradient id="gradient2" xlink:href="#gradient4"/> 14 <radialGradient id="gradient4" xlink:href="#gradient2"/> 8 15 <radialGradient id="gradient3" xlink:href="#gradient2"/> 9 16 </defs> 10 17 11 <!-- This should not crash-->18 <!-- This should render with a gradient --> 12 19 <rect x="0" y="0" width="100" height="100" fill="url(#gradient1)" stroke="green"/> 20 21 <!-- This should not render anything --> 13 22 <rect x="100" y="0" width="100" height="100" fill="url(#gradient2)" stroke="green"/> 23 24 <!-- This should not render anything --> 14 25 <rect x="0" y="100" width="100" height="100" fill="url(#gradient3)" stroke="green"/> 26 27 <line x1="225" x2="225" y1="0" y2="200" stroke="red"/> 28 <text text-anchor="middle" x="225" y="250">Both sides of the red line should look identical</text> 29 30 <!-- This is the reference rendering --> 31 <g transform="translate(250,0)"> 32 <rect x="0" y="0" width="100" height="100" fill="url(#gradient0)" stroke="green"/> 33 <rect x="100" y="0" width="100" height="100" fill="none" stroke="green"/> 34 <rect x="0" y="100" width="100" height="100" fill="none" stroke="green"/> 35 </g> 15 36 </svg> -
trunk/LayoutTests/svg/custom/recursive-mask.svg
r63421 r64275 14 14 </mask> 15 15 16 <rect id="rect" x="0" y=" 200" width="50" height="50" fill="white" mask="url(#mask4)"/>16 <rect id="rect" x="0" y="100" width="50" height="50" fill="white" mask="url(#mask4)"/> 17 17 <mask id="mask4"> 18 18 <use xlink:href="#rect"/> … … 20 20 </defs> 21 21 22 <!-- This should be masked, resultingin a 50x50 rect -->23 <rect x="0" y="0" width="100" height="100" fill="blue" mask="url(#mask1)" stroke="green"/>22 <!-- This should result in a 50x50 rect --> 23 <rect x="0" y="0" width="100" height="100" fill="blue" mask="url(#mask1)"/> 24 24 25 <!-- This should not render anything-->26 <rect x="100" y="0" width="100" height="100" fill="blue" mask="url(#mask2)" stroke="green"/>25 <!-- This should result in a 50x50 rect --> 26 <rect x="100" y="0" width="100" height="100" fill="blue" mask="url(#mask2)"/> 27 27 28 <!-- This should not render anything-->29 <rect x="100" y="100" width="100" height="100" fill="blue" mask="url(#mask3)" stroke="green"/>28 <!-- This should not render --> 29 <rect x="100" y="100" width="100" height="100" fill="blue" mask="url(#mask3)"/> 30 30 31 <!-- This should not render anything --> 32 <rect x="0" y="200" width="100" height="100" fill="blue" mask="url(#mask4)" stroke="green"/> 31 <!-- This should result in a 50x50 rect --> 32 <rect x="0" y="100" width="100" height="100" fill="blue" mask="url(#mask4)"/> 33 34 <line x1="175" x2="175" y1="0" y2="150" stroke="red"/> 35 <text text-anchor="middle" x="175" y="200">Both sides of the red line should look identical</text> 36 37 <!-- This is the reference rendering --> 38 <g transform="translate(200,0)"> 39 <rect x="0" y="0" width="50" height="50" fill="blue"/> 40 <rect x="100" y="0" width="50" height="50" fill="blue"/> 41 <rect x="0" y="100" width="50" height="50" fill="blue"/> 42 </g> 33 43 </svg> -
trunk/LayoutTests/svg/custom/recursive-pattern.svg
r63421 r64275 1 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2 2 <defs> 3 <pattern id="pattern1" x="0" y="0" width="100" height="100"> 4 <rect x="0" y="0" width="100" height="100" fill="url(#pattern1)"/> 3 <pattern patternUnits="userSpaceOnUse" id="pattern0" x="0" y="0" width="100" height="100"> 4 <rect x="0" y="0" width="50" height="50" fill="black"/> 5 <rect x="50" y="50" width="100" height="100" fill="green"/> 5 6 </pattern> 6 7 7 <pattern id="pattern2" x="0" y="0" width="100" height="100"> 8 <rect x="0" y="0" width="100" height="100" fill="url(#pattern1)"/> 8 <pattern patternUnits="userSpaceOnUse" id="pattern1" x="0" y="0" width="100" height="100"> 9 <rect x="0" y="0" width="50" height="50" fill="url(#pattern1)"/> 10 <rect x="50" y="50" width="100" height="100" fill="green"/> 11 </pattern> 12 13 <pattern patternUnits="userSpaceOnUse" id="pattern2" x="0" y="0" width="100" height="100"> 14 <rect x="50" y="50" width="100" height="100" fill="green"/> 15 <rect x="0" y="0" width="50" height="50" fill="url(#pattern1)"/> 9 16 </pattern> 10 17 … … 13 20 14 21 <pattern id="pattern6" xlink:href="#pattern5"/> 15 <pattern id="pattern5" x="0" y="0" width="100" height="100"> 16 <rect x="0" y="0" width="100" height="100" fill="url(#pattern6)"/> 22 <pattern patternUnits="userSpaceOnUse" id="pattern5" x="0" y="0" width="100" height="100"> 23 <rect x="0" y="0" width="50" height="50" fill="url(#pattern6)"/> 24 <rect x="50" y="50" width="100" height="100" fill="green"/> 17 25 </pattern> 18 26 19 <rect id="rect" x="0" y="0" width=" 100" height="100" fill="url(#pattern7)"/>20 <pattern id="pattern7" x="0" y="0" width="100" height="100">27 <rect id="rect" x="0" y="0" width="50" height="50" fill="url(#pattern7)"/> 28 <pattern patternUnits="userSpaceOnUse" id="pattern7" x="0" y="0" width="100" height="100"> 21 29 <use xlink:href="#rect"/> 30 <rect id="reuse" x="50" y="50" width="100" height="100" fill="green"/> 22 31 </pattern> 23 32 24 <rect id="rect2" x="0" y="0" width="100" height="100" fill="url(#pattern8)"/> 25 <use id="use" xlink:href="#rect2"/> 26 <pattern id="pattern8" x="0" y="0" width="100" height="100"> 27 <use xlink:href="#use"/> 33 <rect id="rect2" x="0" y="0" width="50" height="50" fill="url(#pattern8)"/> 34 <use id="use" xlink:href="#rect2"/> 35 <pattern patternUnits="userSpaceOnUse" id="pattern8" x="0" y="0" width="100" height="100"> 36 <g id="reuse2"> 37 <use xlink:href="#reuse"/> 38 <use xlink:href="#use"/> 39 </g> 40 </pattern> 41 42 <pattern patternUnits="userSpaceOnUse" id="pattern9" x="0" y="0" width="100" height="100"> 43 <use xlink:href="#reuse2"/> 28 44 </pattern> 29 45 </defs> 30 46 31 <!-- This should not crash --> 32 <rect x="0" y="0" width="100" height="100" fill="url(#pattern1)" stroke="green"/> 33 <rect x="0" y="100" width="100" height="100" fill="url(#pattern2)" stroke="green"/> 34 <rect x="100" y="0" width="100" height="100" fill="url(#pattern3)" stroke="green"/> 35 <rect x="100" y="100" width="100" height="100" fill="url(#pattern4)" stroke="green"/> 36 <rect x="0" y="200" width="100" height="100" fill="url(#pattern5)" stroke="green"/> 37 <rect x="100" y="200" width="100" height="100" fill="url(#pattern6)" stroke="green"/> 38 <rect x="0" y="300" width="100" height="100" fill="url(#pattern7)" stroke="green"/> 39 <rect x="100" y="300" width="100" height="100" fill="url(#pattern8)" stroke="green"/> 47 <rect x="0" y="0" width="100" height="100" fill="url(#pattern1)"/> 48 <rect x="100" y="0" width="100" height="100" fill="url(#pattern2)"/> 49 <rect x="200" y="0" width="100" height="100" fill="url(#pattern3)"/> 50 <rect x="0" y="100" width="100" height="100" fill="url(#pattern4)"/> 51 <rect x="100" y="100" width="100" height="100" fill="url(#pattern5)"/> 52 <rect x="200" y="100" width="100" height="100" fill="url(#pattern6)"/> 53 <rect x="0" y="200" width="100" height="100" fill="url(#pattern7)"/> 54 <rect x="100" y="200" width="100" height="100" fill="url(#pattern8)"/> 55 <rect x="200" y="200" width="100" height="100" fill="url(#pattern9)"/> 56 57 <line x1="325" x2="325" y1="0" y2="300" stroke="red"/> 58 <text text-anchor="middle" x="325" y="350">Both sides of the red line should look identical</text> 59 60 <!-- This is the reference rendering --> 61 <g transform="translate(350,0)"> 62 <rect x="0" y="0" width="100" height="100" fill="url(#pattern0)"/> 63 <rect x="100" y="0" width="100" height="100" fill="url(#pattern0)"/> 64 <rect x="200" y="0" width="100" height="100" fill="url(#pattern0)"/> 65 <rect x="0" y="100" width="100" height="100" fill="url(#pattern0)"/> 66 <rect x="100" y="100" width="100" height="100" fill="url(#pattern0)"/> 67 <rect x="200" y="100" width="100" height="100" fill="url(#pattern0)"/> 68 <rect x="0" y="200" width="100" height="100" fill="url(#pattern0)"/> 69 <rect x="100" y="200" width="100" height="100" fill="url(#pattern0)"/> 70 <rect x="200" y="200" width="100" height="100" fill="url(#pattern0)"/> 71 </g> 40 72 </svg> -
trunk/WebCore/ChangeLog
r64273 r64275 1 2010-07-29 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Dirk Schulze. 4 5 WebKit shouldn't ignore resource cycles, but break them as Opera does 6 https://bugs.webkit.org/show_bug.cgi?id=43031 7 8 mask images are not updated when render objects' bounds change 9 https://bugs.webkit.org/show_bug.cgi?id=15124 10 11 SVG Gradients do not resize correctly 12 https://bugs.webkit.org/show_bug.cgi?id=41902 13 14 svg/dynamic-updates: SVGMarkerElement markerHeight/Width tests are broken 15 https://bugs.webkit.org/show_bug.cgi?id=42616 16 17 svg/dynamic-updates: SVGMaskElement tests are all broken 18 https://bugs.webkit.org/show_bug.cgi?id=42617 19 20 Don't ignore resources containing cyclic references, but break them, as discussed on SVG WG mailing lists - to be compatible with Opera which already does that. 21 22 We used to lookup RenderSVGResourceContainers objects, by extracting the URI reference from the SVGRenderStyle, then utilizing getElementById() to lookup the 23 node, and access its renderer. Opera ignores such references, if they point to resources that contain cyclic references. Ignoring them would mean we have 24 to mutate the render style to empty the resource strings. That obviously doesn't work, as it would break expectations (getComputedStyle, etc.). 25 26 Introduce a SVGResources class that stores pointers to all resources, that can be applied to a RenderObject (clipper/filter/markers/masker). 27 Add a SVGResourcesCache class, which is basically a HashMap<RenderObject*, SVGResources*>. Whenever a RenderObject receives style, we extract the URI references 28 from the SVGRenderStyle, look up the RenderSVGResourceContainer* objects, and store them in a SVGResources* class. Then we execute a cycle detection logic, 29 which detects cyclic references and breaks them. Breaking them means just nulling the pointer to the resource in the SVGResources object. Those SVGResources 30 objects are cached, and used throughout the render tree to access resources. This way it's guaranteed that all cyclic references are resolved until layout/paint 31 phase begins. 32 33 Add destroy/styleDidChange/updateFromElement methods to all SVG renderers, in order to keep track of resource/client changes in the SVGResourcesCache. 34 As side-effect the SVGResourcesCache now knows which RenderObject references which resource, and thus can handle client registration for a RenderSVGResourceContainer. 35 The RenderSVGResourceContainer now holds a HashSet of RenderObjects, that's always up2date, and not related to the fact wheter a resources has already been used 36 for painting. The old logic missed to register clients for a resource, when the resource was in an invalid state. Fixing that fixes the svg/dynamic-updates/SVGMaskElement* tests. 37 38 Rewrite all svg/custom/recursive-(filter|gradient|mask|pattern).svg tests to contain a reference image how it should be renderered. All 1:1 compatible with Opera now. 39 40 * rendering/RenderForeignObject.cpp: 41 (WebCore::RenderForeignObject::layout): Grab selfNeedsLayout() before calling RenderBlock::layout(), otherwhise it's always false. 42 * rendering/RenderPath.cpp: Don't look up resources manually, use SVGResourcesCache. 43 (WebCore::RenderPath::fillContains): Remove constness, to avoid the need to pass around const RenderObjects* to the SVGResourcesCache. 44 (WebCore::RenderPath::strokeContains): Ditto. 45 (WebCore::RenderPath::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/. 46 (WebCore::RenderPath::calculateMarkerBoundsIfNeeded): Remove special client handling for markers, it's all unified now. 47 (WebCore::RenderPath::styleWillChange): Only call setNeedsBoundariesUpdate when handling StyleDifferenceRepaint/Layout. 48 * rendering/RenderPath.h: 49 * rendering/RenderSVGBlock.cpp: 50 (WebCore::RenderSVGBlock::destroy): Forward to SVGResourcesCache::clientDestroyed. 51 (WebCore::RenderSVGBlock::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged. 52 (WebCore::RenderSVGBlock::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement. 53 * rendering/RenderSVGBlock.h: 54 * rendering/RenderSVGContainer.cpp: 55 (WebCore::RenderSVGContainer::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/. 56 (WebCore::RenderSVGContainer::selfWillPaint): Don't look up resources manually, use SVGResourcesCache. 57 * rendering/RenderSVGContainer.h: 58 * rendering/RenderSVGGradientStop.cpp: 59 (WebCore::RenderSVGGradientStop::styleDidChange): Rewrite, as invalidateResourceClients() is gone. 60 * rendering/RenderSVGHiddenContainer.h: Make layout() protected, as RenderSVGResourceContainer overrides it. 61 * rendering/RenderSVGImage.cpp: 62 (WebCore::RenderSVGImage::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/. 63 (WebCore::RenderSVGImage::destroy): Forward to SVGResourcesCache::clientDestroyed. 64 (WebCore::RenderSVGImage::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged. 65 (WebCore::RenderSVGImage::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement. 66 (WebCore::RenderSVGImage::imageChanged): Don't look up resources manually, use SVGResourcesCache. 67 * rendering/RenderSVGImage.h: 68 * rendering/RenderSVGInline.cpp: 69 (WebCore::RenderSVGInline::destroy): Forward to SVGResourcesCache::clientDestroyed. 70 (WebCore::RenderSVGInline::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged. 71 (WebCore::RenderSVGInline::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement. 72 * rendering/RenderSVGInline.h: 73 * rendering/RenderSVGModelObject.cpp: 74 (WebCore::RenderSVGModelObject::destroy): Forward to SVGResourcesCache::clientDestroyed. 75 (WebCore::RenderSVGModelObject::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged. 76 (WebCore::RenderSVGModelObject::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement. 77 * rendering/RenderSVGModelObject.h: 78 * rendering/RenderSVGResource.cpp: 79 (WebCore::RenderSVGResource::fillPaintingResource): Remove const from RenderObject parameter. 80 (WebCore::RenderSVGResource::strokePaintingResource): Ditto. 81 (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): Early exit if we found the first parent resource. 82 * rendering/RenderSVGResource.h: 83 * rendering/RenderSVGResourceClipper.cpp: 84 (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper): Early exit if m_clipper is empty. 85 (WebCore::RenderSVGResourceClipper::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer. 86 (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto. 87 (WebCore::RenderSVGResourceClipper::applyResource): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore. 88 (WebCore::RenderSVGResourceClipper::createClipData): Don't look up resources manually, use SVGResourcesCache. 89 (WebCore::RenderSVGResourceClipper::hitTestClipContent): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore. 90 * rendering/RenderSVGResourceClipper.h: 91 * rendering/RenderSVGResourceContainer.cpp: 92 (WebCore::svgExtensionsFromNode): 93 (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): Stop registering resource from the constructor, delegate to styleDidChange. 94 (WebCore::RenderSVGResourceContainer::~RenderSVGResourceContainer): Only deregister resource if it was ever registered. 95 (WebCore::RenderSVGResourceContainer::layout): invalidateClients() here, to avoid the need for invalidateResourceClients() in the SVG DOM. Just call setNeedsLayout() from the SVG DOM. 96 (WebCore::RenderSVGResourceContainer::destroy): Forward to SVGResourcesCache::resourceDestroyed. 97 (WebCore::RenderSVGResourceContainer::styleDidChange): Register resource not in the constructor but when it first receives style. 98 (WebCore::RenderSVGResourceContainer::idChanged): Don't duplicate code, use existing methods from SVGResourcesCache. 99 (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Add new helper function, to share code between all resources. 100 (WebCore::RenderSVGResourceContainer::markClientForInvalidation): Ditto. 101 (WebCore::RenderSVGResourceContainer::addClient): SVGResourcesCache now manages the list of clients. It calls addClient() for each RenderObject that uses this resource. 102 (WebCore::RenderSVGResourceContainer::removeClient): SVGResourcesCache now manages the list of clients. 103 (WebCore::RenderSVGResourceContainer::registerResource): New helper function sharing code between idChanged / styleDidChange. 104 (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): Add FIXME that the function is misplaced. 105 * rendering/RenderSVGResourceContainer.h: Move most functions to the new RenderSVGResourceContainer.cpp file. 106 * rendering/RenderSVGResourceFilter.cpp: 107 (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter): Early exit if m_filter is empty. 108 (WebCore::RenderSVGResourceFilter::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer. 109 (WebCore::RenderSVGResourceFilter::invalidateClient): Ditto. 110 * rendering/RenderSVGResourceGradient.cpp: 111 (WebCore::RenderSVGResourceGradient::~RenderSVGResourceGradient): Early exit if m_gradient is empty. 112 (WebCore::RenderSVGResourceGradient::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer. 113 (WebCore::RenderSVGResourceGradient::invalidateClient): Ditto. 114 * rendering/RenderSVGResourceMarker.cpp: 115 (WebCore::RenderSVGResourceMarker::~RenderSVGResourceMarker): Now a no-op, markers are unified within the new client handling concept, no more special code needed. 116 (WebCore::RenderSVGResourceMarker::layout): As RenderSVGResourceMarker skips the RenderSVGResourceContainer::layout() method, we also need to call invalidateClients() here. 117 (WebCore::RenderSVGResourceMarker::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer. 118 (WebCore::RenderSVGResourceMarker::invalidateClient): Ditto. 119 (WebCore::RenderSVGResourceMarker::draw): Remove marker specific logic to catch circular references. 120 * rendering/RenderSVGResourceMarker.h: 121 * rendering/RenderSVGResourceMasker.cpp: 122 (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker): Early exit if m_masker is empty. 123 (WebCore::RenderSVGResourceMasker::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer. 124 (WebCore::RenderSVGResourceMasker::invalidateClient): Ditto. 125 (WebCore::RenderSVGResourceMasker::applyResource): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore. 126 * rendering/RenderSVGResourceMasker.h: 127 * rendering/RenderSVGResourcePattern.cpp: 128 (WebCore::RenderSVGResourcePattern::~RenderSVGResourcePattern): Early exit if m_pattern is empty. 129 (WebCore::RenderSVGResourcePattern::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer. 130 (WebCore::RenderSVGResourcePattern::invalidateClient): Ditto. 131 (WebCore::RenderSVGResourcePattern::createTileImage): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore. 132 * rendering/RenderSVGResourcePattern.h: 133 * rendering/RenderSVGRoot.cpp: 134 (WebCore::RenderSVGRoot::selfWillPaint): Don't look up resources manually, use SVGResourcesCache. 135 (WebCore::RenderSVGRoot::destroy): Forward to SVGResourcesCache::clientDestroyed. 136 (WebCore::RenderSVGRoot::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged. 137 (WebCore::RenderSVGRoot::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement. 138 * rendering/RenderSVGRoot.h: 139 * rendering/RenderSVGText.cpp: 140 (WebCore::RenderSVGText::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/. 141 * rendering/RenderSVGText.h: 142 * rendering/SVGInlineTextBox.cpp: 143 (WebCore::SVGInlineTextBox::acquirePaintingResource): Add RenderObject* parameter, don't assume the style comes from the InlineTextBox parent renderer. 144 (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting): Pass the parent()->renderer() to acquirePaintingResource. 145 (WebCore::SVGInlineTextBox::paintDecoration): Pass the decoration renderer to acquirePaintingResource. 146 (WebCore::SVGInlineTextBox::paintDecorationWithStyle): Ditto. 147 (WebCore::SVGInlineTextBox::paintText): When a selection pseudo style is used to paint the selection, swap styles in the SVGResourcesCache, to take the right resources when painting. 148 * rendering/SVGInlineTextBox.h: 149 * rendering/SVGRenderSupport.cpp: 150 (WebCore::SVGRenderSupport::prepareToRenderSVGContent): Don't look up resources manually, use SVGResourcesCache. 151 (WebCore::SVGRenderSupport::finishRenderSVGContent): Ditto. 152 (WebCore::SVGRenderSupport::intersectRepaintRectWithResources): Ditto. 153 (WebCore::SVGRenderSupport::pointInClippingArea): Remove const from RenderObject parameter. 154 * rendering/SVGRenderSupport.h: 155 * rendering/SVGRenderTreeAsText.cpp: 156 (WebCore::writeStyle): Add two const_cast now that fill/strokePaintingResource take RenderObject* parameters. This was the less intrusive approach, otherwhise more const_casts would be needed. 157 (WebCore::writeResources): Add FIXME that we should dump the resources present in the SVGResourcesCache instead of manually looking them up from the SVGRenderStyle, to avoid dumping cycles. 158 * rendering/SVGResourcesCache.cpp: 159 (WebCore::SVGResourcesCache::clientStyleChanged): Use markForLayoutAndParentResourceInvalidation() instead of duplicating code. 160 * rendering/SVGResourcesCycleSolver.cpp: 161 (WebCore::setFollowLinkForChainableResource): Implemented stub method. 162 * rendering/style/SVGRenderStyle.cpp: 163 (WebCore::SVGRenderStyle::diff): Return StyleDifferenceLayout, not Repaint for stroke paint changes, otherwhise the cached boundaries are not correctly updated. 164 * svg/SVGClipPathElement.cpp: 165 (WebCore::SVGClipPathElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 166 (WebCore::SVGClipPathElement::childrenChanged): Ditto. 167 * svg/SVGClipPathElement.h: 168 (WebCore::SVGClipPathElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer. 169 * svg/SVGElement.cpp: 170 (WebCore::SVGElement::insertedIntoDocument): Only execute buildPendingResource() logic, if needsPendingResourceHandling() returns true. Cleaned up code a bit, to deploy early returns. 171 * svg/SVGElement.h: 172 (WebCore::SVGElement::needsPendingResourceHandling): Return true (default). Only needed by SVGTextPathElement/SVGUseElement, and should be removed in future. 173 * svg/SVGFilterElement.cpp: 174 (WebCore::SVGFilterElement::SVGFilterElement): Initialize m_followLink=true. 175 (WebCore::SVGFilterElement::setFilterRes): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 176 (WebCore::SVGFilterElement::svgAttributeChanged): Ditto. 177 (WebCore::SVGFilterElement::childrenChanged): Ditto. 178 * svg/SVGFilterElement.h: 179 (WebCore::SVGFilterElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer. 180 (WebCore::SVGFilterElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references. 181 * svg/SVGFilterPrimitiveStandardAttributes.cpp: 182 (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged): Don't use invalidateResourceClients(), it's a no-op as effects don't have a renderer -> use invalidateFilter(). 183 * svg/SVGFilterPrimitiveStandardAttributes.h: 184 (WebCore::SVGFilterPrimitiveStandardAttributes::invalidateFilter): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 185 * svg/SVGGradientElement.cpp: 186 (WebCore::SVGGradientElement::SVGGradientElement): Initialize m_followLink=true. 187 (WebCore::SVGGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 188 (WebCore::SVGGradientElement::childrenChanged): Ditto. 189 * svg/SVGGradientElement.h: 190 (WebCore::SVGGradientElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer. 191 (WebCore::SVGGradientElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references. 192 * svg/SVGLinearGradientElement.cpp: 193 (WebCore::SVGLinearGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 194 (WebCore::SVGLinearGradientElement::collectGradientProperties): Only follow xlink:href links if m_followLinks == true. 195 * svg/SVGMarkerElement.cpp: 196 (WebCore::SVGMarkerElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 197 (WebCore::SVGMarkerElement::childrenChanged): Ditto. 198 (WebCore::SVGMarkerElement::setOrientToAuto): Ditto. 199 (WebCore::SVGMarkerElement::setOrientToAngle): Ditto. 200 * svg/SVGMarkerElement.h: 201 (WebCore::SVGMarkerElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer. 202 * svg/SVGMaskElement.cpp: 203 (WebCore::SVGMaskElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 204 (WebCore::SVGMaskElement::childrenChanged): Ditto. 205 * svg/SVGMaskElement.h: 206 (WebCore::SVGMaskElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer. 207 * svg/SVGPatternElement.cpp: 208 (WebCore::SVGPatternElement::SVGPatternElement): Initialize m_followLink=true. 209 (WebCore::SVGPatternElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 210 (WebCore::SVGPatternElement::childrenChanged): Ditto. 211 (WebCore::SVGPatternElement::collectPatternProperties): Only follow xlink:href links if m_followLinks == true. 212 * svg/SVGPatternElement.h: 213 (WebCore::SVGPatternElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer. 214 (WebCore::SVGPatternElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references. 215 * svg/SVGRadialGradientElement.cpp: 216 (WebCore::SVGRadialGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer. 217 (WebCore::SVGRadialGradientElement::collectGradientProperties): Only follow xlink:href links if m_followLinks == true. 218 * svg/SVGStyledElement.cpp: 219 (WebCore::SVGStyledElement::attach): Call updateFromElement upon attach(), needed by all resource renderers. Defaults to a no-op in RenderObject.h 220 * svg/SVGStyledElement.h: Remove invalidateResourceClients(), it's not needed anymore. 221 1 222 2010-07-29 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 223 -
trunk/WebCore/rendering/RenderForeignObject.cpp
r63531 r64275 118 118 // FIXME: Investigate in location rounding issues - only affects RenderForeignObject & RenderSVGText 119 119 setLocation(roundedIntPoint(viewportLocation)); 120 121 bool layoutChanged = m_everHadLayout && selfNeedsLayout(); 120 122 RenderBlock::layout(); 123 ASSERT(!needsLayout()); 121 124 122 // Invalidate all resources of this client , if we changed something.123 if ( m_everHadLayout && selfNeedsLayout())124 RenderSVGResource::invalidateAllResourcesOfRenderer(this);125 // Invalidate all resources of this client if our layout changed. 126 if (layoutChanged) 127 SVGResourcesCache::clientLayoutChanged(this); 125 128 126 129 repainter.repaintAfterLayout(); 127 setNeedsLayout(false);128 130 } 129 131 -
trunk/WebCore/rendering/RenderPath.cpp
r63531 r64275 36 36 #include "RenderSVGContainer.h" 37 37 #include "RenderSVGResourceMarker.h" 38 #include "StrokeStyleApplier.h"39 38 #include "SVGRenderSupport.h" 39 #include "SVGResources.h" 40 40 #include "SVGStyledTransformableElement.h" 41 41 #include "SVGTransformList.h" 42 42 #include "SVGURIReference.h" 43 #include "StrokeStyleApplier.h" 43 44 #include <wtf/MathExtras.h> 44 45 … … 73 74 } 74 75 75 bool RenderPath::fillContains(const FloatPoint& point, bool requiresFill, WindRule fillRule) const76 bool RenderPath::fillContains(const FloatPoint& point, bool requiresFill, WindRule fillRule) 76 77 { 77 78 if (!m_fillBoundingBox.contains(point)) … … 84 85 } 85 86 86 bool RenderPath::strokeContains(const FloatPoint& point, bool requiresStroke) const87 bool RenderPath::strokeContains(const FloatPoint& point, bool requiresStroke) 87 88 { 88 89 if (!m_strokeAndMarkerBoundingBox.contains(point)) … … 112 113 } 113 114 114 // Invalidate all resources of this client , if we changed something.115 // Invalidate all resources of this client if our layout changed. 115 116 if (m_everHadLayout && selfNeedsLayout()) 116 RenderSVGResource::invalidateAllResourcesOfRenderer(this);117 SVGResourcesCache::clientLayoutChanged(this); 117 118 118 119 // At this point LayoutRepainter already grabbed the old bounds, … … 235 236 FloatRect RenderPath::calculateMarkerBoundsIfNeeded() 236 237 { 237 Document* doc = document();238 239 238 SVGElement* svgElement = static_cast<SVGElement*>(node()); 240 239 ASSERT(svgElement && svgElement->document()); … … 249 248 ASSERT(svgStyle->hasMarkers()); 250 249 251 AtomicString startMarkerId(svgStyle->markerStartResource()); 252 AtomicString midMarkerId(svgStyle->markerMidResource()); 253 AtomicString endMarkerId(svgStyle->markerEndResource()); 254 255 RenderSVGResourceMarker* startMarker = getRenderSVGResourceById<RenderSVGResourceMarker>(doc, startMarkerId); 256 RenderSVGResourceMarker* midMarker = getRenderSVGResourceById<RenderSVGResourceMarker>(doc, midMarkerId); 257 RenderSVGResourceMarker* endMarker = getRenderSVGResourceById<RenderSVGResourceMarker>(doc, endMarkerId); 258 259 if (!startMarker && !startMarkerId.isEmpty()) 260 svgElement->document()->accessSVGExtensions()->addPendingResource(startMarkerId, styledElement); 261 else if (startMarker) 262 startMarker->addClient(this); 263 264 if (!midMarker && !midMarkerId.isEmpty()) 265 svgElement->document()->accessSVGExtensions()->addPendingResource(midMarkerId, styledElement); 266 else if (midMarker) 267 midMarker->addClient(this); 268 269 if (!endMarker && !endMarkerId.isEmpty()) 270 svgElement->document()->accessSVGExtensions()->addPendingResource(endMarkerId, styledElement); 271 else if (endMarker) 272 endMarker->addClient(this); 273 274 if (!startMarker && !midMarker && !endMarker) 250 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this); 251 if (!resources) 275 252 return FloatRect(); 276 253 254 RenderSVGResourceMarker* markerStart = resources->markerStart(); 255 RenderSVGResourceMarker* markerMid = resources->markerMid(); 256 RenderSVGResourceMarker* markerEnd = resources->markerEnd(); 257 if (!markerStart && !markerMid && !markerEnd) 258 return FloatRect(); 259 277 260 float strokeWidth = SVGRenderStyle::cssPrimitiveToLength(this, svgStyle->strokeWidth(), 1.0f); 278 return m_markerLayoutInfo.calculateBoundaries( startMarker, midMarker, endMarker, strokeWidth, m_path);261 return m_markerLayoutInfo.calculateBoundaries(markerStart, markerMid, markerEnd, strokeWidth, m_path); 279 262 } 280 263 281 264 void RenderPath::styleWillChange(StyleDifference diff, const RenderStyle* newStyle) 282 265 { 283 setNeedsBoundariesUpdate(); 266 if (diff == StyleDifferenceLayout) 267 setNeedsBoundariesUpdate(); 284 268 RenderSVGModelObject::styleWillChange(diff, newStyle); 285 269 } -
trunk/WebCore/rendering/RenderPath.h
r60761 r64275 48 48 private: 49 49 // Hit-detection seperated for the fill and the stroke 50 bool fillContains(const FloatPoint&, bool requiresFill = true, WindRule fillRule = RULE_NONZERO) const;51 bool strokeContains(const FloatPoint&, bool requiresStroke = true) const;50 bool fillContains(const FloatPoint&, bool requiresFill = true, WindRule fillRule = RULE_NONZERO); 51 bool strokeContains(const FloatPoint&, bool requiresStroke = true); 52 52 53 53 virtual FloatRect objectBoundingBox() const { return m_fillBoundingBox; } -
trunk/WebCore/rendering/RenderSVGBlock.cpp
r61759 r64275 26 26 #include "RenderSVGBlock.h" 27 27 28 #include "RenderSVGResource.h" 28 29 #include "SVGElement.h" 29 30 … … 74 75 ASSERT_NOT_REACHED(); 75 76 } 77 78 void RenderSVGBlock::destroy() 79 { 80 SVGResourcesCache::clientDestroyed(this); 81 RenderBlock::destroy(); 82 } 83 84 void RenderSVGBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 85 { 86 RenderBlock::styleDidChange(diff, oldStyle); 87 SVGResourcesCache::clientStyleChanged(this, diff, style()); 88 } 89 90 void RenderSVGBlock::updateFromElement() 91 { 92 RenderBlock::updateFromElement(); 93 SVGResourcesCache::clientUpdatedFromElement(this, style()); 94 } 95 76 96 } 77 97 -
trunk/WebCore/rendering/RenderSVGBlock.h
r62118 r64275 39 39 40 40 virtual void absoluteRects(Vector<IntRect>&, int tx, int ty); 41 42 virtual void destroy(); 43 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 44 virtual void updateFromElement(); 41 45 }; 42 46 -
trunk/WebCore/rendering/RenderSVGContainer.cpp
r64007 r64275 32 32 #include "RenderView.h" 33 33 #include "SVGRenderSupport.h" 34 #include "SVGResources.h" 34 35 #include "SVGStyledElement.h" 35 36 … … 59 60 SVGRenderSupport::layoutChildren(this, selfNeedsLayout()); 60 61 61 // Invalidate all resources of this client , if we changed something.62 // Invalidate all resources of this client if our layout changed. 62 63 if (m_everHadLayout && selfNeedsLayout()) 63 RenderSVGResource::invalidateAllResourcesOfRenderer(this);64 SVGResourcesCache::clientLayoutChanged(this); 64 65 65 66 repainter.repaintAfterLayout(); … … 67 68 } 68 69 69 bool RenderSVGContainer::selfWillPaint() const70 bool RenderSVGContainer::selfWillPaint() 70 71 { 71 72 #if ENABLE(FILTERS) 72 const SVGRenderStyle* svgStyle = style()->svgStyle(); 73 RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVGResourceFilter>(document(), svgStyle->filterResource()); 74 if (filter) 75 return true; 73 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this); 74 return resources && resources->filter(); 76 75 #endif 77 76 return false; -
trunk/WebCore/rendering/RenderSVGContainer.h
r62531 r64275 70 70 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; } 71 71 72 bool selfWillPaint() const;72 bool selfWillPaint(); 73 73 74 74 private: -
trunk/WebCore/rendering/RenderSVGGradientStop.cpp
r58212 r64275 26 26 #include "RenderSVGGradientStop.h" 27 27 28 #include "RenderSVGResourceContainer.h" 28 29 #include "SVGGradientElement.h" 29 30 #include "SVGNames.h" 31 #include "SVGResourcesCache.h" 30 32 #include "SVGStopElement.h" 31 33 … … 49 51 // <stop> elements should only be allowed to make renderers under gradient elements 50 52 // but I can imagine a few cases we might not be catching, so let's not crash if our parent isn't a gradient. 51 if (SVGGradientElement* gradient = gradientElement()) 52 gradient->invalidateResourceClients(); 53 SVGGradientElement* gradient = gradientElement(); 54 if (!gradient) 55 return; 56 57 RenderObject* renderer = gradient->renderer(); 58 if (!renderer) 59 return; 60 61 ASSERT(renderer->isSVGResourceContainer()); 62 RenderSVGResourceContainer* container = renderer->toRenderSVGResourceContainer(); 63 container->invalidateClients(); 53 64 } 54 65 -
trunk/WebCore/rendering/RenderSVGHiddenContainer.h
r64196 r64275 25 25 26 26 #if ENABLE(SVG) 27 28 27 #include "RenderSVGContainer.h" 29 28 … … 40 39 virtual const char* renderName() const { return "RenderSVGHiddenContainer"; } 41 40 41 protected: 42 virtual void layout(); 43 42 44 private: 43 45 virtual bool isSVGHiddenContainer() const { return true; } 44 46 virtual bool requiresLayer() const { return false; } 45 47 46 virtual void layout();47 48 virtual void paint(PaintInfo&, int parentX, int parentY); 48 49 -
trunk/WebCore/rendering/RenderSVGImage.cpp
r63531 r64275 40 40 #include "SVGPreserveAspectRatio.h" 41 41 #include "SVGRenderSupport.h" 42 #include "SVGResources.h" 42 43 43 44 namespace WebCore { … … 71 72 m_cachedLocalRepaintRect = FloatRect(); 72 73 73 // Invalidate all resources of this client , if we changed something.74 // Invalidate all resources of this client if our layout changed. 74 75 if (m_everHadLayout && selfNeedsLayout()) 75 RenderSVGResource::invalidateAllResourcesOfRenderer(this);76 SVGResourcesCache::clientLayoutChanged(this); 76 77 77 78 repainter.repaintAfterLayout(); … … 111 112 void RenderSVGImage::destroy() 112 113 { 113 RenderSVGResource::invalidateAllResourcesOfRenderer(this);114 SVGResourcesCache::clientDestroyed(this); 114 115 RenderImage::destroy(); 116 } 117 118 void RenderSVGImage::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 119 { 120 RenderImage::styleDidChange(diff, oldStyle); 121 SVGResourcesCache::clientStyleChanged(this, diff, style()); 122 } 123 124 void RenderSVGImage::updateFromElement() 125 { 126 RenderImage::updateFromElement(); 127 SVGResourcesCache::clientUpdatedFromElement(this, style()); 115 128 } 116 129 … … 161 174 { 162 175 RenderImage::imageChanged(image, rect); 163 #if ENABLE(FILTERS) 176 164 177 // The image resource defaults to nullImage until the resource arrives. 165 // This empty image may be cached by SVG filter effects which must be invalidated.166 if ( RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVGResourceFilter>(document(), style()->svgStyle()->filterResource()))167 filter->invalidateClient(this);168 #endif 178 // This empty image may be cached by SVG resources which must be invalidated. 179 if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this)) 180 resources->invalidateClient(this); 181 169 182 repaint(); 170 183 } -
trunk/WebCore/rendering/RenderSVGImage.h
r62118 r64275 66 66 67 67 virtual void destroy(); 68 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 69 virtual void updateFromElement(); 68 70 69 71 virtual bool requiresLayer() const { return false; } -
trunk/WebCore/rendering/RenderSVGInline.cpp
r62118 r64275 27 27 #include "RenderSVGInline.h" 28 28 29 #include "RenderSVGResource.h" 29 30 #include "SVGInlineFlowBox.h" 30 31 … … 93 94 } 94 95 96 void RenderSVGInline::destroy() 97 { 98 SVGResourcesCache::clientDestroyed(this); 99 RenderInline::destroy(); 100 } 101 102 void RenderSVGInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 103 { 104 RenderInline::styleDidChange(diff, oldStyle); 105 SVGResourcesCache::clientStyleChanged(this, diff, style()); 106 } 107 108 void RenderSVGInline::updateFromElement() 109 { 110 RenderInline::updateFromElement(); 111 SVGResourcesCache::clientUpdatedFromElement(this, style()); 112 } 113 95 114 96 115 } -
trunk/WebCore/rendering/RenderSVGInline.h
r62118 r64275 55 55 private: 56 56 virtual InlineFlowBox* createInlineFlowBox(); 57 58 virtual void destroy(); 59 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 60 virtual void updateFromElement(); 57 61 }; 58 62 -
trunk/WebCore/rendering/RenderSVGModelObject.cpp
r63531 r64275 84 84 void RenderSVGModelObject::destroy() 85 85 { 86 RenderSVGResource::invalidateAllResourcesOfRenderer(this);86 SVGResourcesCache::clientDestroyed(this); 87 87 RenderObject::destroy(); 88 88 } … … 91 91 { 92 92 RenderObject::styleDidChange(diff, oldStyle); 93 SVGResourcesCache::clientStyleChanged(this, diff, style()); 94 } 93 95 94 if (style() && (diff == StyleDifferenceLayout || diff == StyleDifferenceRepaint)) 95 RenderSVGResource::markForLayoutAndParentResourceInvalidation(this, false); 96 void RenderSVGModelObject::updateFromElement() 97 { 98 RenderObject::updateFromElement(); 99 SVGResourcesCache::clientUpdatedFromElement(this, style()); 96 100 } 97 101 -
trunk/WebCore/rendering/RenderSVGModelObject.h
r63531 r64275 63 63 virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const; 64 64 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 65 virtual void updateFromElement(); 65 66 66 67 private: -
trunk/WebCore/rendering/RenderSVGResource.cpp
r63531 r64275 27 27 #include "RenderSVGResource.h" 28 28 29 #include "RenderSVGResourceClipper.h"30 29 #include "RenderSVGResourceContainer.h" 31 #include "RenderSVGResourceFilter.h"32 #include "RenderSVGResourceMarker.h"33 #include "RenderSVGResourceMasker.h"34 30 #include "RenderSVGResourceSolidColor.h" 31 #include "SVGResources.h" 35 32 #include "SVGURIReference.h" 36 33 37 34 namespace WebCore { 38 39 static inline void registerPendingResource(const AtomicString& id, const SVGPaint::SVGPaintType& paintType, const RenderObject* object)40 {41 if (paintType != SVGPaint::SVG_PAINTTYPE_URI)42 return;43 44 SVGElement* svgElement = static_cast<SVGElement*>(object->node());45 ASSERT(svgElement);46 ASSERT(svgElement->isStyled());47 48 object->document()->accessSVGExtensions()->addPendingResource(id, static_cast<SVGStyledElement*>(svgElement));49 }50 35 51 36 inline void RenderSVGResource::adjustColorForPseudoRules(const RenderStyle* style, bool useFillPaint, Color& color) … … 70 55 71 56 // FIXME: This method and strokePaintingResource() should be refactored, to share even more code 72 RenderSVGResource* RenderSVGResource::fillPaintingResource( constRenderObject* object, const RenderStyle* style)57 RenderSVGResource* RenderSVGResource::fillPaintingResource(RenderObject* object, const RenderStyle* style) 73 58 { 74 59 ASSERT(object); … … 85 70 86 71 SVGPaint::SVGPaintType paintType = fillPaint->paintType(); 87 if (paintType == SVGPaint::SVG_PAINTTYPE_URI 88 || paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR) { 89 AtomicString id(SVGURIReference::getTarget(fillPaint->uri())); 90 fillPaintingResource = getRenderSVGResourceContainerById(object->document(), id); 91 92 if (!fillPaintingResource) 93 registerPendingResource(id, paintType, object); 72 if (paintType == SVGPaint::SVG_PAINTTYPE_URI || paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR) { 73 if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object)) 74 fillPaintingResource = resources->fill(); 94 75 } 95 76 … … 123 104 } 124 105 125 RenderSVGResource* RenderSVGResource::strokePaintingResource( constRenderObject* object, const RenderStyle* style)106 RenderSVGResource* RenderSVGResource::strokePaintingResource(RenderObject* object, const RenderStyle* style) 126 107 { 127 108 ASSERT(object); … … 139 120 140 121 SVGPaint::SVGPaintType paintType = strokePaint->paintType(); 141 if (!objectBoundingBox.isEmpty() 142 && (paintType == SVGPaint::SVG_PAINTTYPE_URI || paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR)) { 143 AtomicString id(SVGURIReference::getTarget(strokePaint->uri())); 144 strokePaintingResource = getRenderSVGResourceContainerById(object->document(), id); 145 146 if (!strokePaintingResource) 147 registerPendingResource(id, paintType, object); 122 if (!objectBoundingBox.isEmpty() && (paintType == SVGPaint::SVG_PAINTTYPE_URI || paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR)) { 123 if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object)) 124 strokePaintingResource = resources->stroke(); 148 125 } 149 126 … … 185 162 } 186 163 187 void RenderSVGResource::markForLayoutAndResourceInvalidation(RenderObject* object, bool needsBoundariesUpdate)188 {189 ASSERT(object);190 ASSERT(object->node());191 ASSERT(object->node()->isSVGElement());192 193 // Eventually mark the renderer needing a boundaries update194 if (needsBoundariesUpdate)195 object->setNeedsBoundariesUpdate();196 197 markForLayoutAndParentResourceInvalidation(object);198 }199 200 static inline void invalidatePaintingResource(SVGPaint* paint, RenderObject* object)201 {202 ASSERT(paint);203 204 SVGPaint::SVGPaintType paintType = paint->paintType();205 if (paintType != SVGPaint::SVG_PAINTTYPE_URI && paintType != SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR)206 return;207 208 AtomicString id(SVGURIReference::getTarget(paint->uri()));209 if (RenderSVGResourceContainer* paintingResource = getRenderSVGResourceContainerById(object->document(), id))210 paintingResource->invalidateClient(object);211 }212 213 void RenderSVGResource::invalidateAllResourcesOfRenderer(RenderObject* object)214 {215 ASSERT(object);216 ASSERT(object->style());217 218 Document* document = object->document();219 ASSERT(document);220 221 const SVGRenderStyle* svgStyle = object->style()->svgStyle();222 ASSERT(svgStyle);223 224 // Masker225 if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(document, svgStyle->maskerResource()))226 masker->invalidateClient(object);227 228 // Clipper229 if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(document, svgStyle->clipperResource()))230 clipper->invalidateClient(object);231 232 // Filter233 #if ENABLE(FILTERS)234 if (RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVGResourceFilter>(document, svgStyle->filterResource()))235 filter->invalidateClient(object);236 #endif237 238 // Markers239 if (RenderSVGResourceMarker* startMarker = getRenderSVGResourceById<RenderSVGResourceMarker>(document, svgStyle->markerStartResource()))240 startMarker->invalidateClient(object);241 if (RenderSVGResourceMarker* midMarker = getRenderSVGResourceById<RenderSVGResourceMarker>(document, svgStyle->markerMidResource()))242 midMarker->invalidateClient(object);243 if (RenderSVGResourceMarker* endMarker = getRenderSVGResourceById<RenderSVGResourceMarker>(document, svgStyle->markerEndResource()))244 endMarker->invalidateClient(object);245 246 // Gradients/Patterns247 if (svgStyle->hasFill())248 invalidatePaintingResource(svgStyle->fillPaint(), object);249 if (svgStyle->hasStroke())250 invalidatePaintingResource(svgStyle->strokePaint(), object);251 }252 253 164 void RenderSVGResource::markForLayoutAndParentResourceInvalidation(RenderObject* object, bool needsLayout) 254 165 { … … 260 171 RenderObject* current = object->parent(); 261 172 while (current) { 262 if (current->isSVGResourceContainer()) 173 if (current->isSVGResourceContainer()) { 263 174 current->toRenderSVGResourceContainer()->invalidateClients(); 175 break; 176 } 264 177 265 178 current = current->parent(); -
trunk/WebCore/rendering/RenderSVGResource.h
r63531 r64275 23 23 24 24 #if ENABLE(SVG) 25 #include "RenderStyleConstants.h" 25 26 #include "SVGDocumentExtensions.h" 26 27 … … 76 77 77 78 // Helper utilities used in the render tree to access resources used for painting shapes/text (gradients & patterns only) 78 static RenderSVGResource* fillPaintingResource( constRenderObject*, const RenderStyle*);79 static RenderSVGResource* strokePaintingResource( constRenderObject*, const RenderStyle*);79 static RenderSVGResource* fillPaintingResource(RenderObject*, const RenderStyle*); 80 static RenderSVGResource* strokePaintingResource(RenderObject*, const RenderStyle*); 80 81 static RenderSVGResourceSolidColor* sharedSolidPaintingResource(); 81 82 82 static void invalidateAllResourcesOfRenderer(RenderObject*);83 83 static void markForLayoutAndParentResourceInvalidation(RenderObject*, bool needsLayout = true); 84 84 85 85 private: 86 86 static void adjustColorForPseudoRules(const RenderStyle*, bool useFillPaint, Color&); 87 88 protected:89 void markForLayoutAndResourceInvalidation(RenderObject*, bool needsBoundariesUpdate = true);90 87 }; 91 88 -
trunk/WebCore/rendering/RenderSVGResourceClipper.cpp
r63531 r64275 22 22 23 23 #include "config.h" 24 24 25 #if ENABLE(SVG) 25 26 #include "RenderSVGResourceClipper.h" … … 33 34 #include "IntRect.h" 34 35 #include "RenderObject.h" 36 #include "RenderSVGResource.h" 35 37 #include "RenderStyle.h" 36 #include "RenderSVGResource.h"37 38 #include "SVGClipPathElement.h" 38 39 #include "SVGElement.h" 39 40 #include "SVGRenderSupport.h" 41 #include "SVGResources.h" 40 42 #include "SVGStyledElement.h" 41 43 #include "SVGStyledTransformableElement.h" … … 56 58 RenderSVGResourceClipper::~RenderSVGResourceClipper() 57 59 { 60 if (m_clipper.isEmpty()) 61 return; 62 58 63 deleteAllValues(m_clipper); 59 64 m_clipper.clear(); … … 65 70 return; 66 71 67 HashMap<RenderObject*, ClipperData*>::const_iterator end = m_clipper.end();68 for (HashMap<RenderObject*, ClipperData*>::const_iterator it = m_clipper.begin(); it != end; ++it)69 markForLayoutAndResourceInvalidation(it->first);70 71 deleteAllValues(m_clipper);72 m_clipper.clear();73 72 m_clipBoundaries = FloatRect(); 74 } 75 76 void RenderSVGResourceClipper::invalidateClient(RenderObject* object) 77 { 73 if (!m_clipper.isEmpty()) { 74 deleteAllValues(m_clipper); 75 m_clipper.clear(); 76 } 77 78 markAllClientsForInvalidation(LayoutAndBoundariesInvalidation); 79 } 80 81 void RenderSVGResourceClipper::invalidateClient(RenderObject* client) 82 { 83 ASSERT(client); 78 84 if (m_invalidationBlocked) 79 85 return; 80 86 81 ASSERT(object); 82 if (!m_clipper.contains(object)) 83 return; 84 85 delete m_clipper.take(object); 86 markForLayoutAndResourceInvalidation(object); 87 ASSERT(client->selfNeedsLayout()); 88 if (m_clipper.contains(client)) 89 delete m_clipper.take(client); 90 91 markClientForInvalidation(client, BoundariesInvalidation); 87 92 } 88 93 … … 96 101 UNUSED_PARAM(resourceMode); 97 102 #endif 98 99 // Early exit, if this resource contains a child which references ourselves.100 if (containsCyclicReference(node()))101 return false;102 103 103 104 applyClippingToContext(object, object->objectBoundingBox(), object->repaintRectInLocalCoordinates(), context); … … 192 193 193 194 // clipPath can also be clipped by another clipPath. 194 if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(this->document(), style()->svgStyle()->clipperResource())) { 195 if (!clipper->applyClippingToContext(this, objectBoundingBox, repaintRect, maskContext)) { 196 maskContext->restore(); 197 return false; 198 } 195 if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this)) { 196 if (RenderSVGResourceClipper* clipper = resources->clipper()) { 197 if (!clipper->applyClippingToContext(this, objectBoundingBox, repaintRect, maskContext)) { 198 maskContext->restore(); 199 return false; 200 } 201 } 199 202 } 200 203 … … 281 284 bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundingBox, const FloatPoint& nodeAtPoint) 282 285 { 283 // FIXME: We should be able to check whether m_clipper.contains(object) - this doesn't work at the moment284 // as resourceBoundingBox() has already created ClipperData, even if applyResource() returned false.285 // Early exit, if this resource contains a child which references ourselves.286 if (containsCyclicReference(node()))287 return false;288 289 286 FloatPoint point = nodeAtPoint; 290 287 if (!SVGRenderSupport::pointInClippingArea(this, point)) … … 311 308 312 309 return false; 313 }314 315 bool RenderSVGResourceClipper::childElementReferencesResource(const SVGRenderStyle* style, const String& referenceId) const316 {317 if (!style->hasClipper())318 return false;319 320 return style->clipperResource() == referenceId;321 310 } 322 311 -
trunk/WebCore/rendering/RenderSVGResourceClipper.h
r63531 r64275 69 69 void calculateClipContentRepaintRect(); 70 70 71 virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const;72 73 71 bool m_invalidationBlocked; 74 72 FloatRect m_clipBoundaries; -
trunk/WebCore/rendering/RenderSVGResourceContainer.cpp
r64196 r64275 29 29 namespace WebCore { 30 30 31 static inline SVGDocumentExtensions* svgExtensionsFromNode(Node* node) 32 { 33 ASSERT(node); 34 ASSERT(node->document()); 35 return node->document()->accessSVGExtensions(); 36 } 37 31 38 RenderSVGResourceContainer::RenderSVGResourceContainer(SVGStyledElement* node) 32 39 : RenderSVGHiddenContainer(node) 33 , RenderSVGResource()34 40 , m_id(node->hasID() ? node->getIdAttribute() : nullAtom) 41 , m_registered(false) 35 42 { 36 ASSERT(node->document());37 node->document()->accessSVGExtensions()->addResource(m_id, this);38 43 } 39 44 40 45 RenderSVGResourceContainer::~RenderSVGResourceContainer() 41 46 { 42 ASSERT(node()); 43 ASSERT(node()->document()); 44 node()->document()->accessSVGExtensions()->removeResource(m_id); 47 if (m_registered) 48 svgExtensionsFromNode(node())->removeResource(m_id); 49 } 50 51 void RenderSVGResourceContainer::layout() 52 { 53 // Invalidate all resources if our layout changed. 54 if (m_everHadLayout && selfNeedsLayout()) 55 invalidateClients(); 56 57 RenderSVGHiddenContainer::layout(); 58 } 59 60 void RenderSVGResourceContainer::destroy() 61 { 62 SVGResourcesCache::resourceDestroyed(this); 63 RenderSVGHiddenContainer::destroy(); 64 } 65 66 void RenderSVGResourceContainer::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 67 { 68 RenderSVGHiddenContainer::styleDidChange(diff, oldStyle); 69 70 if (!m_registered) { 71 m_registered = true; 72 registerResource(); 73 } 45 74 } 46 75 47 76 void RenderSVGResourceContainer::idChanged() 48 77 { 49 ASSERT(node()); 50 ASSERT(node()->document()); 51 SVGDocumentExtensions* extensions = node()->document()->accessSVGExtensions(); 78 // Invalidate all our current clients. 79 invalidateClients(); 52 80 53 // Remove old id, that is guaranteed to be present in cache 81 // Remove old id, that is guaranteed to be present in cache. 82 SVGDocumentExtensions* extensions = svgExtensionsFromNode(node()); 54 83 extensions->removeResource(m_id); 55 84 m_id = static_cast<Element*>(node())->getIdAttribute(); 56 85 57 // It's possible that an element is referencing us with the new id, and has to be notified that we're existing now 58 if (extensions->isPendingResource(m_id)) { 59 OwnPtr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResource(m_id)); 60 if (clients->isEmpty()) 61 return; 86 registerResource(); 87 } 62 88 63 HashSet<SVGStyledElement*>::const_iterator it = clients->begin(); 64 const HashSet<SVGStyledElement*>::const_iterator end = clients->end(); 89 void RenderSVGResourceContainer::markAllClientsForInvalidation(InvalidationMode mode) 90 { 91 if (m_clients.isEmpty()) 92 return; 65 93 66 for (; it != end; ++it) { 67 if (RenderObject* renderer = (*it)->renderer()) 68 renderer->setNeedsLayout(true); 69 } 94 bool needsLayout = mode == LayoutAndBoundariesInvalidation; 95 96 HashSet<RenderObject*>::iterator end = m_clients.end(); 97 for (HashSet<RenderObject*>::iterator it = m_clients.begin(); it != end; ++it) { 98 markClientForInvalidation(*it, mode); 99 RenderSVGResource::markForLayoutAndParentResourceInvalidation(*it, needsLayout); 100 } 101 } 102 103 void RenderSVGResourceContainer::markClientForInvalidation(RenderObject* client, InvalidationMode mode) 104 { 105 ASSERT(client); 106 ASSERT(!m_clients.isEmpty()); 107 108 switch (mode) { 109 case LayoutAndBoundariesInvalidation: 110 case BoundariesInvalidation: 111 client->setNeedsBoundariesUpdate(); 112 break; 113 case RepaintInvalidation: 114 if (client->view()) 115 client->repaint(); 116 break; 117 } 118 } 119 120 void RenderSVGResourceContainer::addClient(RenderObject* client) 121 { 122 ASSERT(client); 123 m_clients.add(client); 124 } 125 126 void RenderSVGResourceContainer::removeClient(RenderObject* client) 127 { 128 ASSERT(client); 129 m_clients.remove(client); 130 } 131 132 void RenderSVGResourceContainer::registerResource() 133 { 134 SVGDocumentExtensions* extensions = svgExtensionsFromNode(node()); 135 if (!extensions->isPendingResource(m_id)) { 136 extensions->addResource(m_id, this); 137 return; 70 138 } 71 139 72 // Recache us with the new id 140 OwnPtr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResource(m_id)); 141 142 // Cache us with the new id. 73 143 extensions->addResource(m_id, this); 144 145 // Update cached resources of pending clients. 146 const HashSet<SVGStyledElement*>::const_iterator end = clients->end(); 147 for (HashSet<SVGStyledElement*>::const_iterator it = clients->begin(); it != end; ++it) { 148 RenderObject* renderer = (*it)->renderer(); 149 if (!renderer) 150 continue; 151 SVGResourcesCache::clientUpdatedFromElement(renderer, renderer->style()); 152 renderer->setNeedsLayout(true); 153 } 74 154 } 75 155 156 // FIXME: This does not belong here. 76 157 AffineTransform RenderSVGResourceContainer::transformOnNonScalingStroke(RenderObject* object, const AffineTransform& resourceTransform) 77 158 { … … 85 166 } 86 167 87 bool RenderSVGResourceContainer::containsCyclicReference(const Node* startNode) const88 {89 ASSERT(startNode->document());90 91 for (Node* node = startNode->firstChild(); node; node = node->nextSibling()) {92 if (!node->isSVGElement())93 continue;94 95 RenderObject* renderer = node->renderer();96 if (!renderer)97 continue;98 99 RenderStyle* style = renderer->style();100 if (!style)101 continue;102 103 const SVGRenderStyle* svgStyle = style->svgStyle();104 ASSERT(svgStyle);105 106 // Let the class inheriting from us decide whether the child element references ourselves.107 if (childElementReferencesResource(svgStyle, m_id))108 return true;109 110 // Dive into shadow tree to check for cycles there.111 if (node->hasTagName(SVGNames::useTag)) {112 ASSERT(renderer->isSVGShadowTreeRootContainer());113 if (Node* shadowRoot = static_cast<RenderSVGShadowTreeRootContainer*>(renderer)->rootElement()) {114 if (containsCyclicReference(shadowRoot))115 return true;116 }117 118 }119 120 if (node->hasChildNodes()) {121 if (containsCyclicReference(node))122 return true;123 }124 }125 126 return false;127 }128 129 168 } 130 169 -
trunk/WebCore/rendering/RenderSVGResourceContainer.h
r64196 r64275 24 24 #if ENABLE(SVG) 25 25 #include "RenderSVGHiddenContainer.h" 26 27 #include "SVGStyledTransformableElement.h"28 26 #include "RenderSVGResource.h" 29 #include "RenderSVGShadowTreeRootContainer.h"30 27 31 28 namespace WebCore { … … 37 34 virtual ~RenderSVGResourceContainer(); 38 35 39 void idChanged(); 36 virtual void layout(); 37 virtual void destroy(); 38 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 40 39 41 40 virtual bool isSVGResourceContainer() const { return true; } 42 41 virtual bool drawsContents() { return false; } 43 44 42 virtual RenderSVGResourceContainer* toRenderSVGResourceContainer() { return this; } 45 virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const { return false; }46 43 47 44 static AffineTransform transformOnNonScalingStroke(RenderObject*, const AffineTransform& resourceTransform); 48 45 49 bool containsCyclicReference(const Node* startNode) const; 46 void idChanged(); 47 48 protected: 49 enum InvalidationMode { 50 LayoutAndBoundariesInvalidation, 51 BoundariesInvalidation, 52 RepaintInvalidation 53 }; 54 55 // Used from the invalidateClient/invalidateClients methods from classes, inheriting from us. 56 void markAllClientsForInvalidation(InvalidationMode); 57 void markClientForInvalidation(RenderObject*, InvalidationMode); 50 58 51 59 private: 52 60 friend class SVGResourcesCache; 53 54 // FIXME: No-ops for now, until follow-up patch on bug 43031 lands. 55 void addClient(RenderObject*) { } 56 void removeClient(RenderObject*) { } 61 void addClient(RenderObject*); 62 void removeClient(RenderObject*); 57 63 58 64 private: 65 void registerResource(); 66 59 67 AtomicString m_id; 68 bool m_registered; 69 HashSet<RenderObject*> m_clients; 60 70 }; 61 71 -
trunk/WebCore/rendering/RenderSVGResourceFilter.cpp
r63531 r64275 61 61 RenderSVGResourceFilter::~RenderSVGResourceFilter() 62 62 { 63 if (m_filter.isEmpty()) 64 return; 65 63 66 deleteAllValues(m_filter); 64 67 m_filter.clear(); … … 67 70 void RenderSVGResourceFilter::invalidateClients() 68 71 { 69 HashMap<RenderObject*, FilterData*>::const_iterator end = m_filter.end(); 70 for (HashMap<RenderObject*, FilterData*>::const_iterator it = m_filter.begin(); it != end; ++it) 71 markForLayoutAndResourceInvalidation(it->first); 72 73 deleteAllValues(m_filter); 74 m_filter.clear(); 75 } 76 77 void RenderSVGResourceFilter::invalidateClient(RenderObject* object) 78 { 79 ASSERT(object); 80 if (!m_filter.contains(object)) 81 return; 82 83 delete m_filter.take(object); 84 markForLayoutAndResourceInvalidation(object); 72 if (!m_filter.isEmpty()) { 73 deleteAllValues(m_filter); 74 m_filter.clear(); 75 } 76 77 markAllClientsForInvalidation(LayoutAndBoundariesInvalidation); 78 } 79 80 void RenderSVGResourceFilter::invalidateClient(RenderObject* client) 81 { 82 ASSERT(client); 83 ASSERT(client->selfNeedsLayout()); 84 85 if (m_filter.contains(client)) 86 delete m_filter.take(client); 87 88 markClientForInvalidation(client, BoundariesInvalidation); 85 89 } 86 90 -
trunk/WebCore/rendering/RenderSVGResourceGradient.cpp
r63542 r64275 44 44 RenderSVGResourceGradient::~RenderSVGResourceGradient() 45 45 { 46 if (m_gradient.isEmpty()) 47 return; 48 46 49 deleteAllValues(m_gradient); 47 50 m_gradient.clear(); … … 50 53 void RenderSVGResourceGradient::invalidateClients() 51 54 { 52 const HashMap<RenderObject*, GradientData*>::const_iterator end = m_gradient.end(); 53 for (HashMap<RenderObject*, GradientData*>::const_iterator it = m_gradient.begin(); it != end; ++it) 54 markForLayoutAndResourceInvalidation(it->first, false); 55 56 deleteAllValues(m_gradient); 57 m_gradient.clear(); 58 } 59 60 void RenderSVGResourceGradient::invalidateClient(RenderObject* object) 61 { 62 ASSERT(object); 63 if (!m_gradient.contains(object)) 64 return; 65 66 delete m_gradient.take(object); 67 markForLayoutAndResourceInvalidation(object, false); 55 if (!m_gradient.isEmpty()) { 56 deleteAllValues(m_gradient); 57 m_gradient.clear(); 58 } 59 60 markAllClientsForInvalidation(RepaintInvalidation); 61 } 62 63 void RenderSVGResourceGradient::invalidateClient(RenderObject* client) 64 { 65 ASSERT(client); 66 ASSERT(client->selfNeedsLayout()); 67 68 if (m_gradient.contains(client)) 69 delete m_gradient.take(client); 70 71 markClientForInvalidation(client, RepaintInvalidation); 68 72 } 69 73 -
trunk/WebCore/rendering/RenderSVGResourceMarker.cpp
r63531 r64275 22 22 23 23 #include "config.h" 24 24 25 #if ENABLE(SVG) 25 26 #include "RenderSVGResourceMarker.h" … … 44 45 RenderSVGResourceMarker::~RenderSVGResourceMarker() 45 46 { 46 m_marker.clear();47 47 } 48 48 49 49 void RenderSVGResourceMarker::layout() 50 50 { 51 // Invalidate all resources if our layout changed. 52 if (m_everHadLayout && selfNeedsLayout()) 53 invalidateClients(); 54 51 55 // RenderSVGHiddenContainer overwrites layout(). We need the 52 56 // layouting of RenderSVGContainer for calculating local … … 55 59 } 56 60 57 void RenderSVGResourceMarker:: addClient(const RenderObject* object)61 void RenderSVGResourceMarker::invalidateClients() 58 62 { 59 m _marker.add(object);63 markAllClientsForInvalidation(LayoutAndBoundariesInvalidation); 60 64 } 61 65 62 void RenderSVGResourceMarker::invalidateClient s()66 void RenderSVGResourceMarker::invalidateClient(RenderObject* client) 63 67 { 64 const HashSet<const RenderObject*>::const_iterator end = m_marker.end(); 65 for (HashSet<const RenderObject*>::const_iterator it = m_marker.begin(); it != end; ++it) 66 markForLayoutAndResourceInvalidation(const_cast<RenderObject*>(*it)); 67 68 m_marker.clear(); 69 } 70 71 void RenderSVGResourceMarker::invalidateClient(RenderObject* object) 72 { 73 ASSERT(object); 74 if (!m_marker.contains(object)) 75 return; 76 77 m_marker.remove(object); 78 markForLayoutAndResourceInvalidation(object); 68 ASSERT(client); 69 ASSERT(client->selfNeedsLayout()); 70 markClientForInvalidation(client, BoundariesInvalidation); 79 71 } 80 72 … … 141 133 void RenderSVGResourceMarker::draw(PaintInfo& paintInfo, const AffineTransform& transform) 142 134 { 143 DEFINE_STATIC_LOCAL(HashSet<RenderSVGResourceMarker*>, currentlyDrawingMarkers, ());144 145 // avoid drawing circular marker references146 if (currentlyDrawingMarkers.contains(this))147 return;148 149 currentlyDrawingMarkers.add(this);150 135 PaintInfo info(paintInfo); 151 136 info.context->save(); … … 153 138 RenderSVGContainer::paint(info, 0, 0); 154 139 info.context->restore(); 155 156 currentlyDrawingMarkers.remove(this);157 140 } 158 141 -
trunk/WebCore/rendering/RenderSVGResourceMarker.h
r62104 r64275 42 42 virtual const char* renderName() const { return "RenderSVGResourceMarker"; } 43 43 44 void addClient(const RenderObject*);45 44 virtual void invalidateClients(); 46 45 virtual void invalidateClient(RenderObject*); … … 75 74 AffineTransform viewportTransform() const; 76 75 77 // Save objects using this marker for invalidation.78 HashSet<const RenderObject*> m_marker;79 80 76 mutable AffineTransform m_localToParentTransform; 81 77 FloatRect m_viewport; -
trunk/WebCore/rendering/RenderSVGResourceMasker.cpp
r63531 r64275 20 20 21 21 #include "config.h" 22 22 23 #if ENABLE(SVG) 23 24 #include "RenderSVGResourceMasker.h" … … 52 53 RenderSVGResourceMasker::~RenderSVGResourceMasker() 53 54 { 55 if (m_masker.isEmpty()) 56 return; 57 54 58 deleteAllValues(m_masker); 55 59 m_masker.clear(); … … 58 62 void RenderSVGResourceMasker::invalidateClients() 59 63 { 60 HashMap<RenderObject*, MaskerData*>::const_iterator end = m_masker.end();61 for (HashMap<RenderObject*, MaskerData*>::const_iterator it = m_masker.begin(); it != end; ++it)62 markForLayoutAndResourceInvalidation(it->first);63 64 deleteAllValues(m_masker);65 m_masker.clear();66 64 m_maskBoundaries = FloatRect(); 67 } 68 69 void RenderSVGResourceMasker::invalidateClient(RenderObject* object) 70 { 71 ASSERT(object); 72 if (!m_masker.contains(object)) 73 return; 74 75 delete m_masker.take(object); 76 markForLayoutAndResourceInvalidation(object); 77 } 78 79 bool RenderSVGResourceMasker::childElementReferencesResource(const SVGRenderStyle* style, const String& referenceId) const 80 { 81 if (!style->hasMasker()) 82 return false; 83 84 return style->maskerResource() == referenceId; 65 if (!m_masker.isEmpty()) { 66 deleteAllValues(m_masker); 67 m_masker.clear(); 68 } 69 70 markAllClientsForInvalidation(LayoutAndBoundariesInvalidation); 71 } 72 73 void RenderSVGResourceMasker::invalidateClient(RenderObject* client) 74 { 75 ASSERT(client); 76 ASSERT(client->selfNeedsLayout()); 77 78 if (m_masker.contains(client)) 79 delete m_masker.take(client); 80 81 markClientForInvalidation(client, BoundariesInvalidation); 85 82 } 86 83 … … 103 100 if (!maskElement) 104 101 return false; 105 106 // Early exit, if this resource contains a child which references ourselves.107 if (containsCyclicReference(node()))108 return false;109 110 102 createMaskImage(maskerData, maskElement, object); 111 103 } -
trunk/WebCore/rendering/RenderSVGResourceMasker.h
r63300 r64275 70 70 void calculateMaskContentRepaintRect(); 71 71 72 virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const;73 74 72 FloatRect m_maskBoundaries; 75 73 HashMap<RenderObject*, MaskerData*> m_masker; -
trunk/WebCore/rendering/RenderSVGResourcePattern.cpp
r63531 r64275 41 41 RenderSVGResourcePattern::~RenderSVGResourcePattern() 42 42 { 43 if (m_pattern.isEmpty()) 44 return; 45 43 46 deleteAllValues(m_pattern); 44 47 m_pattern.clear(); … … 47 50 void RenderSVGResourcePattern::invalidateClients() 48 51 { 49 const HashMap<RenderObject*, PatternData*>::const_iterator end = m_pattern.end(); 50 for (HashMap<RenderObject*, PatternData*>::const_iterator it = m_pattern.begin(); it != end; ++it) 51 markForLayoutAndResourceInvalidation(it->first, false); 52 53 deleteAllValues(m_pattern); 54 m_pattern.clear(); 55 } 56 57 void RenderSVGResourcePattern::invalidateClient(RenderObject* object) 58 { 59 ASSERT(object); 60 if (!m_pattern.contains(object)) 61 return; 62 63 delete m_pattern.take(object); 64 markForLayoutAndResourceInvalidation(object, false); 65 } 66 67 bool RenderSVGResourcePattern::childElementReferencesResource(const SVGRenderStyle* style, const String& referenceId) const 68 { 69 if (style->hasFill()) { 70 if (style->fillPaint()->matchesTargetURI(referenceId)) 71 return true; 72 } 73 74 if (style->hasStroke()) { 75 if (style->strokePaint()->matchesTargetURI(referenceId)) 76 return true; 77 } 78 79 return false; 52 if (!m_pattern.isEmpty()) { 53 deleteAllValues(m_pattern); 54 m_pattern.clear(); 55 } 56 57 markAllClientsForInvalidation(RepaintInvalidation); 58 } 59 60 void RenderSVGResourcePattern::invalidateClient(RenderObject* client) 61 { 62 ASSERT(client); 63 ASSERT(client->selfNeedsLayout()); 64 65 if (m_pattern.contains(client)) 66 delete m_pattern.take(client); 67 68 markClientForInvalidation(client, RepaintInvalidation); 80 69 } 81 70 … … 245 234 return 0; 246 235 247 // Early exit, if this resource contains a child which references ourselves.248 if (containsCyclicReference(attributes.patternContentElement()))249 return 0;250 251 236 FloatRect objectBoundingBox = object->objectBoundingBox(); 252 237 FloatRect patternBoundaries = calculatePatternBoundaries(attributes, objectBoundingBox, patternElement); -
trunk/WebCore/rendering/RenderSVGResourcePattern.h
r63300 r64275 68 68 const AffineTransform& viewBoxCTM, const FloatRect& patternBoundaries) const; 69 69 70 virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const;71 72 70 HashMap<RenderObject*, PatternData*> m_pattern; 73 71 }; -
trunk/WebCore/rendering/RenderSVGRoot.cpp
r64272 r64275 33 33 #include "SVGLength.h" 34 34 #include "SVGRenderSupport.h" 35 #include "SVGResources.h" 35 36 #include "SVGSVGElement.h" 36 37 #include "SVGStyledElement.h" … … 130 131 } 131 132 132 bool RenderSVGRoot::selfWillPaint() const133 bool RenderSVGRoot::selfWillPaint() 133 134 { 134 135 #if ENABLE(FILTERS) 135 const SVGRenderStyle* svgStyle = style()->svgStyle(); 136 RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVGResourceFilter>(document(), svgStyle->filterResource()); 137 if (filter) 138 return true; 136 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this); 137 return resources && resources->filter(); 139 138 #endif 140 139 return false; … … 193 192 void RenderSVGRoot::destroy() 194 193 { 195 RenderSVGResource::invalidateAllResourcesOfRenderer(this);194 SVGResourcesCache::clientDestroyed(this); 196 195 RenderBox::destroy(); 196 } 197 198 void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 199 { 200 RenderBox::styleDidChange(diff, oldStyle); 201 SVGResourcesCache::clientStyleChanged(this, diff, style()); 202 } 203 204 void RenderSVGRoot::updateFromElement() 205 { 206 RenderBox::updateFromElement(); 207 SVGResourcesCache::clientUpdatedFromElement(this, style()); 197 208 } 198 209 -
trunk/WebCore/rendering/RenderSVGRoot.h
r62922 r64275 59 59 60 60 virtual void destroy(); 61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 62 virtual void updateFromElement(); 61 63 62 64 virtual const AffineTransform& localToParentTransform() const; … … 78 80 void calcViewport(); 79 81 80 bool selfWillPaint() const;82 bool selfWillPaint(); 81 83 82 84 IntSize parentOriginToBorderBox() const; -
trunk/WebCore/rendering/RenderSVGText.cpp
r63531 r64275 99 99 forceLayoutInlineChildren(); 100 100 101 // Invalidate all resources of this client , if we changed something.101 // Invalidate all resources of this client if our layout changed. 102 102 if (m_everHadLayout && selfNeedsLayout()) 103 RenderSVGResource::invalidateAllResourcesOfRenderer(this);103 SVGResourcesCache::clientLayoutChanged(this); 104 104 105 105 repainter.repaintAfterLayout(); … … 131 131 132 132 return false; 133 }134 135 void RenderSVGText::destroy()136 {137 RenderSVGResource::invalidateAllResourcesOfRenderer(this);138 RenderSVGBlock::destroy();139 133 } 140 134 -
trunk/WebCore/rendering/RenderSVGText.h
r61759 r64275 52 52 virtual void layout(); 53 53 54 virtual void destroy();55 56 54 virtual void absoluteQuads(Vector<FloatQuad>&); 57 55 -
trunk/WebCore/rendering/SVGInlineTextBox.cpp
r62104 r64275 296 296 } 297 297 298 bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, RenderStyle* style) 299 { 298 bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, RenderObject* renderer, RenderStyle* style) 299 { 300 ASSERT(renderer); 301 ASSERT(style); 300 302 ASSERT(m_paintingResourceMode != ApplyToDefaultMode); 301 303 302 RenderObject* parentRenderer = parent()->renderer();303 ASSERT(parentRenderer);304 305 304 if (m_paintingResourceMode & ApplyToFillMode) 306 m_paintingResource = RenderSVGResource::fillPaintingResource( parentRenderer, style);305 m_paintingResource = RenderSVGResource::fillPaintingResource(renderer, style); 307 306 else if (m_paintingResourceMode & ApplyToStrokeMode) 308 m_paintingResource = RenderSVGResource::strokePaintingResource( parentRenderer, style);307 m_paintingResource = RenderSVGResource::strokePaintingResource(renderer, style); 309 308 else { 310 309 // We're either called for stroking or filling. … … 315 314 return false; 316 315 317 m_paintingResource->applyResource( parentRenderer, style, context, m_paintingResourceMode);316 m_paintingResource->applyResource(renderer, style, context, m_paintingResourceMode); 318 317 return true; 319 318 } … … 332 331 bool SVGInlineTextBox::prepareGraphicsContextForTextPainting(GraphicsContext*& context, TextRun& textRun, RenderStyle* style) 333 332 { 334 bool acquiredResource = acquirePaintingResource(context, style);333 bool acquiredResource = acquirePaintingResource(context, parent()->renderer(), style); 335 334 336 335 #if ENABLE(SVG_FONTS) … … 509 508 if (hasDecorationFill) { 510 509 m_paintingResourceMode = ApplyToFillMode; 511 paintDecorationWithStyle(context, textOrigin, decoration Style, decoration);510 paintDecorationWithStyle(context, textOrigin, decorationRenderer, decoration); 512 511 } 513 512 514 513 if (hasDecorationStroke) { 515 514 m_paintingResourceMode = ApplyToStrokeMode; 516 paintDecorationWithStyle(context, textOrigin, decoration Style, decoration);517 } 518 } 519 520 void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext* context, const FloatPoint& textOrigin, Render Style* decorationStyle, ETextDecoration decoration)515 paintDecorationWithStyle(context, textOrigin, decorationRenderer, decoration); 516 } 517 } 518 519 void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext* context, const FloatPoint& textOrigin, RenderObject* decorationRenderer, ETextDecoration decoration) 521 520 { 522 521 ASSERT(!m_paintingResource); 523 522 ASSERT(m_paintingResourceMode != ApplyToDefaultMode); 524 523 ASSERT(m_currentChunkPart.isValid()); 524 525 RenderStyle* decorationStyle = decorationRenderer->style(); 526 ASSERT(decorationStyle); 525 527 526 528 const Font& font = decorationStyle->font(); … … 535 537 context->addPath(Path::createRectangle(FloatRect(x, y, m_currentChunkPart.width, thickness))); 536 538 537 if (acquirePaintingResource(context, decoration Style))539 if (acquirePaintingResource(context, decorationRenderer, decorationStyle)) 538 540 releasePaintingResource(context); 539 541 … … 615 617 616 618 // Draw text using selection style from the start to the end position of the selection 619 if (style != selectionStyle) 620 SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, selectionStyle); 621 617 622 TextRun selectionTextRun(constructTextRun(selectionStyle)); 618 623 paintTextWithShadows(context, textOrigin, selectionStyle, textRun, startPos, endPos); 624 625 if (style != selectionStyle) 626 SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, style); 619 627 620 628 // Eventually draw text using regular style from the end position of the selection to the end of the current chunk part -
trunk/WebCore/rendering/SVGInlineTextBox.h
r62104 r64275 76 76 AffineTransform buildChunkTransformation(SVGChar& firstCharacter) const; 77 77 78 bool acquirePaintingResource(GraphicsContext*&, Render Style*);78 bool acquirePaintingResource(GraphicsContext*&, RenderObject*, RenderStyle*); 79 79 void releasePaintingResource(GraphicsContext*&); 80 80 … … 84 84 void computeTextMatchMarkerRect(RenderStyle*); 85 85 void paintDecoration(GraphicsContext*, const FloatPoint& textOrigin, ETextDecoration, bool hasSelection); 86 void paintDecorationWithStyle(GraphicsContext*, const FloatPoint& textOrigin, Render Style*, ETextDecoration);86 void paintDecorationWithStyle(GraphicsContext*, const FloatPoint& textOrigin, RenderObject*, ETextDecoration); 87 87 void paintSelection(GraphicsContext*, const FloatPoint& textOrigin, RenderStyle*); 88 88 void paintText(GraphicsContext*, const FloatPoint& textOrigin, RenderStyle*, RenderStyle* selectionStyle, bool hasSelection, bool paintSelectedTextOnly); -
trunk/WebCore/rendering/SVGRenderSupport.cpp
r62531 r64275 41 41 #include "RenderSVGResourceMasker.h" 42 42 #include "RenderSVGRoot.h" 43 #include "SVGResources.h" 43 44 #include "SVGStyledElement.h" 44 45 #include "TransformState.h" … … 83 84 ASSERT(svgElement && svgElement->document() && svgElement->isStyled()); 84 85 85 SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(svgElement);86 86 RenderStyle* style = object->style(); 87 87 ASSERT(style); … … 110 110 } 111 111 112 Document* document = object->document(); 113 114 if (svgStyle->hasMasker()) { 115 AtomicString maskerId(svgStyle->maskerResource()); 116 if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(document, maskerId)) { 117 if (!masker->applyResource(object, style, paintInfo.context, ApplyToDefaultMode)) 118 return false; 119 } else 120 document->accessSVGExtensions()->addPendingResource(maskerId, styledElement); 121 } 122 123 if (svgStyle->hasClipper()) { 124 AtomicString clipperId(svgStyle->clipperResource()); 125 if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(document, clipperId)) 126 clipper->applyResource(object, style, paintInfo.context, ApplyToDefaultMode); 127 else 128 document->accessSVGExtensions()->addPendingResource(clipperId, styledElement); 129 } 112 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object); 113 if (!resources) 114 return true; 115 116 if (RenderSVGResourceMasker* masker = resources->masker()) { 117 if (!masker->applyResource(object, style, paintInfo.context, ApplyToDefaultMode)) 118 return false; 119 } 120 121 if (RenderSVGResourceClipper* clipper = resources->clipper()) 122 clipper->applyResource(object, style, paintInfo.context, ApplyToDefaultMode); 130 123 131 124 #if ENABLE(FILTERS) 132 if (svgStyle->hasFilter()) { 133 AtomicString filterId(svgStyle->filterResource()); 134 if (RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVGResourceFilter>(document, filterId)) { 135 if (!filter->applyResource(object, style, paintInfo.context, ApplyToDefaultMode)) 136 return false; 137 } else 138 document->accessSVGExtensions()->addPendingResource(filterId, styledElement); 125 if (RenderSVGResourceFilter* filter = resources->filter()) { 126 if (!filter->applyResource(object, style, paintInfo.context, ApplyToDefaultMode)) 127 return false; 139 128 } 140 129 #endif … … 158 147 159 148 #if ENABLE(FILTERS) 160 if (svgStyle->hasFilter()) {161 AtomicString filterId(svgStyle->filterResource());162 if (RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVGResourceFilter>(object->document(), filterId)) {149 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object); 150 if (resources) { 151 if (RenderSVGResourceFilter* filter = resources->filter()) { 163 152 filter->postApplyResource(object, paintInfo.context, ApplyToDefaultMode); 164 153 paintInfo.context = savedContext; … … 290 279 { 291 280 ASSERT(object); 292 ASSERT(object->style()); 293 const SVGRenderStyle* svgStyle = object->style()->svgStyle(); 294 if (!svgStyle) 281 282 RenderStyle* style = object->style(); 283 ASSERT(style); 284 285 const SVGRenderStyle* svgStyle = style->svgStyle(); 286 ASSERT(svgStyle); 287 288 RenderObject* renderer = const_cast<RenderObject*>(object); 289 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer); 290 if (!resources) { 291 svgStyle->inflateForShadow(repaintRect); 295 292 return; 296 297 RenderObject* renderer = const_cast<RenderObject*>(object); 293 } 294 298 295 #if ENABLE(FILTERS) 299 if (svgStyle->hasFilter()) { 300 if (RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVGResourceFilter>(object->document(), svgStyle->filterResource())) 301 repaintRect = filter->resourceBoundingBox(renderer); 302 } 303 #endif 304 305 if (svgStyle->hasClipper()) { 306 if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(object->document(), svgStyle->clipperResource())) 307 repaintRect.intersect(clipper->resourceBoundingBox(renderer)); 308 } 309 310 if (svgStyle->hasMasker()) { 311 if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(object->document(), svgStyle->maskerResource())) 312 repaintRect.intersect(masker->resourceBoundingBox(renderer)); 313 } 314 296 if (RenderSVGResourceFilter* filter = resources->filter()) 297 repaintRect = filter->resourceBoundingBox(renderer); 298 #endif 299 300 if (RenderSVGResourceClipper* clipper = resources->clipper()) 301 repaintRect.intersect(clipper->resourceBoundingBox(renderer)); 302 303 if (RenderSVGResourceMasker* masker = resources->masker()) 304 repaintRect.intersect(masker->resourceBoundingBox(renderer)); 305 315 306 svgStyle->inflateForShadow(repaintRect); 316 307 } 317 308 318 bool SVGRenderSupport::pointInClippingArea( constRenderObject* object, const FloatPoint& point)309 bool SVGRenderSupport::pointInClippingArea(RenderObject* object, const FloatPoint& point) 319 310 { 320 311 ASSERT(object); 321 ASSERT(object->style()); 322 323 Document* document = object->document(); 324 ASSERT(document); 325 326 const SVGRenderStyle* svgStyle = object->style()->svgStyle(); 312 313 RenderStyle* style = object->style(); 314 ASSERT(style); 315 316 const SVGRenderStyle* svgStyle = style->svgStyle(); 327 317 ASSERT(svgStyle); 328 318 329 319 // We just take clippers into account to determine if a point is on the node. The Specification may 330 320 // change later and we also need to check maskers. 331 if (svgStyle->hasClipper()) { 332 if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(document, svgStyle->clipperResource())) 333 return clipper->hitTestClipContent(object->objectBoundingBox(), point); 334 } 321 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object); 322 if (!resources) 323 return true; 324 325 if (RenderSVGResourceClipper* clipper = resources->clipper()) 326 return clipper->hitTestClipContent(object->objectBoundingBox(), point); 335 327 336 328 return true; -
trunk/WebCore/rendering/SVGRenderSupport.h
r62244 r64275 57 57 58 58 // Determines whether the passed point lies in a clipping area 59 static bool pointInClippingArea( constRenderObject*, const FloatPoint&);59 static bool pointInClippingArea(RenderObject*, const FloatPoint&); 60 60 61 61 enum ContainerBoundingBoxMode { -
trunk/WebCore/rendering/SVGRenderTreeAsText.cpp
r62118 r64275 367 367 const RenderPath& path = static_cast<const RenderPath&>(object); 368 368 369 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strokePaintingResource( &path, path.style())) {369 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strokePaintingResource(const_cast<RenderPath*>(&path), path.style())) { 370 370 TextStreamSeparator s(" "); 371 371 ts << " [stroke={" << s; … … 388 388 } 389 389 390 if (RenderSVGResource* fillPaintingResource = RenderSVGResource::fillPaintingResource( &path, path.style())) {390 if (RenderSVGResource* fillPaintingResource = RenderSVGResource::fillPaintingResource(const_cast<RenderPath*>(&path), path.style())) { 391 391 TextStreamSeparator s(" "); 392 392 ts << " [fill={" << s; … … 735 735 const SVGRenderStyle* svgStyle = style->svgStyle(); 736 736 737 // FIXME: We want to use SVGResourcesCache to determine which resources are present, instead of quering the resource <-> id cache. 738 // For now leave the DRT output as is, but later on we should change this so cycles are properly ignored in the DRT output. 737 739 RenderObject& renderer = const_cast<RenderObject&>(object); 738 740 if (!svgStyle->maskerResource().isEmpty()) { -
trunk/WebCore/rendering/SVGResourcesCache.cpp
r64196 r64275 132 132 133 133 clientUpdatedFromElement(renderer, newStyle); 134 135 // Invalidate resources in ancestor chain, if needed. 136 RenderObject* parent = renderer->parent(); 137 while (parent) { 138 if (parent->isSVGResourceContainer()) { 139 parent->toRenderSVGResourceContainer()->invalidateClients(); 140 break; 141 } 142 143 parent = parent->parent(); 144 } 134 RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false); 145 135 } 146 136 -
trunk/WebCore/rendering/SVGResourcesCycleSolver.cpp
r64196 r64275 112 112 } 113 113 114 static inline void setFollowLinkForChainableResource(SVGElement*, bool) 115 { 116 // FIXME: Enable once the follow-up patch for bug 43031 lands 114 static inline void setFollowLinkForChainableResource(SVGElement* element, bool followLink) 115 { 116 if (element->hasTagName(SVGNames::patternTag)) 117 static_cast<SVGPatternElement*>(element)->setFollowLink(followLink); 118 else if (element->hasTagName(SVGNames::linearGradientTag) || element->hasTagName(SVGNames::radialGradientTag)) 119 static_cast<SVGGradientElement*>(element)->setFollowLink(followLink); 120 else if (element->hasTagName(SVGNames::filterTag)) 121 static_cast<SVGFilterElement*>(element)->setFollowLink(followLink); 117 122 } 118 123 -
trunk/WebCore/rendering/style/SVGRenderStyle.cpp
r62259 r64275 166 166 if (stroke != other->stroke) { 167 167 if (stroke->width != other->stroke->width 168 || stroke->paint != other->stroke->paint 168 169 || stroke->miterLimit != other->stroke->miterLimit 169 170 || stroke->dashArray != other->stroke->dashArray … … 171 172 return StyleDifferenceLayout; 172 173 173 // Only the se two cases remain, where we only need a repaint.174 ASSERT(stroke-> paint != other->stroke->paint || stroke->opacity != other->stroke->opacity);174 // Only the stroke-opacity case remains, where we only need a repaint. 175 ASSERT(stroke->opacity != other->stroke->opacity); 175 176 return StyleDifferenceRepaint; 176 177 } -
trunk/WebCore/svg/SVGClipPathElement.cpp
r59773 r64275 70 70 SVGStyledTransformableElement::svgAttributeChanged(attrName); 71 71 72 RenderObject* object = renderer(); 73 if (!object) 74 return; 75 72 76 if (attrName == SVGNames::clipPathUnitsAttr || 73 77 SVGTests::isKnownAttribute(attrName) || … … 75 79 SVGExternalResourcesRequired::isKnownAttribute(attrName) || 76 80 SVGStyledTransformableElement::isKnownAttribute(attrName)) 77 invalidateResourceClients();81 object->setNeedsLayout(true); 78 82 } 79 83 … … 98 102 SVGStyledTransformableElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); 99 103 100 if (!changedByParser) 101 invalidateResourceClients(); 104 if (changedByParser) 105 return; 106 107 if (RenderObject* object = renderer()) 108 object->setNeedsLayout(true); 102 109 } 103 110 -
trunk/WebCore/svg/SVGClipPathElement.h
r59773 r64275 40 40 41 41 virtual bool isValid() const { return SVGTests::isValid(); } 42 virtual bool needsPendingResourceHandling() const { return false; } 42 43 43 44 virtual void parseMappedAttribute(Attribute*); -
trunk/WebCore/svg/SVGElement.cpp
r62482 r64275 279 279 { 280 280 StyledElement::insertedIntoDocument(); 281 282 if (!needsPendingResourceHandling()) 283 return; 284 281 285 SVGDocumentExtensions* extensions = document()->accessSVGExtensions(); 282 283 286 String resourceId = getIdAttribute(); 284 if (extensions->isPendingResource(resourceId)) { 285 OwnPtr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResource(resourceId)); 286 if (clients->isEmpty()) 287 return; 288 289 HashSet<SVGStyledElement*>::const_iterator it = clients->begin(); 290 const HashSet<SVGStyledElement*>::const_iterator end = clients->end(); 291 292 for (; it != end; ++it) 293 (*it)->buildPendingResource(); 294 } 287 if (!extensions->isPendingResource(resourceId)) 288 return; 289 290 OwnPtr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResource(resourceId)); 291 if (clients->isEmpty()) 292 return; 293 294 const HashSet<SVGStyledElement*>::const_iterator end = clients->end(); 295 for (HashSet<SVGStyledElement*>::const_iterator it = clients->begin(); it != end; ++it) 296 (*it)->buildPendingResource(); 295 297 } 296 298 -
trunk/WebCore/svg/SVGElement.h
r59773 r64275 98 98 99 99 virtual ContainerNode* eventParentNode(); 100 101 virtual bool needsPendingResourceHandling() const { return true; } 100 102 virtual void buildPendingResource() { } 101 103 -
trunk/WebCore/svg/SVGFilterElement.cpp
r63809 r64275 48 48 , SVGLangSpace() 49 49 , SVGExternalResourcesRequired() 50 , m_followLink(true) 50 51 , m_filterUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 51 52 , m_primitiveUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) … … 67 68 setFilterResXBaseValue(filterResX); 68 69 setFilterResYBaseValue(filterResY); 69 invalidateResourceClients(); 70 71 if (RenderObject* object = renderer()) 72 object->setNeedsLayout(true); 70 73 } 71 74 … … 122 125 } 123 126 127 RenderObject* object = renderer(); 128 if (!object) 129 return; 130 124 131 if (invalidateClients 125 132 || attrName == SVGNames::filterUnitsAttr … … 130 137 || SVGLangSpace::isKnownAttribute(attrName) 131 138 || SVGExternalResourcesRequired::isKnownAttribute(attrName)) 132 invalidateResourceClients();139 object->setNeedsLayout(true); 133 140 } 134 141 … … 176 183 SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); 177 184 178 if (!changedByParser) 179 invalidateResourceClients(); 185 if (changedByParser) 186 return; 187 188 if (RenderObject* object = renderer()) 189 object->setNeedsLayout(true); 180 190 } 181 191 -
trunk/WebCore/svg/SVGFilterElement.h
r63809 r64275 44 44 virtual ~SVGFilterElement(); 45 45 46 virtual bool needsPendingResourceHandling() const { return false; } 47 46 48 void setFilterRes(unsigned long filterResX, unsigned long filterResY); 47 49 FloatRect filterBoundingBox(const FloatRect&) const; … … 54 56 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 55 57 58 // FIXME: Add xlink:href support for filters, and use this property 59 void setFollowLink(bool followLink) { m_followLink = followLink; } 60 56 61 private: 57 62 virtual bool selfHasRelativeLengths() const; 63 64 bool m_followLink; 58 65 59 66 DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::filterUnitsAttr, int, FilterUnits, filterUnits) -
trunk/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
r63883 r64275 108 108 109 109 if (!changedByParser) 110 invalidate ResourceClients();110 invalidateFilter(); 111 111 } 112 112 -
trunk/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
r63883 r64275 56 56 if (!inDocument() || !parentNode()->hasTagName(SVGNames::filterTag)) 57 57 return; 58 static_cast<SVGFilterElement*>(parentNode())->invalidateResourceClients(); 58 if (RenderObject* object = parentNode()->renderer()) 59 object->setNeedsLayout(true); 59 60 } 60 61 -
trunk/WebCore/svg/SVGGradientElement.cpp
r59773 r64275 43 43 , SVGURIReference() 44 44 , SVGExternalResourcesRequired() 45 , m_followLink(true) 45 46 , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 46 47 , m_gradientTransform(SVGTransformList::create(SVGNames::gradientTransformAttr)) … … 86 87 SVGStyledElement::svgAttributeChanged(attrName); 87 88 89 RenderObject* object = renderer(); 90 if (!object) 91 return; 92 88 93 if (attrName == SVGNames::gradientUnitsAttr 89 94 || attrName == SVGNames::gradientTransformAttr … … 92 97 || SVGExternalResourcesRequired::isKnownAttribute(attrName) 93 98 || SVGStyledElement::isKnownAttribute(attrName)) 94 invalidateResourceClients();99 object->setNeedsLayout(true); 95 100 } 96 101 … … 124 129 SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); 125 130 126 if (!changedByParser) 127 invalidateResourceClients(); 131 if (changedByParser) 132 return; 133 134 if (RenderObject* object = renderer()) 135 object->setNeedsLayout(true); 128 136 } 129 137 -
trunk/WebCore/svg/SVGGradientElement.h
r59773 r64275 38 38 virtual ~SVGGradientElement(); 39 39 40 virtual bool needsPendingResourceHandling() const { return false; } 41 40 42 virtual void parseMappedAttribute(Attribute*); 41 43 virtual void svgAttributeChanged(const QualifiedName&); … … 46 48 Vector<Gradient::ColorStop> buildStops(); 47 49 50 void setFollowLink(bool followLink) { m_followLink = followLink; } 51 48 52 protected: 53 bool m_followLink; 54 49 55 DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::spreadMethodAttr, int, SpreadMethod, spreadMethod) 50 56 DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::gradientUnitsAttr, int, GradientUnits, gradientUnits) -
trunk/WebCore/svg/SVGLinearGradientElement.cpp
r62488 r64275 77 77 || attrName == SVGNames::y2Attr) { 78 78 updateRelativeLengthsInformation(); 79 invalidateResourceClients(); 79 80 RenderObject* object = renderer(); 81 if (!object) 82 return; 83 84 object->setNeedsLayout(true); 80 85 } 81 86 } … … 151 156 152 157 // Respect xlink:href, take attributes from referenced element 153 Node* refNode = ownerDocument()->getElementById(SVGURIReference::getTarget(current->href()));158 Node* refNode = m_followLink ? ownerDocument()->getElementById(SVGURIReference::getTarget(current->href())) : 0; 154 159 if (refNode && (refNode->hasTagName(SVGNames::linearGradientTag) || refNode->hasTagName(SVGNames::radialGradientTag))) { 155 160 current = static_cast<SVGGradientElement*>(refNode); 156 161 157 162 // Cycle detection 158 if (processedGradients.contains(current)) 159 return LinearGradientAttributes(); 163 if (processedGradients.contains(current)) { 164 current = 0; 165 break; 166 } 160 167 161 168 isLinear = current->hasTagName(SVGNames::linearGradientTag); -
trunk/WebCore/svg/SVGMarkerElement.cpp
r62488 r64275 114 114 } 115 115 116 RenderObject* object = renderer(); 117 if (!object) 118 return; 119 116 120 if (invalidateClients 117 121 || attrName == SVGNames::markerUnitsAttr … … 121 125 || SVGFitToViewBox::isKnownAttribute(attrName) 122 126 || SVGStyledElement::isKnownAttribute(attrName)) 123 invalidateResourceClients();127 object->setNeedsLayout(true); 124 128 } 125 129 … … 167 171 SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); 168 172 169 if (!changedByParser) 170 invalidateResourceClients(); 173 if (changedByParser) 174 return; 175 176 if (RenderObject* object = renderer()) 177 object->setNeedsLayout(true); 171 178 } 172 179 … … 176 183 setOrientAngleBaseValue(SVGAngle()); 177 184 178 invalidateResourceClients(); 185 if (RenderObject* object = renderer()) 186 object->setNeedsLayout(true); 179 187 } 180 188 … … 184 192 setOrientAngleBaseValue(angle); 185 193 186 invalidateResourceClients(); 194 if (RenderObject* object = renderer()) 195 object->setNeedsLayout(true); 187 196 } 188 197 -
trunk/WebCore/svg/SVGMarkerElement.h
r62488 r64275 57 57 virtual ~SVGMarkerElement(); 58 58 59 virtual bool needsPendingResourceHandling() const { return false; } 60 59 61 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const; 60 62 -
trunk/WebCore/svg/SVGMaskElement.cpp
r64197 r64275 103 103 } 104 104 105 RenderObject* object = renderer(); 106 if (!object) 107 return; 108 105 109 if (invalidateClients 106 110 || attrName == SVGNames::maskUnitsAttr … … 110 114 || SVGExternalResourcesRequired::isKnownAttribute(attrName) 111 115 || SVGStyledElement::isKnownAttribute(attrName)) 112 invalidateResourceClients();116 object->setNeedsLayout(true); 113 117 } 114 118 … … 142 146 SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); 143 147 144 if (!changedByParser) 145 invalidateResourceClients(); 148 if (changedByParser) 149 return; 150 151 if (RenderObject* object = renderer()) 152 object->setNeedsLayout(true); 146 153 } 147 154 -
trunk/WebCore/svg/SVGMaskElement.h
r64197 r64275 41 41 42 42 virtual bool isValid() const { return SVGTests::isValid(); } 43 virtual bool needsPendingResourceHandling() const { return false; } 43 44 44 45 FloatRect maskBoundingBox(const FloatRect&) const; -
trunk/WebCore/svg/SVGPatternElement.cpp
r62488 r64275 57 57 , SVGExternalResourcesRequired() 58 58 , SVGFitToViewBox() 59 , m_followLink(true) 59 60 , m_x(LengthModeWidth) 60 61 , m_y(LengthModeHeight) … … 130 131 } 131 132 133 RenderObject* object = renderer(); 134 if (!object) 135 return; 136 132 137 if (invalidateClients 133 138 || attrName == SVGNames::patternUnitsAttr … … 140 145 || SVGFitToViewBox::isKnownAttribute(attrName) 141 146 || SVGStyledElement::isKnownAttribute(attrName)) 142 invalidateResourceClients();147 object->setNeedsLayout(true); 143 148 } 144 149 … … 189 194 SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); 190 195 191 if (!changedByParser) 192 invalidateResourceClients(); 196 if (changedByParser) 197 return; 198 199 if (RenderObject* object = renderer()) 200 object->setNeedsLayout(true); 193 201 } 194 202 … … 232 240 233 241 // Respect xlink:href, take attributes from referenced element 234 Node* refNode = ownerDocument()->getElementById(SVGURIReference::getTarget(current->href()));242 Node* refNode = m_followLink ? ownerDocument()->getElementById(SVGURIReference::getTarget(current->href())) : 0; 235 243 if (refNode && refNode->hasTagName(SVGNames::patternTag)) { 236 244 current = static_cast<const SVGPatternElement*>(const_cast<const Node*>(refNode)); 237 245 238 246 // Cycle detection 239 if (processedPatterns.contains(current)) 240 return PatternAttributes(); 247 if (processedPatterns.contains(current)) { 248 current = 0; 249 break; 250 } 241 251 } else 242 252 current = 0; -
trunk/WebCore/svg/SVGPatternElement.h
r62488 r64275 48 48 49 49 virtual bool isValid() const { return SVGTests::isValid(); } 50 virtual bool needsPendingResourceHandling() const { return false; } 50 51 51 52 virtual void parseMappedAttribute(Attribute*); … … 57 58 58 59 PatternAttributes collectPatternProperties() const; 60 void setFollowLink(bool followLink) { m_followLink = followLink; } 59 61 60 62 private: 61 63 virtual bool selfHasRelativeLengths() const; 64 65 bool m_followLink; 62 66 63 67 DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::xAttr, SVGLength, X, x) -
trunk/WebCore/svg/SVGRadialGradientElement.cpp
r62488 r64275 84 84 || attrName == SVGNames::rAttr) { 85 85 updateRelativeLengthsInformation(); 86 invalidateResourceClients(); 86 87 RenderObject* object = renderer(); 88 if (!object) 89 return; 90 91 object->setNeedsLayout(true); 87 92 } 88 93 } … … 164 169 165 170 // Respect xlink:href, take attributes from referenced element 166 Node* refNode = ownerDocument()->getElementById(SVGURIReference::getTarget(current->href()));171 Node* refNode = m_followLink ? ownerDocument()->getElementById(SVGURIReference::getTarget(current->href())) : 0; 167 172 if (refNode && (refNode->hasTagName(SVGNames::radialGradientTag) || refNode->hasTagName(SVGNames::linearGradientTag))) { 168 173 current = static_cast<SVGGradientElement*>(refNode); 169 174 170 175 // Cycle detection 171 if (processedGradients.contains(current)) 172 return RadialGradientAttributes(); 176 if (processedGradients.contains(current)) { 177 current = 0; 178 break; 179 } 173 180 174 181 isRadial = current->hasTagName(SVGNames::radialGradientTag); -
trunk/WebCore/svg/SVGStyledElement.cpp
r63531 r64275 259 259 } 260 260 261 void SVGStyledElement::invalidateResourceClients() 262 { 263 if (document()->parsing()) 264 return; 265 266 RenderObject* object = renderer(); 267 if (!object) 268 return; 269 270 if (object->isSVGResourceContainer()) 271 object->toRenderSVGResourceContainer()->invalidateClients(); 261 void SVGStyledElement::attach() 262 { 263 SVGElement::attach(); 264 265 if (RenderObject* object = renderer()) 266 object->updateFromElement(); 272 267 } 273 268 -
trunk/WebCore/svg/SVGStyledElement.h
r63531 r64275 58 58 virtual void synchronizeProperty(const QualifiedName&); 59 59 60 virtual void attach(); 60 61 virtual void insertedIntoDocument(); 61 62 virtual void removedFromDocument(); … … 64 65 // Centralized place to force a manual style resolution. Hacky but needed for now. 65 66 PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle); 66 67 void invalidateResourceClients();68 67 69 68 bool instanceUpdatesBlocked() const;
Note: See TracChangeset
for help on using the changeset viewer.