Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp

Issue 2319293004: Replace FilterEffect::maxEffectRect() with absoluteBounds() (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return transform; 90 return transform;
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())
pdr. 2016/09/08 20:46:12 Do you know what these clipsToBounds calls are doi
fs 2016/09/08 21:08:11 The reason that they have no effect is because the
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698