| 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_;
|
| };
|
|
|