| 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 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> |
| 4 2007 Eric Seidel <eric@webkit.org> | 4 2007 Eric Seidel <eric@webkit.org> |
| 5 | 5 |
| 6 This file is part of the KDE project | 6 This file is part of the KDE project |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 && style()->overflowX() == OHIDDEN | 305 && style()->overflowX() == OHIDDEN |
| 306 && style()->overflowY() == OHIDDEN) { | 306 && style()->overflowY() == OHIDDEN) { |
| 307 int tx = x() - _tx + sx; | 307 int tx = x() - _tx + sx; |
| 308 int ty = y() - _ty + sy; | 308 int ty = y() - _ty + sy; |
| 309 | 309 |
| 310 // Check if we need to do anything at all. | 310 // Check if we need to do anything at all. |
| 311 IntRect overflowBox = overflowRect(false); | 311 IntRect overflowBox = overflowRect(false); |
| 312 overflowBox.move(tx, ty); | 312 overflowBox.move(tx, ty); |
| 313 ctm.translate(viewport().x(), viewport().y()); | 313 ctm.translate(viewport().x(), viewport().y()); |
| 314 double localX, localY; | 314 double localX, localY; |
| 315 ctm.inverse().map(_x - _tx, _y - _ty, &localX, &localY); | 315 ctm.inverse().map(_x - _tx, _y - _ty, localX, localY); |
| 316 if (!overflowBox.contains((int)localX, (int)localY)) | 316 if (!overflowBox.contains((int)localX, (int)localY)) |
| 317 return false; | 317 return false; |
| 318 } | 318 } |
| 319 | 319 |
| 320 for (RenderObject* child = lastChild(); child; child = child->previousSiblin
g()) { | 320 for (RenderObject* child = lastChild(); child; child = child->previousSiblin
g()) { |
| 321 if (child->nodeAtPoint(request, result, _x - sx, _y - sy, 0, 0, hitTestA
ction)) { | 321 if (child->nodeAtPoint(request, result, _x - sx, _y - sy, 0, 0, hitTestA
ction)) { |
| 322 updateHitTestResult(result, IntPoint(_x - _tx, _y - _ty)); | 322 updateHitTestResult(result, IntPoint(_x - _tx, _y - _ty)); |
| 323 return true; | 323 return true; |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 // Spec: Only graphical elements can be targeted by the mouse, period. | 327 // Spec: Only graphical elements can be targeted by the mouse, period. |
| 328 // 16.4: "If there are no graphics elements whose relevant graphics content
is under the pointer (i.e., there is no target element), the event is not dispat
ched." | 328 // 16.4: "If there are no graphics elements whose relevant graphics content
is under the pointer (i.e., there is no target element), the event is not dispat
ched." |
| 329 return false; | 329 return false; |
| 330 } | 330 } |
| 331 | 331 |
| 332 void RenderSVGRoot::position(InlineBox* box) | 332 void RenderSVGRoot::position(InlineBox* box) |
| 333 { | 333 { |
| 334 RenderBox::position(box); | 334 RenderBox::position(box); |
| 335 if (m_absoluteBounds.isEmpty()) | 335 if (m_absoluteBounds.isEmpty()) |
| 336 setNeedsLayout(true, false); | 336 setNeedsLayout(true, false); |
| 337 } | 337 } |
| 338 | 338 |
| 339 } | 339 } |
| 340 | 340 |
| 341 #endif // ENABLE(SVG) | 341 #endif // ENABLE(SVG) |
| 342 | 342 |
| 343 // vim:ts=4:noet | 343 // vim:ts=4:noet |
| OLD | NEW |