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/paint/PaintLayerResourceInfo.cpp

Issue 2484153003: Use an SVGElementProxy in ReferenceClipPathOperation (Closed)
Patch Set: Rebase; fix comments; findElement Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp b/third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
similarity index 63%
rename from third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
rename to third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
index d34a1825a7f7ea06a842c17ba4bf820070e4d4e3..a41e6f87f67ef3bfa9abe0db8fd50f4542ef0dfa 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerFilterInfo.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
@@ -27,51 +27,57 @@
* SUCH DAMAGE.
*/
-#include "core/paint/PaintLayerFilterInfo.h"
+#include "core/paint/PaintLayerResourceInfo.h"
#include "core/paint/PaintLayer.h"
#include "platform/graphics/filters/FilterEffect.h"
namespace blink {
-PaintLayerFilterInfo::PaintLayerFilterInfo(PaintLayer* layer)
+PaintLayerResourceInfo::PaintLayerResourceInfo(PaintLayer* layer)
: m_layer(layer) {}
-PaintLayerFilterInfo::~PaintLayerFilterInfo() {
+PaintLayerResourceInfo::~PaintLayerResourceInfo() {
DCHECK(!m_layer);
}
-TreeScope* PaintLayerFilterInfo::treeScope() {
+TreeScope* PaintLayerResourceInfo::treeScope() {
DCHECK(m_layer);
Node* node = m_layer->layoutObject()->node();
return node ? &node->treeScope() : nullptr;
}
-void PaintLayerFilterInfo::resourceContentChanged() {
+void PaintLayerResourceInfo::resourceContentChanged() {
DCHECK(m_layer);
- m_layer->layoutObject()->setShouldDoFullPaintInvalidation();
- invalidateFilterChain();
+ LayoutObject* layoutObject = m_layer->layoutObject();
+ layoutObject->setShouldDoFullPaintInvalidation();
+ const ComputedStyle& style = layoutObject->styleRef();
+ if (style.hasFilter() && style.filter().hasReferenceFilter())
+ invalidateFilterChain();
}
-void PaintLayerFilterInfo::resourceElementChanged() {
+void PaintLayerResourceInfo::resourceElementChanged() {
DCHECK(m_layer);
- m_layer->layoutObject()->setShouldDoFullPaintInvalidation();
- invalidateFilterChain();
+ LayoutObject* layoutObject = m_layer->layoutObject();
+ layoutObject->setShouldDoFullPaintInvalidation();
+ const ComputedStyle& style = layoutObject->styleRef();
+ if (style.hasFilter() && style.filter().hasReferenceFilter())
+ invalidateFilterChain();
}
-void PaintLayerFilterInfo::setLastEffect(FilterEffect* lastEffect) {
+void PaintLayerResourceInfo::setLastEffect(FilterEffect* lastEffect) {
m_lastEffect = lastEffect;
}
-FilterEffect* PaintLayerFilterInfo::lastEffect() const {
+FilterEffect* PaintLayerResourceInfo::lastEffect() const {
return m_lastEffect;
}
-void PaintLayerFilterInfo::invalidateFilterChain() {
+void PaintLayerResourceInfo::invalidateFilterChain() {
m_lastEffect = nullptr;
}
-DEFINE_TRACE(PaintLayerFilterInfo) {
+DEFINE_TRACE(PaintLayerResourceInfo) {
visitor->trace(m_lastEffect);
SVGResourceClient::trace(visitor);
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.h ('k') | third_party/WebKit/Source/core/style/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698