OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 2 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // FIXME: Eventually we should support isPointInStroke for display:none elem
ents. | 66 // FIXME: Eventually we should support isPointInStroke for display:none elem
ents. |
67 if (!layoutObject() || !layoutObject()->isSVGShape()) | 67 if (!layoutObject() || !layoutObject()->isSVGShape()) |
68 return false; | 68 return false; |
69 | 69 |
70 HitTestRequest request(HitTestRequest::ReadOnly); | 70 HitTestRequest request(HitTestRequest::ReadOnly); |
71 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTIN
G, request, layoutObject()->style()->pointerEvents()); | 71 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTIN
G, request, layoutObject()->style()->pointerEvents()); |
72 hitRules.canHitFill = false; | 72 hitRules.canHitFill = false; |
73 return toLayoutSVGShape(layoutObject())->nodeAtFloatPointInternal(request, p
oint->target()->value(), hitRules); | 73 return toLayoutSVGShape(layoutObject())->nodeAtFloatPointInternal(request, p
oint->target()->value(), hitRules); |
74 } | 74 } |
75 | 75 |
76 void SVGGeometryElement::toClipPath(Path& path) | 76 void SVGGeometryElement::toClipPath(Path& path) const |
77 { | 77 { |
78 path = asPath(); | 78 path = asPath(); |
79 path.transform(calculateAnimatedLocalTransform()); | 79 path.transform(calculateAnimatedLocalTransform()); |
80 | 80 |
81 ASSERT(layoutObject()); | 81 ASSERT(layoutObject()); |
82 ASSERT(layoutObject()->style()); | 82 ASSERT(layoutObject()->style()); |
83 path.setWindRule(layoutObject()->style()->svgStyle().clipRule()); | 83 path.setWindRule(layoutObject()->style()->svgStyle().clipRule()); |
84 } | 84 } |
85 | 85 |
86 LayoutObject* SVGGeometryElement::createLayoutObject(const ComputedStyle&) | 86 LayoutObject* SVGGeometryElement::createLayoutObject(const ComputedStyle&) |
87 { | 87 { |
88 // By default, any subclass is expected to do path-based drawing. | 88 // By default, any subclass is expected to do path-based drawing. |
89 return new LayoutSVGPath(this); | 89 return new LayoutSVGPath(this); |
90 } | 90 } |
91 | 91 |
92 } | 92 } |
OLD | NEW |