Changeset 82185 in webkit


Ignore:
Timestamp:
Mar 28, 2011 7:39:33 PM (13 years ago)
Author:
Beth Dakin
Message:

Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for:
Horizontal scroller stops appearing after going Forward
-and corresponding-
<rdar://problem/9026946>

Reviewed by Darin Adler.

This patch rolls out revision 79053 and fixes the same bug in a better way.

New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then
sets the contents size to 0. This is called when a document is going into the page
cache.

  • dom/Document.cpp:

(WebCore::Document::setInPageCache):
(WebCore::FrameView::resetScrollbarsAndClearContentsSize):

Roll-out of 79053.

  • history/CachedFrame.cpp:

(WebCore::CachedFrameBase::restore):

  • page/FrameView.cpp:

(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::layout):

  • page/FrameView.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r82184 r82185  
     12011-03-28  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for:
     6        Horizontal scroller stops appearing after going Forward
     7        -and corresponding-
     8        <rdar://problem/9026946>
     9
     10        This patch rolls out revision 79053 and fixes the same bug in a  better way.
     11
     12        New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then
     13        sets the contents size to 0. This is called when a document is going into the page
     14        cache.
     15        * dom/Document.cpp:
     16        (WebCore::Document::setInPageCache):
     17        (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
     18
     19        Roll-out of 79053.
     20        * history/CachedFrame.cpp:
     21        (WebCore::CachedFrameBase::restore):
     22        * page/FrameView.cpp:
     23        (WebCore::FrameView::FrameView):
     24        (WebCore::FrameView::reset):
     25        (WebCore::FrameView::layout):
     26        * page/FrameView.h:
     27
    1282011-03-28  Ojan Vafai  <ojan@chromium.org>
    229
  • trunk/Source/WebCore/dom/Document.cpp

    r82084 r82185  
    39453945        m_savedRenderer = renderer();
    39463946        if (FrameView* v = view())
    3947             v->resetScrollbars();
     3947            v->resetScrollbarsAndClearContentsSize();
    39483948        m_styleRecalcTimer.stop();
    39493949    } else {
  • trunk/Source/WebCore/history/CachedFrame.cpp

    r79053 r82185  
    8484    ASSERT(m_document->view() == m_view);
    8585
    86     m_view->setIsRestoringFromBackForward(true);
    87 
    8886    Frame* frame = m_view->frame();
    8987    m_cachedFrameScriptData->restore(frame);
  • trunk/Source/WebCore/page/FrameView.cpp

    r82171 r82185  
    133133    , m_deferSetNeedsLayouts(0)
    134134    , m_setNeedsLayoutWasDeferred(false)
    135     , m_isRestoringFromBackForward(false)
    136135    , m_scrollCorner(0)
    137136{
     
    228227    m_isVisuallyNonEmpty = false;
    229228    m_firstVisuallyNonEmptyLayoutCallbackPending = true;
    230     m_isRestoringFromBackForward = false;
    231229    m_maintainScrollPositionAnchor = 0;
    232230}
     
    251249    else
    252250        setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff);
     251    setScrollbarsSuppressed(false);
     252}
     253
     254void FrameView::resetScrollbarsAndClearContentsSize()
     255{
     256    resetScrollbars();
     257
     258    setScrollbarsSuppressed(true);
     259    setContentsSize(IntSize());
    253260    setScrollbarsSuppressed(false);
    254261}
     
    848855        if (m_firstLayout || (hMode != currentHMode || vMode != currentVMode)) {
    849856            if (m_firstLayout) {
    850                 if (!m_isRestoringFromBackForward)
    851                     setScrollbarsSuppressed(true);
    852                 else {
    853                     setScrollbarsSuppressed(false);
    854                     m_isRestoringFromBackForward = false;
    855                 }
     857                setScrollbarsSuppressed(true);
    856858
    857859                m_firstLayout = false;
  • trunk/Source/WebCore/page/FrameView.h

    r82171 r82185  
    132132
    133133    void resetScrollbars();
     134    void resetScrollbarsAndClearContentsSize();
    134135    void detachCustomScrollbars();
    135136
     
    269270    void flushAnyPendingPostLayoutTasks();
    270271
    271     void setIsRestoringFromBackForward(bool isRestoring) { m_isRestoringFromBackForward = isRestoring; }
    272     bool isRestoringFromBackForward() const { return m_isRestoringFromBackForward; }
    273 
    274272    virtual bool shouldSuspendScrollAnimations() const;
    275273
     
    416414    bool m_firstVisuallyNonEmptyLayoutCallbackPending;
    417415
    418     bool m_isRestoringFromBackForward;
    419 
    420416    RefPtr<Node> m_maintainScrollPositionAnchor;
    421417
Note: See TracChangeset for help on using the changeset viewer.