[Webkit-unassigned] [Bug 102970] [WK1] REGRESSION (r129545): The main frame no longer rubberbands

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 21 12:43:46 PST 2012


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





--- Comment #1 from Adam Roben (:aroben) <aroben at webkit.org>  2012-11-21 12:45:47 PST ---
I think I see the bug. In -[WebView _cacheFrameLoadDelegateImplementations] we have this code:

http://trac.webkit.org/browser/trunk/Source/WebKit/mac/WebView/WebView.mm?rev=129545#L1653

    // It would be nice to get rid of this code and transition all clients to using didLayout instead of
    // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required
    // for backwards compatibility.
    Page* page = core(self);
    if (page) {
        unsigned milestones = 0;
        if (cache->didFirstLayoutInFrameFunc)
            milestones |= DidFirstLayout;
        if (cache->didFirstVisuallyNonEmptyLayoutInFrameFunc)
            milestones |= DidFirstVisuallyNonEmptyLayout;
        page->addLayoutMilestones(static_cast<LayoutMilestones>(milestones));
    }

This means that we'll only listen for the DidFirstLayout milestone if the WebFrameLoadDelegate responds to -webView:didFirstLayoutInFrame:.

In WebFrameLoaderClient::dispatchDidLayout, we have this code:

http://trac.webkit.org/browser/trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm?rev=129545#L673

    if (milestones & DidFirstLayout) {
        // FIXME: We should consider removing the old didFirstLayout API since this is doing double duty with the
        // new didLayout API.
        if (implementations->didFirstLayoutInFrameFunc)
            CallFrameLoadDelegate(implementations->didFirstLayoutInFrameFunc, webView, @selector(webView:didFirstLayoutInFrame:), m_webFrame.get());

        // See WebFrameLoaderClient::provisionalLoadStarted.
        WebDynamicScrollBarsView *scrollView = [m_webFrame->_private->webFrameView _scrollView];
        if ([getWebView(m_webFrame.get()) drawsBackground])
            [scrollView setDrawsBackground:YES];
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
        [scrollView setVerticalScrollElasticity:NSScrollElasticityAutomatic];
        [scrollView setHorizontalScrollElasticity:NSScrollElasticityAutomatic];
#endif
    }

So we'll only set the scroll view's elasticity if we get a DidFirstLayout milestone, but we'll only get that if the WebFrameLoadDelegate responds to -webView:didFirstLayoutInFrame:. (Note that not even implementing the new -webView:didLayout: method will get elasticity to work.)

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