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

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

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest Created 3 years, 9 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
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
index 7f99b545ff72f018f08a86b2f596906fd9454bd7..2e3c487a1b8bbc7336647573855c19daba5a359a 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp
@@ -59,7 +59,7 @@ void SVGPaintServer::applyToPaintFlags(PaintFlags& flags, float alpha) {
}
void SVGPaintServer::prependTransform(const AffineTransform& transform) {
- ASSERT(m_gradient || m_pattern);
+ DCHECK(m_gradient || m_pattern);
m_transform = transform * m_transform;
}
@@ -81,7 +81,7 @@ static SVGPaintDescription requestPaint(const LayoutObject& object,
bool applyToFill = mode == ApplyToFillMode;
SVGPaintType paintType =
applyToFill ? svgStyle.fillPaintType() : svgStyle.strokePaintType();
- ASSERT(paintType != SVG_PAINTTYPE_NONE);
+ DCHECK_NE(paintType, SVG_PAINTTYPE_NONE);
Color color;
bool hasColor = false;
@@ -126,7 +126,7 @@ static SVGPaintDescription requestPaint(const LayoutObject& object,
if (paintType < SVG_PAINTTYPE_URI_NONE) {
// |paintType| will be either <current-color> or <rgb-color> here - both of
// which will have a color.
- ASSERT(hasColor);
+ DCHECK(hasColor);
return SVGPaintDescription(color);
}
@@ -159,7 +159,7 @@ SVGPaintServer SVGPaintServer::requestForLayoutObject(
const LayoutObject& layoutObject,
const ComputedStyle& style,
LayoutSVGResourceMode resourceMode) {
- ASSERT(resourceMode == ApplyToFillMode || resourceMode == ApplyToStrokeMode);
+ DCHECK(resourceMode == ApplyToFillMode || resourceMode == ApplyToStrokeMode);
SVGPaintDescription paintDescription =
requestPaint(layoutObject, style, resourceMode);

Powered by Google App Engine
This is Rietveld 408576698