OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) 2013 Google Inc. All rights reserved. | 6 * Copyright (C) 2013 Google Inc. 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 FloatRect FEImage::determineAbsolutePaintRect(const FloatRect& originalRequested
Rect) | 93 FloatRect FEImage::determineAbsolutePaintRect(const FloatRect& originalRequested
Rect) |
94 { | 94 { |
95 LayoutObject* layoutObject = referencedLayoutObject(); | 95 LayoutObject* layoutObject = referencedLayoutObject(); |
96 if (!m_image && !layoutObject) | 96 if (!m_image && !layoutObject) |
97 return FloatRect(); | 97 return FloatRect(); |
98 | 98 |
99 FloatRect requestedRect = originalRequestedRect; | 99 FloatRect requestedRect = originalRequestedRect; |
100 if (clipsToBounds()) | 100 if (clipsToBounds()) |
101 requestedRect.intersect(maxEffectRect()); | 101 requestedRect.intersect(absoluteBounds()); |
102 | 102 |
103 FloatRect destRect = getFilter()->mapLocalRectToAbsoluteRect(filterPrimitive
Subregion()); | 103 FloatRect destRect = getFilter()->mapLocalRectToAbsoluteRect(filterPrimitive
Subregion()); |
104 FloatRect srcRect; | 104 FloatRect srcRect; |
105 if (layoutObject) { | 105 if (layoutObject) { |
106 srcRect = getLayoutObjectRepaintRect(layoutObject); | 106 srcRect = getLayoutObjectRepaintRect(layoutObject); |
107 SVGElement* contextNode = toSVGElement(layoutObject->node()); | 107 SVGElement* contextNode = toSVGElement(layoutObject->node()); |
108 | 108 |
109 if (contextNode->hasRelativeLengths()) { | 109 if (contextNode->hasRelativeLengths()) { |
110 // FIXME: This fixes relative lengths but breaks non-relative ones (
see crbug/260709). | 110 // FIXME: This fixes relative lengths but breaks non-relative ones (
see crbug/260709). |
111 SVGLengthContext lengthContext(contextNode); | 111 SVGLengthContext lengthContext(contextNode); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 FloatRect srcRect = FloatRect(FloatPoint(), FloatSize(m_image->size())); | 198 FloatRect srcRect = FloatRect(FloatPoint(), FloatSize(m_image->size())); |
199 FloatRect dstRect = filterPrimitiveSubregion(); | 199 FloatRect dstRect = filterPrimitiveSubregion(); |
200 | 200 |
201 m_preserveAspectRatio->transformRect(dstRect, srcRect); | 201 m_preserveAspectRatio->transformRect(dstRect, srcRect); |
202 | 202 |
203 return SkImageSource::Make(std::move(image), srcRect, dstRect, kHigh_SkFilte
rQuality); | 203 return SkImageSource::Make(std::move(image), srcRect, dstRect, kHigh_SkFilte
rQuality); |
204 } | 204 } |
205 | 205 |
206 } // namespace blink | 206 } // namespace blink |
OLD | NEW |