Changeset 55930 in webkit
- Timestamp:
- Mar 12, 2010 12:43:59 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55926 r55930 1 2010-03-12 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVG fallback color doesn't work for bogus gradients. 6 https://bugs.webkit.org/show_bug.cgi?id=35479 7 8 We now use a fallback color on ignored gradients for one dimensional objects, 9 either a given fallback color or black as default. 10 This causes a change of one LayoutTest, because it was done manually in the 11 gradient PaintServer, without respecting a given fallback color. 12 13 * platform/mac/svg/W3C-SVG-1.1/pservers-grad-17-b-expected.txt: 14 * platform/mac/svg/custom/gradient-with-1d-boundingbox-expected.checksum: Added. 15 * platform/mac/svg/custom/gradient-with-1d-boundingbox-expected.png: Added. 16 * platform/mac/svg/custom/gradient-with-1d-boundingbox-expected.txt: Added. 17 * svg/custom/gradient-with-1d-boundingbox.svg: Added. 18 1 19 2010-03-12 Dmitry Titov <dimich@chromium.org> 2 20 -
trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-17-b-expected.txt
r54483 r55930 11 11 RenderSVGContainer {g} at (49,81) size 146x146 [transform={m=((0.30,0.00)(0.00,0.30)) t=(50.00,100.00)}] 12 12 RenderPath {rect} at (49,81) size 146x146 [stroke={[type=SOLID] [color=#000000]}] [data="M0.00,-60.00 L480.00,-60.00 L480.00,420.00 L0.00,420.00 Z"] 13 RenderPath {line} at (50,151) size 144x6 [stroke={[type= LINEAR-GRADIENT] [stops=[(0.00,#000000), (1.00,#FFFFFF)]] [start=(0,0)] [end=(1,0)] [stroke width=20.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,180.00 L480.00,180.00"]14 RenderPath {line} at (68,100) size 108x108 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(197.57,-116.98)}] [stroke={[type= LINEAR-GRADIENT] [stops=[(0.00,#000000), (1.00,#FFFFFF)]] [start=(0,0)] [end=(1,0)] [stroke width=20.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,180.00 L480.00,180.00"]15 RenderPath {line} at (119,82) size 6x144 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(420.00,-60.00)}] [stroke={[type= LINEAR-GRADIENT] [stops=[(0.00,#000000), (1.00,#FFFFFF)]] [start=(0,0)] [end=(1,0)] [stroke width=20.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,180.00 L480.00,180.00"]13 RenderPath {line} at (50,151) size 144x6 [stroke={[type=SOLID] [color=#000000] [stroke width=20.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,180.00 L480.00,180.00"] 14 RenderPath {line} at (68,100) size 108x108 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(197.57,-116.98)}] [stroke={[type=SOLID] [color=#000000] [stroke width=20.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,180.00 L480.00,180.00"] 15 RenderPath {line} at (119,82) size 6x144 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(420.00,-60.00)}] [stroke={[type=SOLID] [color=#000000] [stroke width=20.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,180.00 L480.00,180.00"] 16 16 RenderPath {line} at (68,100) size 108x108 [stroke={[type=LINEAR-GRADIENT] [stops=[(0.00,#000000), (1.00,#FFFFFF)]] [start=(0,0)] [end=(1,0)] [stroke width=20.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M410.00,10.00 L70.00,350.00"] 17 17 RenderSVGText {text} at (84,250) size 72x18 contains 1 chunk(s) -
trunk/WebCore/ChangeLog
r55928 r55930 1 2010-03-12 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVG fallback color doesn't work for bogus gradients. 6 https://bugs.webkit.org/show_bug.cgi?id=35479 7 8 Use a given fallback color on ignored gradients if present. Gradients 9 must be ignored, if one dimension of the objects boundingBox is zero. 10 11 Test: svg/custom/gradient-with-1d-boundingbox.svg 12 13 * svg/graphics/SVGPaintServer.cpp: 14 (WebCore::SVGPaintServer::strokePaintServer): 15 * svg/graphics/SVGPaintServerGradient.cpp: 16 (WebCore::SVGPaintServerGradient::setup): 17 1 18 2010-03-12 David Hyatt <hyatt@apple.com> 2 19 -
trunk/WebCore/svg/graphics/SVGPaintServer.cpp
r54556 r55930 124 124 SVGPaintServer* strokePaintServer = 0; 125 125 SVGPaint::SVGPaintType paintType = stroke->paintType(); 126 if (paintType == SVGPaint::SVG_PAINTTYPE_URI || 127 paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR) { 126 if ((paintType == SVGPaint::SVG_PAINTTYPE_URI 127 || paintType == SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR) 128 && item->objectBoundingBox().width() != 0 129 && item->objectBoundingBox().height() != 0) { 128 130 AtomicString id(SVGURIReference::getTarget(stroke->uri())); 129 131 strokePaintServer = getPaintServerById(item->document(), id, item); … … 148 150 strokePaintServer = 0; 149 151 } 152 if (!strokePaintServer) { 153 // default value (black), see bug 11017 154 strokePaintServer = sharedSolidPaintServer(); 155 static_cast<SVGPaintServerSolid*>(strokePaintServer)->setColor(Color::black); 156 } 150 157 151 158 return strokePaintServer; -
trunk/WebCore/svg/graphics/SVGPaintServerGradient.cpp
r55260 r55930 224 224 #endif 225 225 FloatRect bbox = object->objectBoundingBox(); 226 // Don't use gradients for 1d objects like horizontal/vertical227 // lines or rectangles without width or height.228 if (bbox.width() == 0 || bbox.height() == 0) {229 Color color(0, 0, 0);230 context->setStrokeColor(color, style->colorSpace());231 return true;232 }233 226 matrix.translate(bbox.x(), bbox.y()); 234 227 matrix.scaleNonUniform(bbox.width(), bbox.height());
Note: See TracChangeset
for help on using the changeset viewer.