| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| index 652637c5705bbe9e55567e01c366cc75648a5402..ff517752a44baf35333295252c5b06a374030999 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -1650,7 +1650,7 @@ PaintLayer* PaintLayer::hitTestLayer(PaintLayer* rootLayer, PaintLayer* containe
|
| ASSERT(layoutObject()->document().lifecycle().state() >= DocumentLifecycle::CompositingClean);
|
|
|
| if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant())
|
| - return 0;
|
| + return nullptr;
|
|
|
| ClipRectsCacheSlot clipRectsCacheSlot = result.hitTestRequest().ignoreClipping() ? RootRelativeClipRectsIgnoringViewportClip : RootRelativeClipRects;
|
|
|
| @@ -1664,12 +1664,20 @@ PaintLayer* PaintLayer::hitTestLayer(PaintLayer* rootLayer, PaintLayer* containe
|
| ClipRect clipRect = clipper().backgroundClipRect(ClipRectsContext(rootLayer, clipRectsCacheSlot, IncludeOverlayScrollbarSize));
|
| // Go ahead and test the enclosing clip now.
|
| if (!clipRect.intersects(hitTestLocation))
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| return hitTestLayerByApplyingTransform(rootLayer, containerLayer, result, hitTestRect, hitTestLocation, transformState, zOffset);
|
| }
|
|
|
| + if (layoutObject()->hasClipPath()) {
|
| + ASSERT(layoutObject()->isBox() && isSelfPaintingLayer());
|
| + LayoutPoint offsetToRootLayer;
|
| + convertToLayerCoords(rootLayer, offsetToRootLayer);
|
| + if (toLayoutBox(layoutObject())->hitTestClippedOutByClipPath(hitTestLocation.point(), offsetToRootLayer))
|
| + return nullptr;
|
| + }
|
| +
|
| // Ensure our lists and 3d status are up-to-date.
|
| m_stackingNode->updateLayerListsIfNeeded();
|
| update3DTransformedDescendantStatus();
|
| @@ -1690,7 +1698,7 @@ PaintLayer* PaintLayer::hitTestLayer(PaintLayer* rootLayer, PaintLayer* containe
|
| TransformationMatrix invertedMatrix = localTransformState->m_accumulatedTransform.inverse();
|
| // If the z-vector of the matrix is negative, the back is facing towards the viewer.
|
| if (invertedMatrix.m33() < 0)
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| RefPtr<HitTestingTransformState> unflattenedTransformState = localTransformState;
|
| @@ -1801,7 +1809,7 @@ PaintLayer* PaintLayer::hitTestLayer(PaintLayer* rootLayer, PaintLayer* containe
|
| result.append(tempResult);
|
| }
|
|
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| bool PaintLayer::hitTestContentsForFragments(const PaintLayerFragments& layerFragments, HitTestResult& result,
|
|
|