|
Overview :
When SVG idrefs is same, even though the LayoutSVGResourcesContainers are created under different shadow root,
they got conflicted and only the latest created one is reflected.
The problem is that, currently, the HashMap mapping LayoutSVGResourcesContainers to its id is owned by the document instead of treeScope.
This CL moves that hash map from document to treeScope, so that LayoutSVGResourcesContainers with same id in different shadow root won’t get conflict.
Detail :
Currently below 3 HashMap/HeapHashMap (which are wrapped into class SVGDocumentExtensions) are owned by document instead of treeScope.
(Member<SVGDocumentExtensions> m_svgExtensions)
HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources;
HeapHashMap<AtomicString, Member<SVGPendingElements>> m_pendingResources;
HeapHashMap<AtomicString, Member<SVGPendingElements>> m_pendingResourcesForRemoval;
Thus when a new LayoutSVGResourcesContainer with same id is created, it is inserted into m_resources and overwrites the one with the same key(id).
Solution :
This CL separated these 3 HashMap/HeapHashMap from SVGDocumentExtensions and wrapped them into a new class(which is named SVGTreeScopeResources), and let treeScope have them as member variable(Member<SVGTreeScopeResources> m_svgTreeScopedResources).
Also this CL moved corresponding methods using these 3 HashMap/HeapHashMap into the new class SVGTreeScopeResources.
BUG= 597080
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+319 lines, -245 lines) |
Patch |
|
M |
AUTHORS
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/core.gypi
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/dom/Element.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/dom/TreeScope.h
|
View
|
1
|
3 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/dom/TreeScope.cpp
|
View
|
1
|
2 chunks |
+13 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
|
View
|
|
5 chunks |
+15 lines, -15 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/layout/svg/ReferenceFilterBuilder.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
|
View
|
|
7 chunks |
+12 lines, -13 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGDocumentExtensions.h
|
View
|
|
3 chunks |
+0 lines, -25 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
|
View
|
|
3 chunks |
+0 lines, -173 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGElement.cpp
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGMPathElement.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h
|
View
|
|
1 chunk |
+56 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/Source/core/svg/SVGTreeScopeResources.cpp
|
View
|
1
|
1 chunk |
+194 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGUseElement.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
Total messages: 11 (2 generated)
|