LEFT | RIGHT |
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 computeFloatVisibleRectInContainer() which w
ill | 66 // Pass our local paint rect to computeFloatVisibleRectInContainer() which w
ill |
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::computeFloatVisibleRectInContainer(const RenderEleme
nt& renderer, const FloatRect& rect, const RenderLayerModelObject* container, Re
nderObject::VisibleRectContext context) | 75 std::optional<FloatRect> SVGRenderSupport::computeFloatVisibleRectInContainer(co
nst RenderElement& renderer, const FloatRect& rect, const RenderLayerModelObject
* container, RenderObject::VisibleRectContext context) |
76 { | 76 { |
77 FloatRect adjustedRect = rect; | 77 FloatRect adjustedRect = rect; |
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 | 82 |
83 // Translate to coords in our parent renderer, and then call computeFloatVis
ibleRectInContainer() on our parent. | 83 // Translate to coords in our parent renderer, and then call computeFloatVis
ibleRectInContainer() on our parent. |
84 adjustedRect = renderer.localToParentTransform().mapRect(adjustedRect); | 84 adjustedRect = renderer.localToParentTransform().mapRect(adjustedRect); |
85 return renderer.parent()->computeFloatVisibleRectInContainer(adjustedRect, c
ontainer, context); | 85 return renderer.parent()->computeFloatVisibleRectInContainer(adjustedRect, c
ontainer, context); |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 continue; | 562 continue; |
563 | 563 |
564 if (ancestor->computedStyle()->svgStyle().hasMasker()) | 564 if (ancestor->computedStyle()->svgStyle().hasMasker()) |
565 downcast<SVGGraphicsElement>(*ancestor).setShouldIsolateBlending(mas
kedAncestorShouldIsolateBlending); | 565 downcast<SVGGraphicsElement>(*ancestor).setShouldIsolateBlending(mas
kedAncestorShouldIsolateBlending); |
566 | 566 |
567 return; | 567 return; |
568 } | 568 } |
569 } | 569 } |
570 #endif | 570 #endif |
571 } | 571 } |
LEFT | RIGHT |