Bug 57286

Summary: Alternative fix for: Horizontal scroller stops appearing after going Forward
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: Layout and RenderingAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, dongjae1.kim
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch bdakin: review+

Description Beth Dakin 2011-03-28 17:02:48 PDT
http://trac.webkit.org/changeset/79053 was a fix for a long-standing WebKit bug. Hyatt proposed that we actually fix it in a different way though. I will soon post a patch that rolls out the original fix and implements Hyatt's suggested fix.

<rdar://problem/9026946>

Oh, and to reproduce:

1. Visit any page, say nytimes.com
2. Now visit another page -- one that you know will go into the back-forward cache. I visited a local test file I have that is just text inside a <body> with a fixed width. Make sure the window is narrow enough to have a horizontal scrollbar.
3. Click the back button.
4. Click the forward button. The bug was that the horizontal scrollbar would not be there even though scrolling horizontally was possible.
Comment 1 Beth Dakin 2011-03-28 17:09:19 PDT
Created attachment 87242 [details]
Patch
Comment 2 Darin Adler 2011-03-28 17:44:01 PDT
Comment on attachment 87242 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=87242&action=review

> Source/WebCore/dom/Document.cpp:3947
> +            v->resetScrollbars(FrameView::ClearContentsSize);

Since the work to clear the contents size is completely separate, why not add a separate function call instead of having an enum to add more work onto this function?
Comment 3 Beth Dakin 2011-03-28 19:38:13 PDT
(In reply to comment #2)
> (From update of attachment 87242 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=87242&action=review
> 
> > Source/WebCore/dom/Document.cpp:3947
> > +            v->resetScrollbars(FrameView::ClearContentsSize);
> 
> Since the work to clear the contents size is completely separate, why not add a separate function call instead of having an enum to add more work onto this function?

I took Darin's advice and added a separate function. He gave me an r=him in person, so I am going mark the + flag.
Comment 4 Beth Dakin 2011-03-28 19:39:52 PDT
Fixed with r 82185.
Comment 5 DongJae KIM 2011-06-26 22:24:23 PDT
This bug was fixed,

Currently EFL Port Page Cache was disabled.

so I try to enable EFL Page Cache Function. but Horizontal Scroll Bar was not displayed.

I want to know, why below code was deleted.

                if (!m_isRestoringFromBackForward)
                    setScrollbarsSuppressed(true);
                else {
                    setScrollbarsSuppressed(false);
                    m_isRestoringFromBackForward = false;
                }