| 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 Rob Buis <buis@kde.org> | 5 Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
| 6 | 6 |
| 7 This file is part of the WebKit project | 7 This file is part of the WebKit project |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 { | 191 { |
| 192 // We only draw in the forground phase, so we only hit-test then. | 192 // We only draw in the forground phase, so we only hit-test then. |
| 193 if (hitTestAction != HitTestForeground) | 193 if (hitTestAction != HitTestForeground) |
| 194 return false; | 194 return false; |
| 195 | 195 |
| 196 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING,
style()->pointerEvents()); | 196 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING,
style()->pointerEvents()); |
| 197 | 197 |
| 198 bool isVisible = (style()->visibility() == VISIBLE); | 198 bool isVisible = (style()->visibility() == VISIBLE); |
| 199 if (isVisible || !hitRules.requireVisible) { | 199 if (isVisible || !hitRules.requireVisible) { |
| 200 double localX, localY; | 200 double localX, localY; |
| 201 absoluteTransform().inverse().map(_x, _y, &localX, &localY); | 201 absoluteTransform().inverse().map(_x, _y, localX, localY); |
| 202 | 202 |
| 203 if (hitRules.canHitFill) { | 203 if (hitRules.canHitFill) { |
| 204 if (m_localBounds.contains(narrowPrecisionToFloat(localX), narrowPre
cisionToFloat(localY))) { | 204 if (m_localBounds.contains(narrowPrecisionToFloat(localX), narrowPre
cisionToFloat(localY))) { |
| 205 updateHitTestResult(result, IntPoint(_x, _y)); | 205 updateHitTestResult(result, IntPoint(_x, _y)); |
| 206 return true; | 206 return true; |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 | 210 |
| 211 return false; | 211 return false; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } | 261 } |
| 262 | 262 |
| 263 void RenderSVGImage::absoluteQuads(Vector<FloatQuad>& quads, bool) | 263 void RenderSVGImage::absoluteQuads(Vector<FloatQuad>& quads, bool) |
| 264 { | 264 { |
| 265 quads.append(FloatRect(absoluteClippedOverflowRect())); | 265 quads.append(FloatRect(absoluteClippedOverflowRect())); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } | 268 } |
| 269 | 269 |
| 270 #endif // ENABLE(SVG) | 270 #endif // ENABLE(SVG) |
| OLD | NEW |