summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/LayoutState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/LayoutState.cpp')
-rw-r--r--WebCore/rendering/LayoutState.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/WebCore/rendering/LayoutState.cpp b/WebCore/rendering/LayoutState.cpp
index c94e77b..18c3da7 100644
--- a/WebCore/rendering/LayoutState.cpp
+++ b/WebCore/rendering/LayoutState.cpp
@@ -90,6 +90,13 @@ LayoutState::LayoutState(RenderObject* root)
RenderObject* container = root->container();
FloatPoint absContentPoint = container->localToAbsolute(FloatPoint(), false, true);
m_offset = IntSize(absContentPoint.x(), absContentPoint.y());
+
+ if (container->hasOverflowClip()) {
+ RenderLayer* layer = toRenderBoxModelObject(container)->layer();
+ m_clipped = true;
+ m_clipRect = IntRect(toPoint(m_offset), layer->size());
+ m_offset -= layer->scrolledContentOffset();
+ }
}
#ifndef NDEBUG