OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@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. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
8 * Copyright (C) 2018 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2018 Adobe Systems Incorporated. All rights reserved. |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 // Pass our local paint rect to computeRectForRepaint() which will | 66 // Pass our local paint rect to computeRectForRepaint() which will |
67 // map to parent coords and recurse up the parent chain. | 67 // map to parent coords and recurse up the parent chain. |
68 FloatRect repaintRect = repaintRectForRendererInLocalCoordinatesExcludingSVG
Shadow(renderer); | 68 FloatRect repaintRect = repaintRectForRendererInLocalCoordinatesExcludingSVG
Shadow(renderer); |
69 const SVGRenderStyle& svgStyle = renderer.style().svgStyle(); | 69 const SVGRenderStyle& svgStyle = renderer.style().svgStyle(); |
70 if (const ShadowData* shadow = svgStyle.shadow()) | 70 if (const ShadowData* shadow = svgStyle.shadow()) |
71 shadow->adjustRectForShadow(repaintRect); | 71 shadow->adjustRectForShadow(repaintRect); |
72 return enclosingLayoutRect(renderer.computeFloatRectForRepaint(repaintRect,
repaintContainer)); | 72 return enclosingLayoutRect(renderer.computeFloatRectForRepaint(repaintRect,
repaintContainer)); |
73 } | 73 } |
74 | 74 |
75 FloatRect SVGRenderSupport::computeFloatRectForRepaint(const RenderElement& rend
erer, const FloatRect& repaintRect, const RenderLayerModelObject* repaintContain
er, bool fixed) | 75 FloatRect SVGRenderSupport::computeFloatRectForRepaint(const RenderElement& rend
erer, const FloatRect& repaintRect, const RenderLayerModelObject* repaintContain
er, bool fixed, bool useEdgeInclusiveIntersection, bool* intersects) |
76 { | 76 { |
77 FloatRect adjustedRect = repaintRect; | 77 FloatRect adjustedRect = repaintRect; |
78 const SVGRenderStyle& svgStyle = renderer.style().svgStyle(); | 78 const SVGRenderStyle& svgStyle = renderer.style().svgStyle(); |
79 if (const ShadowData* shadow = svgStyle.shadow()) | 79 if (const ShadowData* shadow = svgStyle.shadow()) |
80 shadow->adjustRectForShadow(adjustedRect); | 80 shadow->adjustRectForShadow(adjustedRect); |
81 adjustedRect.inflate(renderer.style().outlineWidth()); | 81 adjustedRect.inflate(renderer.style().outlineWidth()); |
| 82 if (intersects) |
| 83 *intersects |= !adjustedRect.isEmpty(); |
82 | 84 |
83 // Translate to coords in our parent renderer, and then call computeFloatRec
tForRepaint() on our parent. | 85 // Translate to coords in our parent renderer, and then call computeFloatRec
tForRepaint() on our parent. |
84 adjustedRect = renderer.localToParentTransform().mapRect(adjustedRect); | 86 adjustedRect = renderer.localToParentTransform().mapRect(adjustedRect); |
85 return renderer.parent()->computeFloatRectForRepaint(adjustedRect, repaintCo
ntainer, fixed); | 87 return renderer.parent()->computeFloatRectForRepaint(adjustedRect, repaintCo
ntainer, fixed, useEdgeInclusiveIntersection, intersects); |
86 } | 88 } |
87 | 89 |
88 const RenderElement& SVGRenderSupport::localToParentTransform(const RenderElemen
t& renderer, AffineTransform &transform) | 90 const RenderElement& SVGRenderSupport::localToParentTransform(const RenderElemen
t& renderer, AffineTransform &transform) |
89 { | 91 { |
90 ASSERT(renderer.parent()); | 92 ASSERT(renderer.parent()); |
91 auto& parent = *renderer.parent(); | 93 auto& parent = *renderer.parent(); |
92 | 94 |
93 // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderB
oxTransform | 95 // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderB
oxTransform |
94 // to map an element from SVG viewport coordinates to CSS box coordinates. | 96 // to map an element from SVG viewport coordinates to CSS box coordinates. |
95 if (is<RenderSVGRoot>(parent)) | 97 if (is<RenderSVGRoot>(parent)) |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 continue; | 564 continue; |
563 | 565 |
564 if (ancestor->computedStyle()->svgStyle().hasMasker()) | 566 if (ancestor->computedStyle()->svgStyle().hasMasker()) |
565 downcast<SVGGraphicsElement>(*ancestor).setShouldIsolateBlending(mas
kedAncestorShouldIsolateBlending); | 567 downcast<SVGGraphicsElement>(*ancestor).setShouldIsolateBlending(mas
kedAncestorShouldIsolateBlending); |
566 | 568 |
567 return; | 569 return; |
568 } | 570 } |
569 } | 571 } |
570 #endif | 572 #endif |
571 } | 573 } |
OLD | NEW |