[Webkit-unassigned] [Bug 106077] [Qt]=?UTF-8?Q?=20When=20frame=20flattening=EF=BC=8Cdrag=20scrollbar?=, then click link to goto next frame, the page scroll offset is preserved

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 7 18:26:37 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106077


Chen Zhixiang <chenzx at cn.fujitsu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #7 from Chen Zhixiang <chenzx at cn.fujitsu.com>  2013-01-07 18:28:32 PST ---
Hey, I've found the reason why setScrollPosition doesn't effect:

The reason is setScrollPosition should be called on main frame ( when do frame flattening, ONLY main frame has the scroll bar)

The fix based on qt-4.8.4: 

d:\qt-everywhere-opensource-src-4.8.4\src\3rdparty\webkit\Source\WebKit\qt\WebCoreSupport\FrameLoaderClientQt.cpp 

//This function is called back after a frame's load & layout is done, adjust the main frame's scroll position if load type is standard;
void FrameLoaderClientQt::dispatchDidLoadMainResource(DocumentLoader* documentLoader) 
{ 
    Frame* frame = documentLoader->frame(); 
    FrameLoader* frameLoader = documentLoader->frameLoader(); 
    if( frame && frameLoader ){ 
        Frame* mainFrame = frame->page()->mainFrame(); 
        if( FrameView* view = mainFrame->view() ){ 
            FrameLoadType loadType = frameLoader->loadType(); 
            if( loadType==FrameLoadTypeStandard ){ 
                //no matter whether frame flattening is enabled, reset scroll position as soon as loadType is standard; 
                view->setScrollPosition( IntPoint() ); 
            } 
        } 
    } 
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list