Changeset 63415 in webkit
- Timestamp:
- Jul 15, 2010 1:25:18 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r63414 r63415 1 2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Eric Seidel. 4 5 SVG patterns and masks should not be able to reference themselves 6 https://bugs.webkit.org/show_bug.cgi?id=32171 7 8 Pattern still had an issue, when using constructs like: 9 <pattern id="pattern1" xlink:href="#pattern2"/> 10 <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern> 11 12 * platform/mac/svg/custom/recursive-pattern-expected.checksum: 13 * platform/mac/svg/custom/recursive-pattern-expected.png: 14 * platform/mac/svg/custom/recursive-pattern-expected.txt: 15 * svg/custom/recursive-pattern.svg: Add new subtest. 16 1 17 2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com> 2 18 -
trunk/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.checksum
r63300 r63415 1 4de93deb4103eaf64c73e4c897f42cf5 1 072328919c08c17ef70c206e80d348dd -
trunk/LayoutTests/platform/mac/svg/custom/recursive-pattern-expected.txt
r63300 r63415 2 2 RenderView at (0,0) size 800x600 3 3 layer at (0,0) size 800x600 4 RenderSVGRoot {svg} at (0,0) size 201x 2014 RenderSVGRoot {svg} at (0,0) size 201x301 5 5 RenderSVGHiddenContainer {defs} at (0,0) size 0x0 6 6 RenderSVGResourcePattern {pattern} [id="pattern1"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] … … 10 10 RenderSVGResourcePattern {pattern} [id="pattern3"] [patternUnits=objectBoundingBox] [patternContentUnits=userSpaceOnUse] 11 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"] 12 15 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"] 13 16 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"] 14 17 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"] 15 18 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"] 19 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"] 20 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"] -
trunk/LayoutTests/svg/custom/recursive-pattern.svg
r63300 r63415 11 11 <pattern id="pattern3" x="0" y="0" width="100" height="100" xlink:href="#pattern1"/> 12 12 <pattern id="pattern4" x="0" y="0" width="100" height="100" xlink:href="#pattern2"/> 13 14 <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)"/> 17 </pattern> 13 18 </defs> 14 19 … … 18 23 <rect x="100" y="0" width="100" height="100" fill="url(#pattern3)" stroke="green"/> 19 24 <rect x="100" y="100" width="100" height="100" fill="url(#pattern4)" stroke="green"/> 25 <rect x="0" y="200" width="100" height="100" fill="url(#pattern5)" stroke="green"/> 26 <rect x="100" y="200" width="100" height="100" fill="url(#pattern6)" stroke="green"/> 20 27 </svg> -
trunk/WebCore/ChangeLog
r63413 r63415 1 2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Eric Seidel. 4 5 SVG patterns and masks should not be able to reference themselves 6 https://bugs.webkit.org/show_bug.cgi?id=32171 7 8 Pattern still had an issue, when using constructs like: 9 <pattern id="pattern1" xlink:href="#pattern2"/> 10 <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern> 11 12 Extended test svg/custom/recursive-pattern.svg to cover this situation. 13 14 * rendering/RenderSVGResourcePattern.cpp: 15 (WebCore::RenderSVGResourcePattern::applyResource): Don't perform the cycle check against node()... 16 (WebCore::RenderSVGResourcePattern::createTileImage): .. but against the "patternContentElement" which respect the xlink:href chaining. 17 1 18 2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com> 2 19 -
trunk/WebCore/rendering/RenderSVGResourcePattern.cpp
r63300 r63415 107 107 PatternData* patternData = m_pattern.get(object); 108 108 if (!patternData->pattern) { 109 // Early exit, if this resource contains a child which references ourselves.110 if (containsCyclicReference(node()))111 return false;112 113 109 // Create tile image 114 110 OwnPtr<ImageBuffer> tileImage = createTileImage(patternData, patternElement, object); … … 254 250 return 0; 255 251 252 // Early exit, if this resource contains a child which references ourselves. 253 if (containsCyclicReference(attributes.patternContentElement())) 254 return 0; 255 256 256 FloatRect objectBoundingBox = object->objectBoundingBox(); 257 257 FloatRect patternBoundaries = calculatePatternBoundaries(attributes, objectBoundingBox, patternElement);
Note: See TracChangeset
for help on using the changeset viewer.