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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGFEImageElement.h

Issue 2485873004: [ImageResource 1b] Change SVGFEImageElement from ResourceClient to ImageResourceObserver (Closed)
Patch Set: Rebase Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 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 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef SVGFEImageElement_h 21 #ifndef SVGFEImageElement_h
22 #define SVGFEImageElement_h 22 #define SVGFEImageElement_h
23 23
24 #include "core/SVGNames.h" 24 #include "core/SVGNames.h"
25 #include "core/fetch/ImageResource.h" 25 #include "core/fetch/ImageResource.h"
26 #include "core/fetch/ImageResourceObserver.h"
26 #include "core/fetch/ResourceClient.h" 27 #include "core/fetch/ResourceClient.h"
yhirano 2016/11/29 08:26:31 Not needed?
hiroshige 2016/11/29 09:18:56 Done.
27 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" 28 #include "core/svg/SVGAnimatedPreserveAspectRatio.h"
28 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" 29 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h"
29 #include "core/svg/SVGURIReference.h" 30 #include "core/svg/SVGURIReference.h"
30 #include "platform/heap/Handle.h" 31 #include "platform/heap/Handle.h"
31 32
32 namespace blink { 33 namespace blink {
33 34
34 class SVGFEImageElement final : public SVGFilterPrimitiveStandardAttributes, 35 class SVGFEImageElement final : public SVGFilterPrimitiveStandardAttributes,
35 public SVGURIReference, 36 public SVGURIReference,
36 public ResourceClient { 37 public ImageResourceObserver {
37 DEFINE_WRAPPERTYPEINFO(); 38 DEFINE_WRAPPERTYPEINFO();
38 USING_GARBAGE_COLLECTED_MIXIN(SVGFEImageElement); 39 USING_GARBAGE_COLLECTED_MIXIN(SVGFEImageElement);
39 40
40 public: 41 public:
41 DECLARE_NODE_FACTORY(SVGFEImageElement); 42 DECLARE_NODE_FACTORY(SVGFEImageElement);
42 43
43 bool currentFrameHasSingleSecurityOrigin() const; 44 bool currentFrameHasSingleSecurityOrigin() const;
44 45
45 ~SVGFEImageElement() override; 46 ~SVGFEImageElement() override;
46 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { 47 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() {
47 return m_preserveAspectRatio.get(); 48 return m_preserveAspectRatio.get();
48 } 49 }
49 50
50 // Promptly remove as a ImageResource client. 51 // Promptly remove as a ImageResource client.
51 EAGERLY_FINALIZE(); 52 EAGERLY_FINALIZE();
52 DECLARE_VIRTUAL_TRACE(); 53 DECLARE_VIRTUAL_TRACE();
53 54
54 private: 55 private:
55 explicit SVGFEImageElement(Document&); 56 explicit SVGFEImageElement(Document&);
56 57
57 void svgAttributeChanged(const QualifiedName&) override; 58 void svgAttributeChanged(const QualifiedName&) override;
58 void notifyFinished(Resource*) override; 59 void imageNotifyFinished(ImageResource*) override;
59 String debugName() const override { return "SVGFEImageElement"; } 60 String debugName() const override { return "SVGFEImageElement"; }
60 61
61 FilterEffect* build(SVGFilterBuilder*, Filter*) override; 62 FilterEffect* build(SVGFilterBuilder*, Filter*) override;
62 63
63 void clearResourceReferences(); 64 void clearResourceReferences();
64 void fetchImageResource(); 65 void fetchImageResource();
65 66
66 void buildPendingResource() override; 67 void buildPendingResource() override;
67 InsertionNotificationRequest insertedInto(ContainerNode*) override; 68 InsertionNotificationRequest insertedInto(ContainerNode*) override;
68 void removedFrom(ContainerNode*) override; 69 void removedFrom(ContainerNode*) override;
69 70
70 Member<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; 71 Member<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio;
71 72
72 Member<ImageResource> m_cachedImage; 73 Member<ImageResource> m_cachedImage;
73 }; 74 };
74 75
75 } // namespace blink 76 } // namespace blink
76 77
77 #endif // SVGFEImageElement_h 78 #endif // SVGFEImageElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698