void QtWebPageLoadClient::didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void* clientInfo) { WebFrameProxy* wkframe = toImpl(frame); QString urlStr(wkframe->url()); QUrl qUrl = urlStr; toQtWebPageLoadClient(clientInfo)->didSameDocumentNavigationForFrame(qUrl); }
void QtWebPageLoadClient::didCommitLoadForFrame(WKPageRef, WKFrameRef frame, WKTypeRef, const void* clientInfo) { if (!WKFrameIsMainFrame(frame)) return; WebFrameProxy* wkframe = toImpl(frame); QString urlStr(wkframe->url()); QUrl qUrl = urlStr; toQtWebPageLoadClient(clientInfo)->didCommitLoadForFrame(qUrl); }
void qt_wk_didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, const void* clientInfo) { if (!WKFrameIsMainFrame(frame)) return; WebFrameProxy* wkframe = toWK(frame); QString urlStr(wkframe->url()); QUrl qUrl = urlStr; emit toQWKPage(clientInfo)->urlChanged(qUrl); QWKPagePrivate::get(toQWKPage(clientInfo))->updateNavigationActions(); }
WKURLRef WKFrameGetURL(WKFrameRef frameRef) { WebFrameProxy* frame = toWK(frameRef); return toURLRef(frame->url().impl()); }