We need to fake a load when they are used for our UA to have a chance of updating its state in the UI. This makes pages like http://diveintohtml5.org/examples/history/casey.html work in Epiphany.
Created attachment 90386 [details] history.diff
Attachment 90386 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/gtk/ChangeLog', u'Source/Web..." exit_code: 1 Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:908: Declaration has space between type name and * in WebKitWebFrame *mainFrame [whitespace/declaration] [3] Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:909: Declaration has space between type name and * in WebKitWebDataSource *dataSource [whitespace/declaration] [3] Total errors found: 2 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 90392 [details] history.diff Nothing to see here, move along.
View in context: https://bugs.webkit.org/attachment.cgi?id=90386&action=review Seems okay, but please consider my comments below when landing. > Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:913 > + WebKitWebView* webView = getViewFromFrame(m_frame); > + WebKitWebFrame *mainFrame = webView->priv->mainFrame; > + WebKitWebDataSource *dataSource = webkit_web_frame_get_data_source(mainFrame); > + bool loaderCompleted = !webkit_web_data_source_is_loading(dataSource); > + > + if (!loaderCompleted) > + return; This can all be reduced to two lines with something like: if (core(getViewFromFrame(m_frame))->mainFrame()->loader()->activeDocumentLoader()->isLoadingInAPISense()) return; I would also leave a comment explaining why you don't want to send these signals during loading.
Comment on attachment 90392 [details] history.diff r+ with changes above.
Dumping here some comments Martin and I had about this on jabber: - If we commit the patch as-is we break at least one invariant our code had before: we'll emit a provisional load signal without having a provisional data source/request. In theory this cannot happen. - If we skip the provisional stage this to avoid the former, we break another invariant: we go through committed and finished before having started at provisional. I believe this, also, cannot happen in theory. So I'm having second thoughts about this. If I had to choose I'd probably decide to go for option a). CCing Gustavo in case he wants to comment.
(In reply to comment #6) > Dumping here some comments Martin and I had about this on jabber: > > - If we commit the patch as-is we break at least one invariant our code had before: we'll emit a provisional load signal without having a provisional data source/request. In theory this cannot happen. > > - If we skip the provisional stage this to avoid the former, we break another invariant: we go through committed and finished before having started at provisional. I believe this, also, cannot happen in theory. > > So I'm having second thoughts about this. If I had to choose I'd probably decide to go for option a). CCing Gustavo in case he wants to comment. We can create a fake provisional data source/request, perhaps? Even if we don't, I think the first option is the one with less chance of causing breakage, so I'd go with it.
Attachment 90392 [details] was posted by a committer and has review+, assigning to Xan Lopez for commit.
Created attachment 117756 [details] Patch
Comment on attachment 117756 [details] Patch Clearing flags on attachment: 117756 Committed r101933: <http://trac.webkit.org/changeset/101933>
All reviewed patches have been landed. Closing bug.