OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 && r1.y() < r2.maxY() && r2.y() < r1.maxY(); | 333 && r1.y() < r2.maxY() && r2.y() < r1.maxY(); |
334 } | 334 } |
335 | 335 |
336 // One of the element types that can cause graphics to be drawn onto the target
canvas. | 336 // One of the element types that can cause graphics to be drawn onto the target
canvas. |
337 // Specifically: circle, ellipse, image, line, path, polygon, polyline, rect, te
xt and use. | 337 // Specifically: circle, ellipse, image, line, path, polygon, polyline, rect, te
xt and use. |
338 static bool isIntersectionOrEnclosureTarget(RenderObject* renderer) | 338 static bool isIntersectionOrEnclosureTarget(RenderObject* renderer) |
339 { | 339 { |
340 return renderer->isSVGShape() | 340 return renderer->isSVGShape() |
341 || renderer->isSVGText() | 341 || renderer->isSVGText() |
342 || renderer->isSVGImage() | 342 || renderer->isSVGImage() |
343 || renderer->node()->hasTagName(SVGNames::useTag); | 343 || isSVGUseElement(*renderer->node()); |
344 } | 344 } |
345 | 345 |
346 bool SVGSVGElement::checkIntersectionOrEnclosure(const SVGElement& element, cons
t FloatRect& rect, | 346 bool SVGSVGElement::checkIntersectionOrEnclosure(const SVGElement& element, cons
t FloatRect& rect, |
347 CheckIntersectionOrEnclosure mode) const | 347 CheckIntersectionOrEnclosure mode) const |
348 { | 348 { |
349 RenderObject* renderer = element.renderer(); | 349 RenderObject* renderer = element.renderer(); |
350 ASSERT(!renderer || renderer->style()); | 350 ASSERT(!renderer || renderer->style()); |
351 if (!renderer || renderer->style()->pointerEvents() == PE_NONE) | 351 if (!renderer || renderer->style()->pointerEvents() == PE_NONE) |
352 return false; | 352 return false; |
353 | 353 |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 Vector<Element*>::const_iterator end = elements.end(); | 832 Vector<Element*>::const_iterator end = elements.end(); |
833 for (Vector<Element*>::const_iterator it = elements.begin(); it != end; ++it
) { | 833 for (Vector<Element*>::const_iterator it = elements.begin(); it != end; ++it
) { |
834 if ((*it)->isDescendantOf(this)) | 834 if ((*it)->isDescendantOf(this)) |
835 return *it; | 835 return *it; |
836 } | 836 } |
837 | 837 |
838 return 0; | 838 return 0; |
839 } | 839 } |
840 | 840 |
841 } | 841 } |
OLD | NEW |