| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> |
| 6 * Copyright (C) 2009 Google, Inc. | 6 * Copyright (C) 2009 Google, Inc. |
| 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 bool RenderSVGImage::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu
lt& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) | 182 bool RenderSVGImage::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu
lt& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) |
| 183 { | 183 { |
| 184 // We only draw in the forground phase, so we only hit-test then. | 184 // We only draw in the forground phase, so we only hit-test then. |
| 185 if (hitTestAction != HitTestForeground) | 185 if (hitTestAction != HitTestForeground) |
| 186 return false; | 186 return false; |
| 187 | 187 |
| 188 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING,
request, style()->pointerEvents()); | 188 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING,
request, style()->pointerEvents()); |
| 189 bool isVisible = (style()->visibility() == VISIBLE); | 189 bool isVisible = (style()->visibility() == VISIBLE); |
| 190 if (isVisible || !hitRules.requireVisible) { | 190 if (isVisible || !hitRules.requireVisible) { |
| 191 FloatPoint localPoint = localToParentTransform().inverse().mapPoint(poin
tInParent); | 191 FloatPoint localPoint; |
| 192 | 192 if (!SVGRenderSupport::transformToUserSpaceAndCheckClipping(this, localT
oParentTransform(), pointInParent, localPoint)) |
| 193 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) | |
| 194 return false; | 193 return false; |
| 195 | 194 |
| 196 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { | 195 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { |
| 197 if (m_objectBoundingBox.contains(localPoint)) { | 196 if (m_objectBoundingBox.contains(localPoint)) { |
| 198 updateHitTestResult(result, roundedLayoutPoint(localPoint)); | 197 updateHitTestResult(result, roundedLayoutPoint(localPoint)); |
| 199 return true; | 198 return true; |
| 200 } | 199 } |
| 201 } | 200 } |
| 202 } | 201 } |
| 203 | 202 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 226 | 225 |
| 227 void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint
&, const RenderLayerModelObject*) | 226 void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint
&, const RenderLayerModelObject*) |
| 228 { | 227 { |
| 229 // this is called from paint() after the localTransform has already been app
lied | 228 // this is called from paint() after the localTransform has already been app
lied |
| 230 IntRect contentRect = enclosingIntRect(paintInvalidationRectInLocalCoordinat
es()); | 229 IntRect contentRect = enclosingIntRect(paintInvalidationRectInLocalCoordinat
es()); |
| 231 if (!contentRect.isEmpty()) | 230 if (!contentRect.isEmpty()) |
| 232 rects.append(contentRect); | 231 rects.append(contentRect); |
| 233 } | 232 } |
| 234 | 233 |
| 235 } // namespace blink | 234 } // namespace blink |
| OLD | NEW |