Title: [153032] trunk/Source/WebCore
- Revision
- 153032
- Author
- [email protected]
- Date
- 2013-07-22 21:52:27 -0700 (Mon, 22 Jul 2013)
Log Message
StickyPositionConstraints should store the constrainingRectAtLastLayout
https://bugs.webkit.org/show_bug.cgi?id=118999
Reviewed by Simon Fraser.
Much like how FixedPositionConstraints store a viewportRectAtLastLayout,
StickyConstraints should store a constrainingRectAtLastLayout. We'll need this to
get sticky right in overflow areas once overflow areas scroll on the scrolling
thread.
* page/scrolling/ScrollingConstraints.h:
(WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
(WebCore::StickyPositionViewportConstraints::constrainingRectAtLastLayout):
(WebCore::StickyPositionViewportConstraints::setConstrainingRectAtLastLayout):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (153031 => 153032)
--- trunk/Source/WebCore/ChangeLog 2013-07-23 02:30:26 UTC (rev 153031)
+++ trunk/Source/WebCore/ChangeLog 2013-07-23 04:52:27 UTC (rev 153032)
@@ -1,3 +1,22 @@
+2013-07-22 Beth Dakin <[email protected]>
+
+ StickyPositionConstraints should store the constrainingRectAtLastLayout
+ https://bugs.webkit.org/show_bug.cgi?id=118999
+
+ Reviewed by Simon Fraser.
+
+ Much like how FixedPositionConstraints store a viewportRectAtLastLayout,
+ StickyConstraints should store a constrainingRectAtLastLayout. We'll need this to
+ get sticky right in overflow areas once overflow areas scroll on the scrolling
+ thread.
+
+ * page/scrolling/ScrollingConstraints.h:
+ (WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
+ (WebCore::StickyPositionViewportConstraints::constrainingRectAtLastLayout):
+ (WebCore::StickyPositionViewportConstraints::setConstrainingRectAtLastLayout):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
+
2013-07-22 Santosh Mahto <[email protected]>
DateInputType constructor initiate incorrect base class
Modified: trunk/Source/WebCore/page/scrolling/ScrollingConstraints.h (153031 => 153032)
--- trunk/Source/WebCore/page/scrolling/ScrollingConstraints.h 2013-07-23 02:30:26 UTC (rev 153031)
+++ trunk/Source/WebCore/page/scrolling/ScrollingConstraints.h 2013-07-23 04:52:27 UTC (rev 153032)
@@ -125,6 +125,7 @@
, m_rightOffset(other.m_rightOffset)
, m_topOffset(other.m_topOffset)
, m_bottomOffset(other.m_bottomOffset)
+ , m_constrainingRectAtLastLayout(other.m_constrainingRectAtLastLayout)
, m_containingBlockRect(other.m_containingBlockRect)
, m_stickyBoxRect(other.m_stickyBoxRect)
, m_stickyOffsetAtLastLayout(other.m_stickyOffsetAtLastLayout)
@@ -151,6 +152,11 @@
void setTopOffset(float offset) { m_topOffset = offset; }
void setBottomOffset(float offset) { m_bottomOffset = offset; }
+ // constrainingRectAtLastLayout() is the viewport rect if this sticky object sticks to the viewport, and
+ // it is the overflow area's scrolled clip rect if this sticky object sticks inside an overflow area.
+ FloatRect constrainingRectAtLastLayout() const { return m_constrainingRectAtLastLayout; }
+ void setConstrainingRectAtLastLayout(const FloatRect& rect) { m_constrainingRectAtLastLayout = rect; }
+
// containingBlockRect() is in the scrolling ancestor's coordinate space.
FloatRect containingBlockRect() const { return m_containingBlockRect; }
void setContainingBlockRect(const FloatRect& rect) { m_containingBlockRect = rect; }
@@ -180,6 +186,7 @@
float m_rightOffset;
float m_topOffset;
float m_bottomOffset;
+ FloatRect m_constrainingRectAtLastLayout;
FloatRect m_containingBlockRect;
FloatRect m_stickyBoxRect;
FloatSize m_stickyOffsetAtLastLayout;
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (153031 => 153032)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2013-07-23 02:30:26 UTC (rev 153031)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2013-07-23 04:52:27 UTC (rev 153032)
@@ -526,6 +526,8 @@
void RenderBoxModelObject::computeStickyPositionConstraints(StickyPositionViewportConstraints& constraints, const FloatRect& constrainingRect) const
{
+ constraints.setConstrainingRectAtLastLayout(constrainingRect);
+
RenderBlock* containingBlock = this->containingBlock();
RenderLayer* enclosingClippingLayer = layer()->enclosingOverflowClipLayer(ExcludeSelf);
RenderBox* enclosingClippingBox = enclosingClippingLayer ? toRenderBox(enclosingClippingLayer->renderer()) : view();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes