| 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 38b038675cbb64788c7cefe6ccfa91911c56cc40..8f1fd5951115131daed74c2a5aff08cd823c42a6 100644
|
| --- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
|
| @@ -80,7 +80,7 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& par
|
| , m_canCheckFastPathSlowPathEquality(parentState.m_canCheckFastPathSlowPathEquality)
|
| #endif
|
| {
|
| - ASSERT(&m_paintingLayer == currentObject.paintingLayer());
|
| + DCHECK(&m_paintingLayer == currentObject.paintingLayer());
|
|
|
| if (currentObject == parentState.m_currentObject) {
|
| // Sometimes we create a new PaintInvalidationState from parentState on the same object
|
| @@ -92,7 +92,9 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& par
|
| return;
|
| }
|
|
|
| - ASSERT(parentState.m_didUpdateForChildren);
|
| +#if ENABLE(ASSERT)
|
| + DCHECK(parentState.m_didUpdateForChildren);
|
| +#endif
|
|
|
| if (currentObject.isPaintInvalidationContainer()) {
|
| m_paintInvalidationContainer = toLayoutBoxModelObject(¤tObject);
|
| @@ -133,7 +135,7 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& par
|
| // Don't early return here, because the SVGRoot object needs to execute the later code
|
| // as a normal LayoutBox.
|
| } else {
|
| - ASSERT(currentObject != m_paintInvalidationContainer);
|
| + DCHECK(currentObject != m_paintInvalidationContainer);
|
| m_svgTransform *= currentObject.localToSVGParentTransform();
|
| return;
|
| }
|
| @@ -182,7 +184,7 @@ void PaintInvalidationState::updateForCurrentObject(const PaintInvalidationState
|
| return;
|
|
|
| if (m_currentObject.isLayoutView()) {
|
| - ASSERT(&parentState.m_currentObject == toLayoutView(m_currentObject).frame()->ownerLayoutObject());
|
| + DCHECK(&parentState.m_currentObject == toLayoutView(m_currentObject).frame()->ownerLayoutObject());
|
| m_paintOffset += toLayoutBox(parentState.m_currentObject).contentBoxOffset();
|
| // a LayoutView paints with a defined size but a pixel-rounded offset.
|
| m_paintOffset = LayoutSize(roundedIntSize(m_paintOffset));
|
| @@ -243,7 +245,7 @@ void PaintInvalidationState::updateForCurrentObject(const PaintInvalidationState
|
| void PaintInvalidationState::updateForChildren(PaintInvalidationReason reason)
|
| {
|
| #if ENABLE(ASSERT)
|
| - ASSERT(!m_didUpdateForChildren);
|
| + DCHECK(!m_didUpdateForChildren);
|
| m_didUpdateForChildren = true;
|
| #endif
|
|
|
| @@ -315,7 +317,7 @@ void PaintInvalidationState::updateForNormalChildren()
|
| // Do not clip or scroll for the paint invalidation container, if it scrolls overflow, because it will always use composited
|
| // scrolling in this case.
|
| if (box == m_paintInvalidationContainer && box.scrollsOverflow()) {
|
| - ASSERT(!m_clipped); // The box establishes paint invalidation container, so no m_clipped inherited.
|
| + DCHECK(!m_clipped); // The box establishes paint invalidation container, so no m_clipped inherited.
|
| } else {
|
| addClipRectRelativeToPaintOffset(box.overflowClipRect(LayoutPoint()));
|
| m_paintOffset -= box.scrolledContentOffset();
|
| @@ -340,7 +342,9 @@ static FloatPoint slowLocalToAncestorPoint(const LayoutObject& object, const Lay
|
|
|
| LayoutPoint PaintInvalidationState::computePositionFromPaintInvalidationBacking() const
|
| {
|
| - ASSERT(!m_didUpdateForChildren);
|
| +#if ENABLE(ASSERT)
|
| + DCHECK(!m_didUpdateForChildren);
|
| +#endif
|
|
|
| FloatPoint point;
|
| if (m_paintInvalidationContainer != &m_currentObject) {
|
| @@ -349,8 +353,7 @@ LayoutPoint PaintInvalidationState::computePositionFromPaintInvalidationBacking(
|
| point = m_svgTransform.mapPoint(point);
|
| point += FloatPoint(m_paintOffset);
|
| #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY
|
| - // TODO(wangxianzhu): We can't enable this ASSERT for now because of crbug.com/597745.
|
| - // ASSERT(point == slowLocalOriginToAncestorPoint(m_currentObject, m_paintInvalidationContainer, FloatPoint());
|
| + DCHECK(point == slowLocalOriginToAncestorPoint(m_currentObject, m_paintInvalidationContainer, FloatPoint());
|
| #endif
|
| } else {
|
| point = slowLocalToAncestorPoint(m_currentObject, *m_paintInvalidationContainer, FloatPoint());
|
| @@ -365,7 +368,9 @@ LayoutPoint PaintInvalidationState::computePositionFromPaintInvalidationBacking(
|
|
|
| LayoutRect PaintInvalidationState::computePaintInvalidationRectInBacking() const
|
| {
|
| - ASSERT(!m_didUpdateForChildren);
|
| +#if ENABLE(ASSERT)
|
| + DCHECK(!m_didUpdateForChildren);
|
| +#endif
|
|
|
| if (m_currentObject.isSVG() && !m_currentObject.isSVGRoot())
|
| return computePaintInvalidationRectInBackingForSVG();
|
| @@ -416,7 +421,9 @@ static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const
|
|
|
| void PaintInvalidationState::mapLocalRectToPaintInvalidationContainer(LayoutRect& rect) const
|
| {
|
| - ASSERT(!m_didUpdateForChildren);
|
| +#if ENABLE(ASSERT)
|
| + DCHECK(!m_didUpdateForChildren);
|
| +#endif
|
|
|
| if (m_cachedOffsetsEnabled) {
|
| #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY
|
| @@ -456,7 +463,7 @@ void PaintInvalidationState::addClipRectRelativeToPaintOffset(const LayoutRect&
|
|
|
| PaintLayer& PaintInvalidationState::paintingLayer() const
|
| {
|
| - ASSERT(&m_paintingLayer == m_currentObject.paintingLayer());
|
| + DCHECK(&m_paintingLayer == m_currentObject.paintingLayer());
|
| return m_paintingLayer;
|
| }
|
|
|
|
|