diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderView.h')
| -rw-r--r-- | Source/WebCore/rendering/RenderView.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/WebCore/rendering/RenderView.h b/Source/WebCore/rendering/RenderView.h index 0f5c6e881..084d7d5a7 100644 --- a/Source/WebCore/rendering/RenderView.h +++ b/Source/WebCore/rendering/RenderView.h @@ -124,9 +124,27 @@ public: } void addLayoutDelta(const LayoutSize& delta) { - if (m_layoutState) + if (m_layoutState) { m_layoutState->m_layoutDelta += delta; +#if !ASSERT_DISABLED && ENABLE(SATURATED_LAYOUT_ARITHMETIC) + m_layoutState->m_layoutDeltaXSaturated |= m_layoutState->m_layoutDelta.width() == FractionalLayoutUnit::max() || m_layoutState->m_layoutDelta.width() == FractionalLayoutUnit::min(); + m_layoutState->m_layoutDeltaYSaturated |= m_layoutState->m_layoutDelta.height() == FractionalLayoutUnit::max() || m_layoutState->m_layoutDelta.height() == FractionalLayoutUnit::min(); +#endif + } + } + +#if !ASSERT_DISABLED + bool layoutDeltaMatches(const LayoutSize& delta) + { + if (!m_layoutState) + return false; +#if ENABLE(SATURATED_LAYOUT_ARITHMETIC) + return (delta.width() == m_layoutState->m_layoutDelta.width() || m_layoutState->m_layoutDeltaXSaturated) && (delta.height() == m_layoutState->m_layoutDelta.height() || m_layoutState->m_layoutDeltaYSaturated); +#else + return delta == m_layoutState->m_layoutDelta; +#endif } +#endif bool doingFullRepaint() const { return m_frameView->needsFullRepaint(); } |
