Changeset 195397 in webkit
- Timestamp:
- Jan 20, 2016 7:50:45 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r195394 r195397 1 2016-01-20 Zalan Bujtas <zalan@apple.com> 2 3 http://victordarras.fr/cssgame/ doesn't work in Safari. 4 https://bugs.webkit.org/show_bug.cgi?id=153285 5 <rdar://problem/24212369> 6 7 Reviewed by Tim Horton. 8 9 This patch adds support for hittesting ClipPathOperation::Reference. 10 11 * svg/clip-path/hittest-clip-path-reference-miss-expected.html: Added. 12 * svg/clip-path/hittest-clip-path-reference-miss.html: Added. 13 1 14 2016-01-20 Brady Eidson <beidson@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r195393 r195397 1 2016-01-20 Zalan Bujtas <zalan@apple.com> 2 3 http://victordarras.fr/cssgame/ doesn't work in Safari. 4 https://bugs.webkit.org/show_bug.cgi?id=153285 5 <rdar://problem/24212369> 6 7 Reviewed by Tim Horton. 8 9 This patch adds support for hittesting ClipPathOperation::Reference. 10 11 Tests: svg/clip-path/hittest-clip-path-reference-miss.html 12 13 * rendering/RenderBlock.cpp: 14 (WebCore::RenderBlock::nodeAtPoint): 15 * rendering/RenderObject.h: 16 (WebCore::RenderObject::isSVGResourceClipper): 17 * rendering/svg/RenderSVGResourceClipper.h: 18 (isType): 19 1 20 2016-01-20 David Kilzer <ddkilzer@apple.com> 2 21 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r194819 r195397 60 60 #include "RenderNamedFlowThread.h" 61 61 #include "RenderRegion.h" 62 #include "RenderSVGResourceClipper.h" 62 63 #include "RenderTableCell.h" 63 64 #include "RenderTextFragment.h" … … 2463 2464 break; 2464 2465 } 2465 // FIXME: handle Reference/Box 2466 case ClipPathOperation::Reference: 2466 case ClipPathOperation::Reference: { 2467 const auto& referenceClipPathOperation = downcast<ReferenceClipPathOperation>(*style().clipPath()); 2468 auto* element = document().getElementById(referenceClipPathOperation.fragment()); 2469 if (!element || !element->renderer()) 2470 break; 2471 if (!is<SVGClipPathElement>(*element)) 2472 break; 2473 auto& clipper = downcast<RenderSVGResourceClipper>(*element->renderer()); 2474 if (!clipper.hitTestClipContent(FloatRect(borderBoxRect()), FloatPoint(locationInContainer.point() - localOffset))) 2475 return false; 2476 break; 2477 } 2467 2478 case ClipPathOperation::Box: 2468 2479 break; -
trunk/Source/WebCore/rendering/RenderObject.h
r194638 r195397 420 420 virtual bool isSVGResourceContainer() const { return false; } 421 421 virtual bool isSVGResourceFilter() const { return false; } 422 virtual bool isSVGResourceClipper() const { return false; } 422 423 virtual bool isSVGResourceFilterPrimitive() const { return false; } 423 424 -
trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.h
r189144 r195397 64 64 65 65 virtual const char* renderName() const override { return "RenderSVGResourceClipper"; } 66 bool isSVGResourceClipper() const override { return true; } 66 67 67 68 bool pathOnlyClipping(GraphicsContext&, const AffineTransform&, const FloatRect&); … … 76 77 } 77 78 78 SPECIALIZE_TYPE_TRAITS_RENDER_SVG_RESOURCE(RenderSVGResourceClipper, ClipperResourceType) 79 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::RenderSVGResourceClipper) 80 static bool isType(const WebCore::RenderObject& renderer) { return renderer.isSVGResourceClipper(); } 81 static bool isType(const WebCore::RenderSVGResource& resource) { return resource.resourceType() == WebCore::ClipperResourceType; } 82 SPECIALIZE_TYPE_TRAITS_END() 79 83 80 84 #endif
Note: See TracChangeset
for help on using the changeset viewer.