| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 SVGImagePainter(*this).paint(paintInfo); | 113 SVGImagePainter(*this).paint(paintInfo); |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool LayoutSVGImage::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p
ointInParent, HitTestAction hitTestAction) | 116 bool LayoutSVGImage::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p
ointInParent, HitTestAction hitTestAction) |
| 117 { | 117 { |
| 118 // We only draw in the forground phase, so we only hit-test then. | 118 // We only draw in the forground phase, so we only hit-test then. |
| 119 if (hitTestAction != HitTestForeground) | 119 if (hitTestAction != HitTestForeground) |
| 120 return false; | 120 return false; |
| 121 | 121 |
| 122 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING,
result.hitTestRequest(), style()->pointerEvents()); | 122 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING,
result.hitTestRequest(), style()->pointerEvents()); |
| 123 bool isVisible = (style()->visibility() == VISIBLE); | 123 bool isVisible = (style()->visibility() == EVisibility::Visible); |
| 124 if (isVisible || !hitRules.requireVisible) { | 124 if (isVisible || !hitRules.requireVisible) { |
| 125 FloatPoint localPoint; | 125 FloatPoint localPoint; |
| 126 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localT
oSVGParentTransform(), pointInParent, localPoint)) | 126 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localT
oSVGParentTransform(), pointInParent, localPoint)) |
| 127 return false; | 127 return false; |
| 128 | 128 |
| 129 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { | 129 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { |
| 130 if (m_objectBoundingBox.contains(localPoint)) { | 130 if (m_objectBoundingBox.contains(localPoint)) { |
| 131 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPo
int); | 131 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPo
int); |
| 132 updateHitTestResult(result, localLayoutPoint); | 132 updateHitTestResult(result, localLayoutPoint); |
| 133 if (result.addNodeToListBasedTestResult(element(), localLayoutPo
int) == StopHitTesting) | 133 if (result.addNodeToListBasedTestResult(element(), localLayoutPo
int) == StopHitTesting) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 149 setShouldDoFullPaintInvalidation(); | 149 setShouldDoFullPaintInvalidation(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin
t&, IncludeBlockVisualOverflowOrNot) const | 152 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin
t&, IncludeBlockVisualOverflowOrNot) const |
| 153 { | 153 { |
| 154 // this is called from paint() after the localTransform has already been app
lied | 154 // this is called from paint() after the localTransform has already been app
lied |
| 155 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); | 155 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |