Index: Source/core/rendering/RenderBoxModelObject.cpp |
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp |
index d5dfa279e43f7722398d7af39a0c67016f61c87c..109268ce6200f80c0db9196e7778737d769d1dc6 100644 |
--- a/Source/core/rendering/RenderBoxModelObject.cpp |
+++ b/Source/core/rendering/RenderBoxModelObject.cpp |
@@ -344,6 +344,9 @@ LayoutSize RenderBoxModelObject::stickyPositionOffset() const |
if (enclosingClippingLayer) { |
RenderBox* enclosingClippingBox = toRenderBox(enclosingClippingLayer->renderer()); |
LayoutRect clipRect = enclosingClippingBox->overflowClipRect(LayoutPoint(), 0); // FIXME: make this work in regions. |
+ clipRect.move(enclosingClippingBox->paddingLeft(), enclosingClippingBox->paddingTop()); |
ojan
2014/02/19 20:03:24
The equivalent webkit patch didn't have this (http
ostap
2014/02/19 20:50:00
Webkit takes padding into account for the position
|
+ clipRect.contract(LayoutSize(enclosingClippingBox->paddingLeft() + enclosingClippingBox->paddingRight(), |
+ enclosingClippingBox->paddingTop() + enclosingClippingBox->paddingBottom())); |
constrainingRect = enclosingClippingBox->localToContainerQuad(FloatRect(clipRect), view()).boundingBox(); |
} else { |
LayoutRect viewportRect = view()->frameView()->viewportConstrainedVisibleContentRect(); |