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 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
415 { | 415 { |
416 SVGRenderSupport::computeContainerBoundingBoxes(this, m_objectBoundingBox, m _objectBoundingBoxValid, m_strokeBoundingBox, m_repaintBoundingBox); | 416 SVGRenderSupport::computeContainerBoundingBoxes(this, m_objectBoundingBox, m _objectBoundingBoxValid, m_strokeBoundingBox, m_repaintBoundingBox); |
417 SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingB ox); | 417 SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingB ox); |
418 } | 418 } |
419 | 419 |
420 bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& re sult, const HitTestLocation& locationInContainer, const LayoutPoint& accumulated Offset, HitTestAction hitTestAction) | 420 bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& re sult, const HitTestLocation& locationInContainer, const LayoutPoint& accumulated Offset, HitTestAction hitTestAction) |
421 { | 421 { |
422 LayoutPoint pointInParent = locationInContainer.point() - toLayoutSize(accum ulatedOffset); | 422 LayoutPoint pointInParent = locationInContainer.point() - toLayoutSize(accum ulatedOffset); |
423 LayoutPoint pointInBorderBox = pointInParent - toLayoutSize(location()); | 423 LayoutPoint pointInBorderBox = pointInParent - toLayoutSize(location()); |
424 | 424 |
425 // Only test SVG content if the point is in our content box. | 425 // Only test SVG content if the point is in our content box. |
pdr.
2014/08/07 22:51:47
Can you update this comment too?
| |
426 // FIXME: This should be an intersection when rect-based hit tests are suppo rted by nodeAtFloatPoint. | 426 // FIXME: This should be an intersection when rect-based hit tests are suppo rted by nodeAtFloatPoint. |
427 if (contentBoxRect().contains(pointInBorderBox)) { | 427 if (contentBoxRect().contains(pointInBorderBox) || (!shouldApplyViewportClip () && visualOverflowRect().contains(pointInBorderBox))) { |
428 const AffineTransform& localToParentTransform = this->localToParentTrans form(); | 428 const AffineTransform& localToParentTransform = this->localToParentTrans form(); |
429 if (localToParentTransform.isInvertible()) { | 429 if (localToParentTransform.isInvertible()) { |
430 FloatPoint localPoint = localToParentTransform.inverse().mapPoint(Fl oatPoint(pointInParent)); | 430 FloatPoint localPoint = localToParentTransform.inverse().mapPoint(Fl oatPoint(pointInParent)); |
431 | 431 |
432 for (RenderObject* child = lastChild(); child; child = child->previo usSibling()) { | 432 for (RenderObject* child = lastChild(); child; child = child->previo usSibling()) { |
433 // FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet. | 433 // FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet. |
434 if (child->nodeAtFloatPoint(request, result, localPoint, hitTest Action)) { | 434 if (child->nodeAtFloatPoint(request, result, localPoint, hitTest Action)) { |
435 updateHitTestResult(result, pointInBorderBox); | 435 updateHitTestResult(result, pointInBorderBox); |
436 if (!result.addNodeToRectBasedTestResult(child->node(), requ est, locationInContainer)) | 436 if (!result.addNodeToRectBasedTestResult(child->node(), requ est, locationInContainer)) |
437 return true; | 437 return true; |
(...skipping 13 matching lines...) Expand all Loading... | |
451 updateHitTestResult(result, pointInBorderBox); | 451 updateHitTestResult(result, pointInBorderBox); |
452 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect)) | 452 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect)) |
453 return true; | 453 return true; |
454 } | 454 } |
455 } | 455 } |
456 | 456 |
457 return false; | 457 return false; |
458 } | 458 } |
459 | 459 |
460 } | 460 } |
OLD | NEW |