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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h

Issue 89283002: Merge two determineFilterPrimitiveSubregion implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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) 2010 University of Szeged 2 * Copyright (C) 2010 University of Szeged
3 * Copyright (C) 2010 Zoltan Herczeg 3 * Copyright (C) 2010 Zoltan Herczeg
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef RenderSVGResourceFilterPrimitive_h 27 #ifndef RenderSVGResourceFilterPrimitive_h
28 #define RenderSVGResourceFilterPrimitive_h 28 #define RenderSVGResourceFilterPrimitive_h
29 29
30 #include "core/rendering/svg/RenderSVGResourceFilter.h" 30 #include "core/rendering/svg/RenderSVGResourceFilter.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class FilterEffect; 34 class FilterEffect;
Stephen White 2013/11/26 22:11:14 I think this could be removed now.
rwlbuis 2013/11/26 22:28:36 Correct, fixed.
35 35
36 class RenderSVGResourceFilterPrimitive FINAL : public RenderSVGHiddenContainer { 36 class RenderSVGResourceFilterPrimitive FINAL : public RenderSVGHiddenContainer {
37 public: 37 public:
38 explicit RenderSVGResourceFilterPrimitive(SVGElement* filterPrimitiveElement ) 38 explicit RenderSVGResourceFilterPrimitive(SVGElement* filterPrimitiveElement )
39 : RenderSVGHiddenContainer(filterPrimitiveElement) 39 : RenderSVGHiddenContainer(filterPrimitiveElement)
40 { 40 {
41 } 41 }
42 42
43 virtual void styleDidChange(StyleDifference, const RenderStyle*); 43 virtual void styleDidChange(StyleDifference, const RenderStyle*);
44 44
45 virtual const char* renderName() const { return "RenderSVGResourceFilterPrim itive"; } 45 virtual const char* renderName() const { return "RenderSVGResourceFilterPrim itive"; }
46 virtual bool isSVGResourceFilterPrimitive() const { return true; } 46 virtual bool isSVGResourceFilterPrimitive() const { return true; }
47 47
48 // They depend on the RenderObject argument of RenderSVGResourceFilter::appl yResource.
49 static FloatRect determineFilterPrimitiveSubregion(FilterEffect*);
50
51 inline void primitiveAttributeChanged(const QualifiedName& attribute) 48 inline void primitiveAttributeChanged(const QualifiedName& attribute)
52 { 49 {
53 RenderObject* filter = parent(); 50 RenderObject* filter = parent();
54 if (!filter || !filter->isSVGResourceFilter()) 51 if (!filter || !filter->isSVGResourceFilter())
55 return; 52 return;
56 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, attri bute); 53 toRenderSVGResourceFilter(filter)->primitiveAttributeChanged(this, attri bute);
57 } 54 }
58 }; 55 };
59 56
60 } // namespace WebCore 57 } // namespace WebCore
61 58
62 #endif // RenderSVGResourceFilterPrimitive_h 59 #endif // RenderSVGResourceFilterPrimitive_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698