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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
index 617914902507a4f7d7eadf146b932b174d92646f..c292154dbc97418c08f743891c2adab7495cfcde 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
@@ -21,6 +21,7 @@
#define LayoutSVGResourceContainer_h
#include "core/layout/svg/LayoutSVGHiddenContainer.h"
+#include "core/svg/SVGTreeScopeResources.h"
namespace blink {
@@ -61,8 +62,10 @@ class LayoutSVGResourceContainer : public LayoutSVGHiddenContainer {
resource_type == kRadialGradientResourceType;
}
- void IdChanged(const AtomicString& old_id, const AtomicString& new_id);
- void DetachAllClients(const AtomicString& to_id);
+ // Detach all clients from this resource, and add them as watches to the tree
+ // scope's resource entry (the argument.)
+ void MakeClientsPending(SVGTreeScopeResources::Resource&);
+ bool HasClients() const { return !clients_.IsEmpty(); }
void InvalidateCacheAndMarkForLayout(SubtreeLayoutScope* = nullptr);
@@ -94,23 +97,16 @@ class LayoutSVGResourceContainer : public LayoutSVGHiddenContainer {
bool is_in_layout_;
private:
- friend class SVGTreeScopeResources;
- // The m_registered flag is updated by SVGTreeScopeResources, and indicates
- // that this resource is the one that is resident in the id->resource map.
- void SetRegistered(bool registered) { registered_ = registered; }
- bool IsRegistered() const { return registered_; }
-
friend class SVGResourcesCache;
void AddClient(LayoutObject*);
- void RemoveClient(LayoutObject*);
+ bool RemoveClient(LayoutObject*);
- // Track global (markAllClientsForInvalidation) invals to avoid redundant
- // crawls.
+ // Track global (markAllClientsForInvalidation) invalidations to avoid
+ // redundant crawls.
unsigned invalidation_mask_ : 8;
- unsigned registered_ : 1;
unsigned is_invalidating_ : 1;
- // 22 padding bits available
+ // 23 padding bits available
HashSet<LayoutObject*> clients_;
};

Powered by Google App Engine
This is Rietveld 408576698