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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGResources.cpp

Issue 2647443004: Add SVGResources helper for resource-bounds invalidation (Closed)
Patch Set: Default was actually true... Created 3 years, 11 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 | « third_party/WebKit/Source/core/layout/svg/SVGResources.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
index 0602e8ac017aab303c882437bdf67e8f6616d529..30ea7c3364d5f7c8a92d303b51c9f51ee6105221 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
@@ -323,6 +323,19 @@ void SVGResources::layoutIfNeeded() {
m_linkedResource->layoutIfNeeded();
}
+void SVGResources::removeClientFromCacheAffectingObjectBounds(
+ LayoutObject* object,
+ bool markForInvalidation) const {
+ if (!m_clipperFilterMaskerData)
+ return;
+ if (LayoutSVGResourceClipper* clipper = m_clipperFilterMaskerData->clipper)
+ clipper->removeClientFromCache(object, markForInvalidation);
+ if (LayoutSVGResourceFilter* filter = m_clipperFilterMaskerData->filter)
+ filter->removeClientFromCache(object, markForInvalidation);
+ if (LayoutSVGResourceMasker* masker = m_clipperFilterMaskerData->masker)
+ masker->removeClientFromCache(object, markForInvalidation);
+}
+
void SVGResources::removeClientFromCache(LayoutObject* object,
bool markForInvalidation) const {
if (!hasResourceData())
@@ -336,17 +349,7 @@ void SVGResources::removeClientFromCache(LayoutObject* object,
return;
}
- if (m_clipperFilterMaskerData) {
- if (m_clipperFilterMaskerData->clipper)
- m_clipperFilterMaskerData->clipper->removeClientFromCache(
- object, markForInvalidation);
- if (m_clipperFilterMaskerData->filter)
- m_clipperFilterMaskerData->filter->removeClientFromCache(
- object, markForInvalidation);
- if (m_clipperFilterMaskerData->masker)
- m_clipperFilterMaskerData->masker->removeClientFromCache(
- object, markForInvalidation);
- }
+ removeClientFromCacheAffectingObjectBounds(object, markForInvalidation);
if (m_markerData) {
if (m_markerData->markerStart)
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGResources.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698