KURL DocumentLoader::urlForHistory() const
{
    // Return the URL to be used for history and B/F list.
    // Returns nil for WebDataProtocol URLs that aren't alternates 
    // for unreachable URLs, because these can't be stored in history.
    if (m_substituteData.isValid())
        return unreachableURL();

    return m_originalRequestCopy.url();
}
Esempio n. 2
0
bool LoadHTMLStringItem::invoke() const
{
    GUniquePtr<gchar> content(JSStringCopyUTF8CString(m_content.get()));
    GUniquePtr<gchar> baseURL(JSStringCopyUTF8CString(m_baseURL.get()));

    if (m_unreachableURL) {
        GUniquePtr<gchar> unreachableURL(JSStringCopyUTF8CString(m_unreachableURL.get()));
        webkit_web_frame_load_alternate_string(mainFrame, content.get(), baseURL.get(), unreachableURL.get());
        return true;
    }
    webkit_web_frame_load_string(mainFrame, content.get(), 0, 0, baseURL.get());
    return true;
}
Esempio n. 3
0
const KURL& DocumentLoader::urlForHistory() const
{
    return unreachableURL().isEmpty() ? url() : unreachableURL();
}