summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderLayer.cpp')
-rw-r--r--Source/WebCore/rendering/RenderLayer.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index 4daeecf93..a49544df1 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -3116,12 +3116,10 @@ void RenderLayer::paintLayerContents(RenderLayer* rootLayer, GraphicsContext* co
// Apply clip-path to context.
RenderStyle* style = renderer()->style();
if (renderer()->hasClipPath() && !context->paintingDisabled() && style) {
- if (BasicShape* clipShape = style->clipPath()) {
- // FIXME: Investigate if it is better to store and update a Path object in RenderStyle.
- // https://bugs.webkit.org/show_bug.cgi?id=95619
- Path clipPath;
- clipShape->path(clipPath, calculateLayerBounds(this, rootLayer, 0));
- transparencyLayerContext->clipPath(clipPath, clipShape->windRule());
+ ASSERT(style->clipPath());
+ if (style->clipPath()->getOperationType() == ClipPathOperation::SHAPE) {
+ ShapeClipPathOperation* clipPath = static_cast<ShapeClipPathOperation*>(style->clipPath());
+ transparencyLayerContext->clipPath(clipPath->path(calculateLayerBounds(this, rootLayer, 0)), clipPath->windRule());
}
}
@@ -3461,7 +3459,7 @@ bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation&
// We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
// return ourselves. We do this so mouse events continue getting delivered after a drag has
// exited the WebView, and so hit testing over a scrollbar hits the content document.
- if (!request.isChildFrameHitTest() && (request.active() || request.release()) && isRootLayer()) {
+ if ((request.active() || request.release()) && isRootLayer()) {
renderer()->updateHitTestResult(result, toRenderView(renderer())->flipForWritingMode(result.point()));
insideLayer = this;
}