Chromium Code Reviews| Index: Source/core/layout/LayoutBlock.cpp |
| diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp |
| index 00fd49ac48a81fc9340041380d47c71dad147a54..387682afdb40a6c23843b55d8fdbedb3eefc92af 100644 |
| --- a/Source/core/layout/LayoutBlock.cpp |
| +++ b/Source/core/layout/LayoutBlock.cpp |
| @@ -59,6 +59,7 @@ |
| #include "core/layout/line/InlineIterator.h" |
| #include "core/layout/line/InlineTextBox.h" |
| #include "core/layout/shapes/ShapeOutsideInfo.h" |
| +#include "core/layout/svg/LayoutSVGResourceClipper.h" |
| #include "core/page/Page.h" |
| #include "core/paint/BlockPainter.h" |
| #include "core/paint/BoxPainter.h" |
| @@ -1690,7 +1691,13 @@ bool LayoutBlock::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca |
| break; |
| } |
| case ClipPathOperation::REFERENCE: |
| - // FIXME: handle REFERENCE |
| + ReferenceClipPathOperation* referenceClipPathOperation = toReferenceClipPathOperation(style()->clipPath()); |
| + Element* element = document().getElementById(referenceClipPathOperation->fragment()); |
| + if (element && isSVGClipPathElement(element) && element->layoutObject()) { |
|
fs
2015/08/19 22:04:57
Nit: The pointer-version of is...Element checks fo
Yufeng Shen (Slow to review)
2015/08/20 20:17:21
Done.
|
| + LayoutSVGResourceClipper* clipper = toLayoutSVGResourceClipper(toLayoutSVGResourceContainer(element->layoutObject())); |
| + if (!clipper->hitTestClipContent(borderBoxRect(), FloatPoint(locationInContainer.point() - localOffset))) |
| + return false; |
| + } |
| break; |
| } |
| } |