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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.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/LayoutSVGResourcePattern.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
index fd476fab394a3f7f0ac9892136fb58601dc7f742..bcaa3528527fa331a5b2e46a886a2b30d83d3f17 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
@@ -61,7 +61,7 @@ void LayoutSVGResourcePattern::removeAllClientsFromCache(
void LayoutSVGResourcePattern::removeClientFromCache(LayoutObject* client,
bool markForInvalidation) {
- ASSERT(client);
+ DCHECK(client);
m_patternMap.erase(client);
markClientForInvalidation(
client, markForInvalidation ? PaintInvalidation : ParentOnlyInvalidation);
@@ -69,7 +69,7 @@ void LayoutSVGResourcePattern::removeClientFromCache(LayoutObject* client,
PatternData* LayoutSVGResourcePattern::patternForLayoutObject(
const LayoutObject& object) {
- ASSERT(!m_shouldCollectPatternAttributes);
+ DCHECK(!m_shouldCollectPatternAttributes);
// FIXME: the double hash lookup is needed to guard against paint-time
// invalidation (painting animated images may trigger layout invals which
@@ -93,7 +93,7 @@ std::unique_ptr<PatternData> LayoutSVGResourcePattern::buildPatternData(
if (attributes.hasViewBox() && attributes.viewBox().isEmpty())
return nullptr;
- ASSERT(element());
+ DCHECK(element());
// Compute tile metrics.
FloatRect clientBoundingBox = object.objectBoundingBox();
FloatRect tileBounds = SVGLengthContext::resolveRectangle(
@@ -166,7 +166,7 @@ SVGPaintServer LayoutSVGResourcePattern::preparePaintServer(
const LayoutSVGResourceContainer*
LayoutSVGResourcePattern::resolveContentElement() const {
- ASSERT(attributes().patternContentElement());
+ DCHECK(attributes().patternContentElement());
LayoutSVGResourceContainer* expectedLayoutObject =
toLayoutSVGResourceContainer(
attributes().patternContentElement()->layoutObject());
@@ -195,7 +195,7 @@ LayoutSVGResourcePattern::resolveContentElement() const {
sk_sp<PaintRecord> LayoutSVGResourcePattern::asPaintRecord(
const FloatRect& tileBounds,
const AffineTransform& tileTransform) const {
- ASSERT(!m_shouldCollectPatternAttributes);
+ DCHECK(!m_shouldCollectPatternAttributes);
AffineTransform contentTransform;
if (attributes().patternContentUnits() ==
@@ -207,7 +207,8 @@ sk_sp<PaintRecord> LayoutSVGResourcePattern::asPaintRecord(
const LayoutSVGResourceContainer* patternLayoutObject =
resolveContentElement();
- ASSERT(patternLayoutObject && !patternLayoutObject->needsLayout());
+ DCHECK(patternLayoutObject);
+ DCHECK(!patternLayoutObject->needsLayout());
SubtreeContentTransformScope contentTransformScope(contentTransform);

Powered by Google App Engine
This is Rietveld 408576698