Setting a header or footer should cause a relayout
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 22:52:47 +0000 (22:52 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 22:52:47 +0000 (22:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114070

Reviewed by Sam Weinig.

Mark the RenderView as needing layout in order to adjust everything for the new
header/footer.

* page/FrameView.cpp:
(WebCore::FrameView::setHeaderHeight):
(WebCore::FrameView::setFooterHeight):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147806 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp

index b76b26c..90e3582 100644 (file)
@@ -1,3 +1,17 @@
+2013-04-05  Beth Dakin  <bdakin@apple.com>
+
+        Setting a header or footer should cause a relayout
+        https://bugs.webkit.org/show_bug.cgi?id=114070
+
+        Reviewed by Sam Weinig.
+
+        Mark the RenderView as needing layout in order to adjust everything for the new 
+        header/footer.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::setHeaderHeight):
+        (WebCore::FrameView::setFooterHeight):
+
 2013-04-05  Chris Fleizach  <cfleizach@apple.com>
 
         AX: Make SVG Group containers accessible elements
index 4c7c8da..002d92e 100644 (file)
@@ -935,6 +935,9 @@ void FrameView::setHeaderHeight(int headerHeight)
     if (m_frame && m_frame->page())
         ASSERT(m_frame == m_frame->page()->mainFrame());
     m_headerHeight = headerHeight;
+
+    if (RenderView* renderView = this->renderView())
+        renderView->setNeedsLayout(true);
 }
 
 void FrameView::setFooterHeight(int footerHeight)
@@ -942,6 +945,9 @@ void FrameView::setFooterHeight(int footerHeight)
     if (m_frame && m_frame->page())
         ASSERT(m_frame == m_frame->page()->mainFrame());
     m_footerHeight = footerHeight;
+
+    if (RenderView* renderView = this->renderView())
+        renderView->setNeedsLayout(true);
 }
 
 bool FrameView::hasCompositedContent() const