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

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

Issue 2708543003: Clean up the getLayoutSVGResource*ById helpers (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0461b7cf2b909a9e96beaabc1f42b96e88740faa..acd3c6c6fb85bbcc238c94c3d0fa5320832baacd 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h
@@ -113,23 +113,11 @@ class LayoutSVGResourceContainer : public LayoutSVGHiddenContainer {
HashSet<LayoutObject*> m_clients;
};
-inline LayoutSVGResourceContainer* getLayoutSVGResourceContainerById(
- TreeScope& treeScope,
- const AtomicString& id) {
- if (id.isEmpty())
- return nullptr;
-
- if (LayoutSVGResourceContainer* layoutResource =
- treeScope.ensureSVGTreeScopedResources().resourceById(id))
- return layoutResource;
-
- return nullptr;
-}
-
template <typename Layout>
-Layout* getLayoutSVGResourceById(TreeScope& treeScope, const AtomicString& id) {
+Layout* getLayoutSVGResourceById(SVGTreeScopeResources& treeScopeResources,
+ const AtomicString& id) {
if (LayoutSVGResourceContainer* container =
- getLayoutSVGResourceContainerById(treeScope, id)) {
+ treeScopeResources.resourceById(id)) {
if (container->resourceType() == Layout::s_resourceType)
return static_cast<Layout*>(container);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698