[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 19:15:34 PST 2013


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


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

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




--- Comment #8 from Chen Zhixiang <chenzx at cn.fujitsu.com>  2013-01-07 19:17:30 PST ---
Considering new frame may contain fragment( f.html#anchorNode ), then reset to zero may be not correct), new fix:

void FrameLoaderClientQt::dispatchDidLoadMainResource(DocumentLoader* documentLoader) 
{ 
    Frame* frame = documentLoader->frame(); 
    if( frame->settings() && frame->settings()->frameFlatteningEnabled() ){ 
        FrameLoader* frameLoader = documentLoader->frameLoader(); 
        FrameLoadType loadType = FrameLoadTypeStandard;//default as normal load; 
        if( frameLoader ) 
            loadType = frameLoader->loadType(); 
        if( Frame* mainFrame = frame->page()->mainFrame() ){ 
            if( FrameView* mainFrameView = mainFrame->view() ){ 
                IntPoint scrollPosition;//default as zero; 
                if( FrameView* frameView = frame->view() ){ 
                    scrollPosition = frameView->scrollPosition(); 
                    //get this new frame's scroll position as it may have fragment( a.html#anchorNode ); 
                } 
                if( loadType==FrameLoadTypeStandard ){ 
                    //no matter whether frame flattening is enable, reset scroll position as soon as loadType is standard; 
                    mainFrameView->setScrollPosition( scrollPosition ); 
                } 
            } 
        } 
    } 
}

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