Skip to content
Permalink
Browse files
Autosize should use documentRect height instead of scrollHeight
https://bugs.webkit.org/show_bug.cgi?id=112770

Reviewed by David Levin.

Autosizing fails to compute the correct height if the root element is very
small but the document has significant overflow.

No new tests; autosizing is not currently exposed in a testable way on Mac.

* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):


Canonical link: https://commits.webkit.org/131160@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
hortont424 committed Mar 20, 2013
1 parent 5dbb959 commit f2b6b0d84136275eaa02693703ecf0187e50d7c1
Showing 2 changed files with 16 additions and 5 deletions.
@@ -1,3 +1,18 @@
2013-03-20 Tim Horton <timothy_horton@apple.com>

Autosize should use documentRect height instead of scrollHeight
https://bugs.webkit.org/show_bug.cgi?id=112770

Reviewed by David Levin.

Autosizing fails to compute the correct height if the root element is very
small but the document has significant overflow.

No new tests; autosizing is not currently exposed in a testable way on Mac.

* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):

2013-03-20 Julien Chaffraix <jchaffraix@webkit.org>

[CSS Grid Layout] Improper repainting when grid item change their position
@@ -2723,10 +2723,6 @@ void FrameView::autoSizeIfEnabled()
if (!documentView || !documentElement)
return;

RenderBox* documentRenderBox = documentElement->renderBox();
if (!documentRenderBox)
return;

// If this is the first time we run autosize, start from small height and
// allow it to grow.
if (!m_didRunAutosize)
@@ -2740,7 +2736,7 @@ void FrameView::autoSizeIfEnabled()
// Update various sizes including contentsSize, scrollHeight, etc.
document->updateLayoutIgnorePendingStylesheets();
int width = documentView->minPreferredLogicalWidth();
int height = documentRenderBox->scrollHeight();
int height = documentView->documentRect().height();
IntSize newSize(width, height);

// Check to see if a scrollbar is needed for a given dimension and

0 comments on commit f2b6b0d

Please sign in to comment.