Changeset 146373 in webkit


Ignore:
Timestamp:
Mar 20, 2013 11:56:32 AM (11 years ago)
Author:
timothy_horton@apple.com
Message:

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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r146371 r146373  
     12013-03-20  Tim Horton  <timothy_horton@apple.com>
     2
     3        Autosize should use documentRect height instead of scrollHeight
     4        https://bugs.webkit.org/show_bug.cgi?id=112770
     5
     6        Reviewed by David Levin.
     7
     8        Autosizing fails to compute the correct height if the root element is very
     9        small but the document has significant overflow.
     10
     11        No new tests; autosizing is not currently exposed in a testable way on Mac.
     12
     13        * page/FrameView.cpp:
     14        (WebCore::FrameView::autoSizeIfEnabled):
     15
    1162013-03-20  Julien Chaffraix  <jchaffraix@webkit.org>
    217
  • trunk/Source/WebCore/page/FrameView.cpp

    r145934 r146373  
    27242724        return;
    27252725
    2726     RenderBox* documentRenderBox = documentElement->renderBox();
    2727     if (!documentRenderBox)
    2728         return;
    2729 
    27302726    // If this is the first time we run autosize, start from small height and
    27312727    // allow it to grow.
     
    27412737        document->updateLayoutIgnorePendingStylesheets();
    27422738        int width = documentView->minPreferredLogicalWidth();
    2743         int height = documentRenderBox->scrollHeight();
     2739        int height = documentView->documentRect().height();
    27442740        IntSize newSize(width, height);
    27452741
Note: See TracChangeset for help on using the changeset viewer.