OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> | 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> |
10 * Copyright (C) 2011 University of Szeged | 10 * Copyright (C) 2011 University of Szeged |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) | 318 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) |
319 return false; | 319 return false; |
320 | 320 |
321 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_PATH_HITTESTING, r
equest, style()->pointerEvents()); | 321 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_PATH_HITTESTING, r
equest, style()->pointerEvents()); |
322 bool isVisible = (style()->visibility() == VISIBLE); | 322 bool isVisible = (style()->visibility() == VISIBLE); |
323 if (isVisible || !hitRules.requireVisible) { | 323 if (isVisible || !hitRules.requireVisible) { |
324 const SVGRenderStyle* svgStyle = style()->svgStyle(); | 324 const SVGRenderStyle* svgStyle = style()->svgStyle(); |
325 WindRule fillRule = svgStyle->fillRule(); | 325 WindRule fillRule = svgStyle->fillRule(); |
326 if (request.svgClipContent()) | 326 if (request.svgClipContent()) |
327 fillRule = svgStyle->clipRule(); | 327 fillRule = svgStyle->clipRule(); |
328 if ((hitRules.canHitStroke && (svgStyle->hasStroke() || !hitRules.requir
eStroke) && strokeContains(localPoint, hitRules.requireStroke)) | 328 if ((hitRules.canHitBoundingBox && objectBoundingBox().contains(localPoi
nt)) |
| 329 || (hitRules.canHitStroke && (svgStyle->hasStroke() || !hitRules.req
uireStroke) && strokeContains(localPoint, hitRules.requireStroke)) |
329 || (hitRules.canHitFill && (svgStyle->hasFill() || !hitRules.require
Fill) && fillContains(localPoint, hitRules.requireFill, fillRule))) { | 330 || (hitRules.canHitFill && (svgStyle->hasFill() || !hitRules.require
Fill) && fillContains(localPoint, hitRules.requireFill, fillRule))) { |
330 updateHitTestResult(result, roundedLayoutPoint(localPoint)); | 331 updateHitTestResult(result, roundedLayoutPoint(localPoint)); |
331 return true; | 332 return true; |
332 } | 333 } |
333 } | 334 } |
334 return false; | 335 return false; |
335 } | 336 } |
336 | 337 |
337 static inline RenderSVGResourceMarker* markerForType(SVGMarkerType type, RenderS
VGResourceMarker* markerStart, RenderSVGResourceMarker* markerMid, RenderSVGReso
urceMarker* markerEnd) | 338 static inline RenderSVGResourceMarker* markerForType(SVGMarkerType type, RenderS
VGResourceMarker* markerStart, RenderSVGResourceMarker* markerMid, RenderSVGReso
urceMarker* markerEnd) |
338 { | 339 { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 return; | 454 return; |
454 | 455 |
455 ASSERT(m_path); | 456 ASSERT(m_path); |
456 | 457 |
457 SVGMarkerData markerData(m_markerPositions); | 458 SVGMarkerData markerData(m_markerPositions); |
458 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); | 459 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); |
459 markerData.pathIsDone(); | 460 markerData.pathIsDone(); |
460 } | 461 } |
461 | 462 |
462 } | 463 } |
OLD | NEW |