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

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

Issue 2824823003: DOM-based SVG resource tracking (Closed)
Patch Set: Update baselines Created 3 years, 7 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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 11 matching lines...) Expand all
22 22
23 #include <memory> 23 #include <memory>
24 #include "platform/wtf/Allocator.h" 24 #include "platform/wtf/Allocator.h"
25 #include "platform/wtf/HashSet.h" 25 #include "platform/wtf/HashSet.h"
26 #include "platform/wtf/Noncopyable.h" 26 #include "platform/wtf/Noncopyable.h"
27 #include "platform/wtf/PtrUtil.h" 27 #include "platform/wtf/PtrUtil.h"
28 28
29 namespace blink { 29 namespace blink {
30 30
31 class ComputedStyle; 31 class ComputedStyle;
32 class Element;
32 class LayoutObject; 33 class LayoutObject;
33 class LayoutSVGResourceClipper; 34 class LayoutSVGResourceClipper;
34 class LayoutSVGResourceContainer; 35 class LayoutSVGResourceContainer;
35 class LayoutSVGResourceFilter; 36 class LayoutSVGResourceFilter;
36 class LayoutSVGResourceMarker; 37 class LayoutSVGResourceMarker;
37 class LayoutSVGResourceMasker; 38 class LayoutSVGResourceMasker;
38 class LayoutSVGResourcePaintServer; 39 class LayoutSVGResourcePaintServer;
39 class SVGElement; 40 class SVGElement;
40 41
41 // Holds a set of resources associated with a LayoutObject 42 // Holds a set of resources associated with a LayoutObject
42 class SVGResources { 43 class SVGResources {
43 WTF_MAKE_NONCOPYABLE(SVGResources); 44 WTF_MAKE_NONCOPYABLE(SVGResources);
44 USING_FAST_MALLOC(SVGResources); 45 USING_FAST_MALLOC(SVGResources);
45 46
46 public: 47 public:
47 SVGResources(); 48 SVGResources();
48 49
49 static std::unique_ptr<SVGResources> BuildResources(const LayoutObject*, 50 static std::unique_ptr<SVGResources> BuildResources(const LayoutObject*,
50 const ComputedStyle&); 51 const ComputedStyle&);
52
53 static void RemoveWatchesForElement(Element&);
54 static void RemoveUnreferencedResources(const LayoutObject&);
55
51 void LayoutIfNeeded(); 56 void LayoutIfNeeded();
52 57
53 static bool SupportsMarkers(const SVGElement&); 58 static bool SupportsMarkers(const SVGElement&);
54 59
55 // Ordinary resources 60 // Ordinary resources
56 LayoutSVGResourceClipper* Clipper() const { 61 LayoutSVGResourceClipper* Clipper() const {
57 return clipper_filter_masker_data_ ? clipper_filter_masker_data_->clipper 62 return clipper_filter_masker_data_ ? clipper_filter_masker_data_->clipper
58 : 0; 63 : 0;
59 } 64 }
60 LayoutSVGResourceMarker* MarkerStart() const { 65 LayoutSVGResourceMarker* MarkerStart() const {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 185
181 std::unique_ptr<ClipperFilterMaskerData> clipper_filter_masker_data_; 186 std::unique_ptr<ClipperFilterMaskerData> clipper_filter_masker_data_;
182 std::unique_ptr<MarkerData> marker_data_; 187 std::unique_ptr<MarkerData> marker_data_;
183 std::unique_ptr<FillStrokeData> fill_stroke_data_; 188 std::unique_ptr<FillStrokeData> fill_stroke_data_;
184 LayoutSVGResourceContainer* linked_resource_; 189 LayoutSVGResourceContainer* linked_resource_;
185 }; 190 };
186 191
187 } // namespace blink 192 } // namespace blink
188 193
189 #endif 194 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698