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

Unified Diff: Source/core/layout/svg/SVGResourcesCache.cpp

Issue 910083002: Constify and use LayoutStyle reference in layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined again Created 5 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 | « Source/core/layout/svg/SVGResourcesCache.h ('k') | Source/core/layout/svg/SVGTextChunkBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/SVGResourcesCache.cpp
diff --git a/Source/core/layout/svg/SVGResourcesCache.cpp b/Source/core/layout/svg/SVGResourcesCache.cpp
index 188fd58d60a21605d6da4678a2cb9bd29679e413..19f760354f61dcad97f37b4a0b149a722fa4dd41 100644
--- a/Source/core/layout/svg/SVGResourcesCache.cpp
+++ b/Source/core/layout/svg/SVGResourcesCache.cpp
@@ -36,13 +36,12 @@ SVGResourcesCache::~SVGResourcesCache()
{
}
-void SVGResourcesCache::addResourcesFromLayoutObject(LayoutObject* object, const LayoutStyle* style)
+void SVGResourcesCache::addResourcesFromLayoutObject(LayoutObject* object, const LayoutStyle& style)
{
ASSERT(object);
- ASSERT(style);
ASSERT(!m_cache.contains(object));
- const SVGLayoutStyle& svgStyle = style->svgStyle();
+ const SVGLayoutStyle& svgStyle = style.svgStyle();
// Build a list of all resources associated with the passed LayoutObject
OwnPtr<SVGResources> newResources = SVGResources::buildResources(object, svgStyle);
@@ -113,7 +112,7 @@ static inline bool rendererCanHaveResources(LayoutObject* renderer)
return renderer->node() && renderer->node()->isSVGElement() && !renderer->isSVGInlineText();
}
-void SVGResourcesCache::clientStyleChanged(LayoutObject* renderer, StyleDifference diff, const LayoutStyle* newStyle)
+void SVGResourcesCache::clientStyleChanged(LayoutObject* renderer, StyleDifference diff, const LayoutStyle& newStyle)
{
ASSERT(renderer);
ASSERT(renderer->node());
@@ -138,7 +137,7 @@ void SVGResourcesCache::clientStyleChanged(LayoutObject* renderer, StyleDifferen
RenderSVGResourceContainer::markForLayoutAndParentResourceInvalidation(renderer, false);
}
-void SVGResourcesCache::clientWasAddedToTree(LayoutObject* renderer, const LayoutStyle* newStyle)
+void SVGResourcesCache::clientWasAddedToTree(LayoutObject* renderer, const LayoutStyle& newStyle)
{
if (!renderer->node())
return;
« no previous file with comments | « Source/core/layout/svg/SVGResourcesCache.h ('k') | Source/core/layout/svg/SVGTextChunkBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698