Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1037)

Unified Diff: Source/core/rendering/svg/SVGRenderingContext.cpp

Issue 98543012: [CSS Blending] SVG overlapping elements within a group don't blend together. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment test description Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/css3/compositing/svg-blend-overlapping-elements-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGRenderingContext.cpp
diff --git a/Source/core/rendering/svg/SVGRenderingContext.cpp b/Source/core/rendering/svg/SVGRenderingContext.cpp
index 6e13c675ad2f88a85ffb58254e24dbcc59e78f8c..c7598a478eeb9224f217157266b07aab5ce7394d 100644
--- a/Source/core/rendering/svg/SVGRenderingContext.cpp
+++ b/Source/core/rendering/svg/SVGRenderingContext.cpp
@@ -119,6 +119,7 @@ void SVGRenderingContext::prepareToRenderSVGContent(RenderObject* object, PaintI
if (opacity < 1 || hasBlendMode || style->hasIsolation()) {
FloatRect repaintRect = m_object->repaintRectInLocalCoordinates();
m_paintInfo->context->clip(repaintRect);
+
if (hasBlendMode) {
if (!(m_renderingFlags & RestoreGraphicsContext)) {
m_paintInfo->context->save();
@@ -126,7 +127,12 @@ void SVGRenderingContext::prepareToRenderSVGContent(RenderObject* object, PaintI
}
m_paintInfo->context->setCompositeOperation(CompositeSourceOver, style->blendMode());
}
+
m_paintInfo->context->beginTransparencyLayer(opacity);
+
+ if (hasBlendMode)
+ m_paintInfo->context->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal);
+
m_renderingFlags |= EndOpacityLayer;
}
« no previous file with comments | « LayoutTests/css3/compositing/svg-blend-overlapping-elements-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698