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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h

Issue 2722543002: Improve handling of duplicate id's for SVG resources (Closed)
Patch Set: Rebase Created 3 years, 9 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 f22b7f9d5926f477c9f736134edbf3ef52b537c5..7fb14b767122a5b4dbfb9ffc08563ce17e1a1e7b 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
@@ -63,6 +63,7 @@ class LayoutSVGResourceContainer : public LayoutSVGHiddenContainer {
}
void idChanged(const AtomicString& oldId, const AtomicString& newId);
+ void detachAllClients(const AtomicString& toId);
void invalidateCacheAndMarkForLayout(SubtreeLayoutScope* = nullptr);
@@ -94,10 +95,15 @@ class LayoutSVGResourceContainer : public LayoutSVGHiddenContainer {
bool m_isInLayout;
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) { m_registered = registered; }
+ bool isRegistered() const { return m_registered; }
+
friend class SVGResourcesCache;
void addClient(LayoutObject*);
void removeClient(LayoutObject*);
- void detachAllClients();
// Track global (markAllClientsForInvalidation) invals to avoid redundant
// crawls.

Powered by Google App Engine
This is Rietveld 408576698