Changeset 162517 in webkit
- Timestamp:
- Jan 22, 2014 6:53:15 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r162515 r162517 1 2014-01-22 Mihai Tica <mitica@adobe.com> 2 3 [CSS Background Blending] -webkit-background-blend-mode fails for certain SVG files 4 https://bugs.webkit.org/show_bug.cgi?id=127350 5 6 Reviewed by Dirk Schulze. 7 8 * css3/compositing/background-blend-mode-svg-expected.html: Added. 9 * css3/compositing/background-blend-mode-svg.html: Added. 10 1 11 2014-01-22 Antti Koivisto <antti@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r162515 r162517 1 2014-01-22 Mihai Tica <mitica@adobe.com> 2 3 [CSS Background Blending] -webkit-background-blend-mode fails for certain SVG files 4 https://bugs.webkit.org/show_bug.cgi?id=127350 5 6 Reviewed by Dirk Schulze. 7 8 The graphics context of the SVG inherits the blend mode set 9 on the background layer. Fix consists in drawing the SVG 10 in a transparency layer. 11 12 Test: css3/compositing/background-blend-mode-svg.html 13 14 * svg/graphics/SVGImage.cpp: 15 (WebCore::SVGImage::draw): Begin a transparency layer if a blend mode is set. 16 1 17 2014-01-22 Antti Koivisto <antti@apple.com> 2 18 -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r162341 r162517 227 227 context->setCompositeOperation(compositeOp, blendMode); 228 228 context->clip(enclosingIntRect(dstRect)); 229 if (compositeOp != CompositeSourceOver) 229 bool compositingRequiresTransparencyLayer = compositeOp != CompositeSourceOver || blendMode != BlendModeNormal; 230 if (compositingRequiresTransparencyLayer) { 230 231 context->beginTransparencyLayer(1); 232 context->setCompositeOperation(CompositeSourceOver, BlendModeNormal); 233 } 231 234 232 235 FloatSize scale(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()); … … 247 250 view->paint(context, enclosingIntRect(srcRect)); 248 251 249 if (composit eOp != CompositeSourceOver)252 if (compositingRequiresTransparencyLayer) 250 253 context->endTransparencyLayer(); 251 254
Note: See TracChangeset
for help on using the changeset viewer.