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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp

Issue 2060273004: Fix asserts to account for the fact that SVG may have contains: paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 6 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: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
index 8785ee1b8ec6fca0498569f0296323e0184eb8e6..46652d9eae9582bf4017fb8708d824a35d7b34db 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
@@ -39,7 +39,7 @@ static const PaintLayer* findParentLayerOnClippingContainerChain(const PaintLaye
// CSS clip applies to fixed position elements even for ancestors that are not what the
// fixed element is positioned with respect to.
if (current->hasClip()) {
- ASSERT(current->hasLayer());
+ DCHECK(current->hasLayer());
return static_cast<const LayoutBoxModelObject*>(current)->layer();
}
}
@@ -49,8 +49,9 @@ static const PaintLayer* findParentLayerOnClippingContainerChain(const PaintLaye
if (current->hasLayer())
return static_cast<const LayoutBoxModelObject*>(current)->layer();
- // Having clip or overflow clip forces the LayoutObject to become a layer.
- ASSERT(!current->hasClipRelatedProperty());
+ // Having clip or overflow clip forces the LayoutObject to become a layer, except for contains: paint, which may apply to SVG.
+ // SVG (other than LayoutSVGRoot) cannot have PaintLayers.
+ DCHECK(!current->hasClipRelatedProperty() || current->styleRef().containsPaint());
}
ASSERT_NOT_REACHED();
return nullptr;
« 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