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

Unified Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 2770203002: Replace DCHECK with DCHECK_op and split some DCHECKs wherever necessary (Closed)
Patch Set: Add few more Created 3 years, 8 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/PaintInvalidationState.cpp
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
index b4c3bd8d439e8abc08a8a68acfd746f3af2f884a..34dfe47b01e510e5aa236bb944c060e228c97890 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -103,7 +103,7 @@ PaintInvalidationState::PaintInvalidationState(
#endif
{
DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
- DCHECK(&m_paintingLayer == currentObject.paintingLayer());
+ DCHECK_EQ(&m_paintingLayer, currentObject.paintingLayer());
if (currentObject == parentState.m_currentObject) {
// Sometimes we create a new PaintInvalidationState from parentState on the same
@@ -243,9 +243,9 @@ void PaintInvalidationState::updateForCurrentObject(
return;
if (m_currentObject.isLayoutView()) {
- DCHECK(&parentState.m_currentObject ==
- LayoutAPIShim::layoutObjectFrom(
- toLayoutView(m_currentObject).frame()->ownerLayoutItem()));
+ DCHECK_EQ(&parentState.m_currentObject,
+ LayoutAPIShim::layoutObjectFrom(
+ toLayoutView(m_currentObject).frame()->ownerLayoutItem()));
m_paintOffset +=
toLayoutBox(parentState.m_currentObject).contentBoxOffset();
// a LayoutView paints with a defined size but a pixel-rounded offset.
@@ -435,9 +435,9 @@ LayoutPoint PaintInvalidationState::computeLocationInBacking(
point = m_svgTransform.mapPoint(point);
point += FloatPoint(m_paintOffset);
#ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY
- DCHECK(point ==
- slowLocalOriginToAncestorPoint(
- m_currentObject, m_paintInvalidationContainer, FloatPoint()));
+ DCHECK_EQ(point, slowLocalOriginToAncestorPoint(
+ m_currentObject, m_paintInvalidationContainer,
+ FloatPoint()));
#endif
} else {
point = slowLocalToAncestorPoint(
@@ -569,7 +569,7 @@ void PaintInvalidationState::addClipRectRelativeToPaintOffset(
}
PaintLayer& PaintInvalidationState::paintingLayer() const {
- DCHECK(&m_paintingLayer == m_currentObject.paintingLayer());
+ DCHECK_EQ(&m_paintingLayer, m_currentObject.paintingLayer());
return m_paintingLayer;
}
@@ -644,7 +644,7 @@ PaintInvalidatorContextAdapter::PaintInvalidatorContextAdapter(
void PaintInvalidatorContextAdapter::mapLocalRectToVisualRectInBacking(
const LayoutObject& object,
LayoutRect& rect) const {
- DCHECK(&object == &m_paintInvalidationState.currentObject());
+ DCHECK_EQ(&object, &m_paintInvalidationState.currentObject());
m_paintInvalidationState.mapLocalRectToVisualRectInBacking(rect);
}

Powered by Google App Engine
This is Rietveld 408576698