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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 bool LayoutSVGImage::nodeAtFloatPoint(HitTestResult& result, | 158 bool LayoutSVGImage::nodeAtFloatPoint(HitTestResult& result, |
159 const FloatPoint& pointInParent, | 159 const FloatPoint& pointInParent, |
160 HitTestAction hitTestAction) { | 160 HitTestAction hitTestAction) { |
161 // We only draw in the forground phase, so we only hit-test then. | 161 // We only draw in the forground phase, so we only hit-test then. |
162 if (hitTestAction != HitTestForeground) | 162 if (hitTestAction != HitTestForeground) |
163 return false; | 163 return false; |
164 | 164 |
165 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, | 165 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, |
166 result.hitTestRequest(), | 166 result.hitTestRequest(), |
167 style()->pointerEvents()); | 167 style()->pointerEvents()); |
168 bool isVisible = (style()->visibility() == EVisibility::Visible); | 168 bool isVisible = (style()->visibility() == EVisibility::kVisible); |
169 if (isVisible || !hitRules.requireVisible) { | 169 if (isVisible || !hitRules.requireVisible) { |
170 FloatPoint localPoint; | 170 FloatPoint localPoint; |
171 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping( | 171 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping( |
172 *this, localToSVGParentTransform(), pointInParent, localPoint)) | 172 *this, localToSVGParentTransform(), pointInParent, localPoint)) |
173 return false; | 173 return false; |
174 | 174 |
175 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { | 175 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { |
176 if (m_objectBoundingBox.contains(localPoint)) { | 176 if (m_objectBoundingBox.contains(localPoint)) { |
177 const LayoutPoint& localLayoutPoint = LayoutPoint(localPoint); | 177 const LayoutPoint& localLayoutPoint = LayoutPoint(localPoint); |
178 updateHitTestResult(result, localLayoutPoint); | 178 updateHitTestResult(result, localLayoutPoint); |
(...skipping 24 matching lines...) Expand all Loading... |
203 | 203 |
204 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, | 204 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, |
205 const LayoutPoint&, | 205 const LayoutPoint&, |
206 IncludeBlockVisualOverflowOrNot) const { | 206 IncludeBlockVisualOverflowOrNot) const { |
207 // this is called from paint() after the localTransform has already been | 207 // this is called from paint() after the localTransform has already been |
208 // applied | 208 // applied |
209 rects.append(LayoutRect(visualRectInLocalSVGCoordinates())); | 209 rects.append(LayoutRect(visualRectInLocalSVGCoordinates())); |
210 } | 210 } |
211 | 211 |
212 } // namespace blink | 212 } // namespace blink |
OLD | NEW |