Index: Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
index cd283387b922f4c72aeefbfbb40c5a1fdb51f6d5..e5b5d2ff93cefd70de19b03271d048770e7129f4 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
@@ -21,14 +21,12 @@ |
*/ |
#include "config.h" |
- |
#include "core/rendering/svg/RenderSVGResourceClipper.h" |
#include "core/SVGNames.h" |
#include "core/dom/ElementTraversal.h" |
-#include "core/frame/FrameView.h" |
-#include "core/frame/LocalFrame.h" |
#include "core/rendering/HitTestResult.h" |
+#include "core/rendering/PaintInfo.h" |
#include "core/rendering/svg/SVGRenderSupport.h" |
#include "core/rendering/svg/SVGRenderingContext.h" |
#include "core/rendering/svg/SVGResources.h" |
@@ -247,14 +245,6 @@ void RenderSVGResourceClipper::createDisplayList(GraphicsContext* context) |
FloatRect bounds = strokeBoundingBox(); |
context->beginRecording(bounds); |
- // Switch to a paint behavior where all children of this <clipPath> will be rendered using special constraints: |
- // - fill-opacity/stroke-opacity/opacity set to 1 |
- // - masker/filter not applied when rendering the children |
- // - fill is set to the initial fill paint server (solid, black) |
- // - stroke is set to the initial stroke paint server (none) |
- PaintBehavior oldBehavior = frame()->view()->paintBehavior(); |
- frame()->view()->setPaintBehavior(oldBehavior | PaintBehaviorRenderingClipPathAsMask); |
- |
for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement)) { |
RenderObject* renderer = childElement->renderer(); |
if (!renderer) |
@@ -284,11 +274,15 @@ void RenderSVGResourceClipper::createDisplayList(GraphicsContext* context) |
if (isUseElement) |
renderer = childElement->renderer(); |
- SVGRenderingContext::renderSubtree(context, renderer); |
+ // Switch to a paint behavior where all children of this <clipPath> will be rendered using special constraints: |
+ // - fill-opacity/stroke-opacity/opacity set to 1 |
+ // - masker/filter not applied when rendering the children |
+ // - fill is set to the initial fill paint server (solid, black) |
+ // - stroke is set to the initial stroke paint server (none) |
+ PaintInfo info(context, PaintInfo::infiniteRect(), PaintPhaseForeground, PaintBehaviorRenderingClipPathAsMask); |
+ renderer->paint(info, IntPoint()); |
} |
- frame()->view()->setPaintBehavior(oldBehavior); |
- |
m_clipContentDisplayList = context->endRecording(); |
} |