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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 } | 331 } |
332 | 332 |
333 bool RenderSVGShape::nodeAtFloatPointInternal(const HitTestRequest& request, con
st FloatPoint& localPoint, PointerEventsHitRules hitRules) | 333 bool RenderSVGShape::nodeAtFloatPointInternal(const HitTestRequest& request, con
st FloatPoint& localPoint, PointerEventsHitRules hitRules) |
334 { | 334 { |
335 bool isVisible = (style()->visibility() == VISIBLE); | 335 bool isVisible = (style()->visibility() == VISIBLE); |
336 if (isVisible || !hitRules.requireVisible) { | 336 if (isVisible || !hitRules.requireVisible) { |
337 const SVGRenderStyle* svgStyle = style()->svgStyle(); | 337 const SVGRenderStyle* svgStyle = style()->svgStyle(); |
338 WindRule fillRule = svgStyle->fillRule(); | 338 WindRule fillRule = svgStyle->fillRule(); |
339 if (request.svgClipContent()) | 339 if (request.svgClipContent()) |
340 fillRule = svgStyle->clipRule(); | 340 fillRule = svgStyle->clipRule(); |
341 if ((hitRules.canHitStroke && (svgStyle->hasStroke() || !hitRules.requir
eStroke) && strokeContains(localPoint, hitRules.requireStroke)) | 341 if ((hitRules.canHitBoundingBox && objectBoundingBox().contains(localPoi
nt)) |
| 342 || (hitRules.canHitStroke && (svgStyle->hasStroke() || !hitRules.req
uireStroke) && strokeContains(localPoint, hitRules.requireStroke)) |
342 || (hitRules.canHitFill && (svgStyle->hasFill() || !hitRules.require
Fill) && fillContains(localPoint, hitRules.requireFill, fillRule))) | 343 || (hitRules.canHitFill && (svgStyle->hasFill() || !hitRules.require
Fill) && fillContains(localPoint, hitRules.requireFill, fillRule))) |
343 return true; | 344 return true; |
344 } | 345 } |
345 return false; | 346 return false; |
346 } | 347 } |
347 | 348 |
348 static inline RenderSVGResourceMarker* markerForType(SVGMarkerType type, RenderS
VGResourceMarker* markerStart, RenderSVGResourceMarker* markerMid, RenderSVGReso
urceMarker* markerEnd) | 349 static inline RenderSVGResourceMarker* markerForType(SVGMarkerType type, RenderS
VGResourceMarker* markerStart, RenderSVGResourceMarker* markerMid, RenderSVGReso
urceMarker* markerEnd) |
349 { | 350 { |
350 switch (type) { | 351 switch (type) { |
351 case StartMarker: | 352 case StartMarker: |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 return; | 467 return; |
467 | 468 |
468 ASSERT(m_path); | 469 ASSERT(m_path); |
469 | 470 |
470 SVGMarkerData markerData(m_markerPositions); | 471 SVGMarkerData markerData(m_markerPositions); |
471 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); | 472 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); |
472 markerData.pathIsDone(); | 473 markerData.pathIsDone(); |
473 } | 474 } |
474 | 475 |
475 } | 476 } |
OLD | NEW |