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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bool RenderSVGShape::shapeDependentFillContains(const FloatPoint& point, const W
indRule fillRule) const | 104 bool RenderSVGShape::shapeDependentFillContains(const FloatPoint& point, const W
indRule fillRule) const |
105 { | 105 { |
106 return path().contains(point, fillRule); | 106 return path().contains(point, fillRule); |
107 } | 107 } |
108 | 108 |
109 bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co
nst WindRule fillRule) | 109 bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co
nst WindRule fillRule) |
110 { | 110 { |
111 if (!m_fillBoundingBox.contains(point)) | 111 if (!m_fillBoundingBox.contains(point)) |
112 return false; | 112 return false; |
113 | 113 |
114 bool hasFallback; | 114 if (requiresFill && !SVGPaintServer::existsForRenderer(*this, style(), Apply
ToFillMode)) |
115 if (requiresFill && !RenderSVGResource::requestPaintingResource(ApplyToFillM
ode, *this, style(), hasFallback)) | |
116 return false; | 115 return false; |
117 | 116 |
118 return shapeDependentFillContains(point, fillRule); | 117 return shapeDependentFillContains(point, fillRule); |
119 } | 118 } |
120 | 119 |
121 bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke
) | 120 bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke
) |
122 { | 121 { |
123 if (!strokeBoundingBox().contains(point)) | 122 if (!strokeBoundingBox().contains(point)) |
124 return false; | 123 return false; |
125 | 124 |
126 bool hasFallback; | 125 if (requiresStroke && !SVGPaintServer::existsForRenderer(*this, style(), App
lyToStrokeMode)) |
127 if (requiresStroke && !RenderSVGResource::requestPaintingResource(ApplyToStr
okeMode, *this, style(), hasFallback)) | |
128 return false; | 126 return false; |
129 | 127 |
130 return shapeDependentStrokeContains(point); | 128 return shapeDependentStrokeContains(point); |
131 } | 129 } |
132 | 130 |
133 void RenderSVGShape::layout() | 131 void RenderSVGShape::layout() |
134 { | 132 { |
135 bool updateCachedBoundariesInParents = false; | 133 bool updateCachedBoundariesInParents = false; |
136 | 134 |
137 if (m_needsShapeUpdate || m_needsBoundariesUpdate) { | 135 if (m_needsShapeUpdate || m_needsBoundariesUpdate) { |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 ASSERT(resources); | 435 ASSERT(resources); |
438 | 436 |
439 RenderSVGResourceMarker* markerStart = resources->markerStart(); | 437 RenderSVGResourceMarker* markerStart = resources->markerStart(); |
440 | 438 |
441 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien
tType() == SVGMarkerOrientAutoStartReverse : false); | 439 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien
tType() == SVGMarkerOrientAutoStartReverse : false); |
442 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); | 440 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); |
443 markerData.pathIsDone(); | 441 markerData.pathIsDone(); |
444 } | 442 } |
445 | 443 |
446 } | 444 } |
OLD | NEW |