Changeset 82185 in webkit
- Timestamp:
- Mar 28, 2011 7:39:33 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r82184 r82185 1 2011-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 1 28 2011-03-28 Ojan Vafai <ojan@chromium.org> 2 29 -
trunk/Source/WebCore/dom/Document.cpp
r82084 r82185 3945 3945 m_savedRenderer = renderer(); 3946 3946 if (FrameView* v = view()) 3947 v->resetScrollbars ();3947 v->resetScrollbarsAndClearContentsSize(); 3948 3948 m_styleRecalcTimer.stop(); 3949 3949 } else { -
trunk/Source/WebCore/history/CachedFrame.cpp
r79053 r82185 84 84 ASSERT(m_document->view() == m_view); 85 85 86 m_view->setIsRestoringFromBackForward(true);87 88 86 Frame* frame = m_view->frame(); 89 87 m_cachedFrameScriptData->restore(frame); -
trunk/Source/WebCore/page/FrameView.cpp
r82171 r82185 133 133 , m_deferSetNeedsLayouts(0) 134 134 , m_setNeedsLayoutWasDeferred(false) 135 , m_isRestoringFromBackForward(false)136 135 , m_scrollCorner(0) 137 136 { … … 228 227 m_isVisuallyNonEmpty = false; 229 228 m_firstVisuallyNonEmptyLayoutCallbackPending = true; 230 m_isRestoringFromBackForward = false;231 229 m_maintainScrollPositionAnchor = 0; 232 230 } … … 251 249 else 252 250 setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff); 251 setScrollbarsSuppressed(false); 252 } 253 254 void FrameView::resetScrollbarsAndClearContentsSize() 255 { 256 resetScrollbars(); 257 258 setScrollbarsSuppressed(true); 259 setContentsSize(IntSize()); 253 260 setScrollbarsSuppressed(false); 254 261 } … … 848 855 if (m_firstLayout || (hMode != currentHMode || vMode != currentVMode)) { 849 856 if (m_firstLayout) { 850 if (!m_isRestoringFromBackForward) 851 setScrollbarsSuppressed(true); 852 else { 853 setScrollbarsSuppressed(false); 854 m_isRestoringFromBackForward = false; 855 } 857 setScrollbarsSuppressed(true); 856 858 857 859 m_firstLayout = false; -
trunk/Source/WebCore/page/FrameView.h
r82171 r82185 132 132 133 133 void resetScrollbars(); 134 void resetScrollbarsAndClearContentsSize(); 134 135 void detachCustomScrollbars(); 135 136 … … 269 270 void flushAnyPendingPostLayoutTasks(); 270 271 271 void setIsRestoringFromBackForward(bool isRestoring) { m_isRestoringFromBackForward = isRestoring; }272 bool isRestoringFromBackForward() const { return m_isRestoringFromBackForward; }273 274 272 virtual bool shouldSuspendScrollAnimations() const; 275 273 … … 416 414 bool m_firstVisuallyNonEmptyLayoutCallbackPending; 417 415 418 bool m_isRestoringFromBackForward;419 420 416 RefPtr<Node> m_maintainScrollPositionAnchor; 421 417
Note: See TracChangeset
for help on using the changeset viewer.