void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse) { if (dumpResourceLoadCallbacks) printf("%s - willSendRequest %s redirectResponse %s\n", qPrintable(dumpAssignedUrls[identifier]), qPrintable(drtDescriptionSuitableForTestResult(newRequest)), qPrintable(drtDescriptionSuitableForTestResult(redirectResponse))); // seems like the Mac code doesn't do anything here by default neither //qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << request.url().string`(); }
void FrameLoaderClientQt::dispatchDidFinishDocumentLoad() { if (dumpFrameLoaderCallbacks) printf("%s - didFinishDocumentLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); if (QWebPagePrivate::drtRun) { int unloadEventCount = m_frame->domWindow()->pendingUnloadEventListeners(); if (unloadEventCount) printf("%s - has %u onunload handler(s)\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), unloadEventCount); } if (m_frame->tree()->parent() || !m_webFrame) return; m_webFrame->page()->d->updateNavigationActions(); }
void FrameLoaderClientQt::dispatchDidCancelClientRedirect() { if (dumpFrameLoaderCallbacks) printf("%s - didCancelClientRedirectForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); notImplemented(); }
void FrameLoaderClientQt::dispatchWillPerformClientRedirect(const KURL& url, double, double) { if (dumpFrameLoaderCallbacks) printf("%s - willPerformClientRedirectToURL: %s \n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), qPrintable(drtDescriptionSuitableForTestResult(url))); notImplemented(); }
void FrameLoaderClientQt::dispatchDidPopStateWithinPage() { if (dumpFrameLoaderCallbacks) printf("%s - dispatchDidPopStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); notImplemented(); }
void FrameLoaderClientQt::dispatchDidHandleOnloadEvents() { // don't need this one if (dumpFrameLoaderCallbacks) printf("%s - didHandleOnloadEventsForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); }
void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError&) { if (dumpFrameLoaderCallbacks) printf("%s - didFailLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); m_loadSucceeded = false; }
void FrameLoaderClientQt::windowObjectCleared() { if (dumpFrameLoaderCallbacks) printf("%s - didClearWindowObjectForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); if (m_webFrame) emit m_webFrame->javaScriptWindowObjectCleared(); }
void FrameLoaderClientQt::dispatchDidStartProvisionalLoad() { if (dumpFrameLoaderCallbacks) printf("%s - didStartProvisionalLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); if (m_webFrame) emit m_webFrame->provisionalLoad(); }
void FrameLoaderClientQt::dispatchDidReceiveIcon() { if (dumpFrameLoaderCallbacks) printf("%s - didReceiveIconForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); if (m_webFrame) { emit m_webFrame->iconChanged(); } }
void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& error) { if (dumpFrameLoaderCallbacks) printf("%s - didFailLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); m_loadError = error; if (!error.isNull() && !error.isCancellation()) callErrorPageExtension(error); }
void FrameLoaderClientQt::dispatchDidFinishDocumentLoad() { if (dumpFrameLoaderCallbacks) printf("%s - didFinishDocumentLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); if (m_frame->tree()->parent() || !m_webFrame) return; m_webFrame->page()->d->updateNavigationActions(); }
void FrameLoaderClientQt::dispatchDidReceiveTitle(const String& title) { if (dumpFrameLoaderCallbacks) printf("%s - didReceiveTitle: %s\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), qPrintable(QString(title))); if (!m_webFrame) return; emit titleChanged(title); }
void FrameLoaderClientQt::dispatchDidFinishLoad() { if (dumpFrameLoaderCallbacks) printf("%s - didFinishLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); m_loadSucceeded = true; if (!m_webFrame) return; m_webFrame->page()->d->updateNavigationActions(); }
void FrameLoaderClientQt::dispatchDidChangeLocationWithinPage() { if (dumpFrameLoaderCallbacks) printf("%s - didChangeLocationWithinPageForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); if (!m_webFrame) return; emit m_webFrame->urlChanged(m_webFrame->url()); m_webFrame->page()->d->updateNavigationActions(); }
void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse& response) { m_response = response; m_firstData = true; if (dumpResourceLoadCallbacks) printf("%s - didReceiveResponse %s\n", qPrintable(dumpAssignedUrls[identifier]), qPrintable(drtDescriptionSuitableForTestResult(response))); //qDebug() << " got response from" << response.url().string(); }
void FrameLoaderClientQt::dispatchDidFinishLoad() { if (dumpFrameLoaderCallbacks) printf("%s - didFinishLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); // Clears the previous error. m_loadError = ResourceError(); if (!m_webFrame) return; m_webFrame->page()->d->updateNavigationActions(); }
void FrameLoaderClientQt::dispatchDidFailLoading(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceError& error) { if (dumpResourceLoadCallbacks) printf("%s - didFailLoadingWithError: %s\n", (dumpAssignedUrls.contains(identifier) ? qPrintable(dumpAssignedUrls[identifier]) : "<unknown>"), qPrintable(drtDescriptionSuitableForTestResult(error))); if (m_firstData) { FrameLoader *fl = loader->frameLoader(); fl->setEncoding(m_response.textEncodingName(), false); m_firstData = false; } }
void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse) { if (dumpResourceLoadCallbacks) printf("%s - willSendRequest %s redirectResponse %s\n", qPrintable(dumpAssignedUrls[identifier]), qPrintable(drtDescriptionSuitableForTestResult(newRequest)), (redirectResponse.isNull()) ? "(null)" : qPrintable(drtDescriptionSuitableForTestResult(redirectResponse))); if (sendRequestReturnsNull) newRequest.setURL(QUrl()); if (sendRequestReturnsNullOnRedirect && !redirectResponse.isNull()) { printf("Returning null for this redirect\n"); newRequest.setURL(QUrl()); } for (int i = 0; i < sendRequestClearHeaders.size(); ++i) newRequest.setHTTPHeaderField(sendRequestClearHeaders.at(i).toLocal8Bit().constData(), QString()); // seems like the Mac code doesn't do anything here by default neither //qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << request.url().string`(); }
void FrameLoaderClientQt::dispatchDidCommitLoad() { if (dumpFrameLoaderCallbacks) printf("%s - didCommitLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); if (m_frame->tree()->parent() || !m_webFrame) return; m_webFrame->page()->d->updateNavigationActions(); // We should assume first the frame has no title. If it has, then the above dispatchDidReceiveTitle() // will be called very soon with the correct title. // This properly resets the title when we navigate to a URI without a title. emit titleChanged(String()); }
void FrameLoaderClientQt::dispatchDidReceiveServerRedirectForProvisionalLoad() { if (dumpFrameLoaderCallbacks) printf("%s - didReceiveServerRedirectForProvisionalLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); notImplemented(); }
void FrameLoaderClientQt::dispatchWillClose() { if (dumpFrameLoaderCallbacks) printf("%s - willCloseFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); }
void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest& request) { if (dumpResourceLoadCallbacks) dumpAssignedUrls[identifier] = drtDescriptionSuitableForTestResult(request.url()); }