Viewport constrained elements should work properly with headers and footers
[WebKit-https.git] / Source / WebCore / page / scrolling / ScrollingTreeScrollingNode.cpp
index 20190f0..b99534e 100644 (file)
@@ -42,6 +42,8 @@ ScrollingTreeScrollingNode::ScrollingTreeScrollingNode(ScrollingTree* scrollingT
     , m_hasEnabledVerticalScrollbar(false)
     , m_horizontalScrollbarMode(ScrollbarAuto)
     , m_verticalScrollbarMode(ScrollbarAuto)
+    , m_headerHeight(0)
+    , m_footerHeight(0)
 {
 }
 
@@ -85,6 +87,12 @@ void ScrollingTreeScrollingNode::updateBeforeChildren(ScrollingStateNode* stateN
 
     if (state->hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin))
         m_scrollOrigin = state->scrollOrigin();
+
+    if (state->hasChangedProperty(ScrollingStateScrollingNode::HeaderHeight))
+        m_headerHeight = state->headerHeight();
+
+    if (state->hasChangedProperty(ScrollingStateScrollingNode::FooterHeight))
+        m_footerHeight = state->footerHeight();
 }
 
 } // namespace WebCore