[Webkit-unassigned] [Bug 91482] [GTK] No main resource in WebView on load committed when page has been loaded from history cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 31 02:48:51 PDT 2012


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





--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-07-31 02:48:53 PST ---
(In reply to comment #2)
> (From update of attachment 152725 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=152725&action=review
> 
> Looks good overall. I wonder if it would make sense to fix this behavior in WebCore or WebKit2 instead though. Regardless, I have a few suggestions below.

It's not necessarily a bug in WebCore, it has always worked that way. This also happens in wk1 indeed, but in wk1 you can get the main resource directly from the loader, so you don't need to wait until load resource signals are emitted.

> > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:1148
> > +        // Finish a possible previous load waiting for main resource.
> > +        webkitWebViewEmitDelayedLoadEvents(webView);
> 
> What sort of situation does WEBKIT_LOAD_STARTED happen without the main resource response happening? It might be good to specify this situation directly in this comment. Right now it answers the "What?" but not the "Why?"

I think this was a paranoid check, I'm not sure that situation can happen.

> > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:1155
> > +        setCertificateToMainResourceOrWait(webView);
> 
> I think it might be good to move
> 
> priv->waitingForMainResource = true;
> 
> to here and get rid of setCertificateToMainResourceOrWait. Right now it feels like it's a side-effect of setCertificateToMainResourceOrWait, while it affects more than just certificate handling (also emitting delayed loading events), so it's somewhat "hidden" away.

So, are you proposing to move the contents of the helper function here?

> Also above that line I believe a comment explaining why we sometimes wait for the resource to load -- explaining the situation of back and forward with cached resources.

Fair enough.

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