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

Unified Diff: Source/core/rendering/svg/SVGResources.cpp

Issue 639343003: Fix SVGResources::hasResourceData predicate to match method name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGResources.cpp
diff --git a/Source/core/rendering/svg/SVGResources.cpp b/Source/core/rendering/svg/SVGResources.cpp
index bb7913dafd03ebe1c5b87e47b20b15c6d572c359..3ead341522e08a2ceb9839b3a709664f1828c79b 100644
--- a/Source/core/rendering/svg/SVGResources.cpp
+++ b/Source/core/rendering/svg/SVGResources.cpp
@@ -202,10 +202,10 @@ static inline void registerPendingResource(SVGDocumentExtensions& extensions, co
bool SVGResources::hasResourceData() const
{
- return !m_clipperFilterMaskerData
- && !m_markerData
- && !m_fillStrokeData
- && !m_linkedResource;
+ return m_clipperFilterMaskerData
+ || m_markerData
+ || m_fillStrokeData
+ || m_linkedResource;
}
static inline SVGResources* ensureResources(OwnPtr<SVGResources>& resources)
@@ -297,7 +297,7 @@ PassOwnPtr<SVGResources> SVGResources::buildResources(const RenderObject* object
registerPendingResource(extensions, id, element);
}
- return (!resources || resources->hasResourceData()) ? nullptr : resources.release();
+ return (!resources || !resources->hasResourceData()) ? nullptr : resources.release();
}
void SVGResources::layoutIfNeeded()
@@ -333,7 +333,7 @@ void SVGResources::layoutIfNeeded()
void SVGResources::removeClientFromCache(RenderObject* object, bool markForInvalidation) const
{
- if (hasResourceData())
+ if (!hasResourceData())
return;
if (m_linkedResource) {
@@ -373,7 +373,7 @@ void SVGResources::removeClientFromCache(RenderObject* object, bool markForInval
void SVGResources::resourceDestroyed(RenderSVGResourceContainer* resource)
{
ASSERT(resource);
- if (hasResourceData())
+ if (!hasResourceData())
return;
if (m_linkedResource == resource) {
@@ -447,7 +447,7 @@ void SVGResources::resourceDestroyed(RenderSVGResourceContainer* resource)
void SVGResources::buildSetOfResources(HashSet<RenderSVGResourceContainer*>& set)
{
- if (hasResourceData())
+ if (!hasResourceData())
return;
if (m_linkedResource) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698