2010-11-08 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>

        Reviewed by Martin Robinson.

        [GTK] Link with target name set does not work
        https://bugs.webkit.org/show_bug.cgi?id=48865

        When a new page is created with a name (target=myFrame), the new
        mainFrame could not be found because they where not stored in the
        same PageGroup. As PageGroup are not exposed externally so the
        simpliest solution is to use a global page group name. This also fixes
        issue with visited link coloration across pages. After this change the
        private function webkit_web_view_set_group_name() was no longer used
        so it was removed completly.

        * WebCoreSupport/ChromeClientGtk.cpp:
        (WebKit::ChromeClient::closeWindowSoon):
        * WebCoreSupport/InspectorClientGtk.cpp:
        (WebKit::InspectorClient::openInspectorFrontend):
        * webkit/webkitprivate.h:
        * webkit/webkitwebview.cpp:
        (webkit_web_view_init):
2010-11-08  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>

        Reviewed by Martin Robinson.

        [GTK] Link with target name set does not work
        https://bugs.webkit.org/show_bug.cgi?id=48865

        When a new page is created with a name (target=myFrame), the new
        mainFrame could not be found because they where not stored in the
        same PageGroup. As PageGroup are not exposed externally so the
        simpliest solution is to use a global page group name. This also fixes
        issue with visited link coloration across pages. After this change the
        private function webkit_web_view_set_group_name() was no longer used
        so it was removed completly.

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (createWebView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 210f566d
2010-11-08 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Link with target name set does not work
https://bugs.webkit.org/show_bug.cgi?id=48865
When a new page is created with a name (target=myFrame), the new
mainFrame could not be found because they where not stored in the
same PageGroup. As PageGroup are not exposed externally so the
simpliest solution is to use a global page group name. This also fixes
issue with visited link coloration across pages. After this change the
private function webkit_web_view_set_group_name() was no longer used
so it was removed completly.
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::closeWindowSoon):
* WebCoreSupport/InspectorClientGtk.cpp:
(WebKit::InspectorClient::openInspectorFrontend):
* webkit/webkitprivate.h:
* webkit/webkitwebview.cpp:
(webkit_web_view_init):
2010-11-08 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
......
......@@ -255,10 +255,6 @@ void ChromeClient::closeWindowSoon()
if (isHandled)
return;
// FIXME: should we clear the frame group name here explicitly? Mac does it.
// But this gets cleared in Page's destructor anyway.
// webkit_web_view_set_group_name(m_webView, "");
}
bool ChromeClient::canTakeFocus(FocusDirection)
......
......@@ -78,7 +78,7 @@ void InspectorClient::openInspectorFrontend(InspectorController* controller)
}
webkit_web_inspector_set_web_view(webInspector, inspectorWebView);
GOwnPtr<gchar> inspectorPath(g_build_filename(inspectorFilesPath(), "inspector.html", NULL));
GOwnPtr<gchar> inspectorURI(g_filename_to_uri(inspectorPath.get(), 0, 0));
webkit_web_view_load_uri(inspectorWebView, inspectorURI.get());
......@@ -88,6 +88,9 @@ void InspectorClient::openInspectorFrontend(InspectorController* controller)
m_frontendPage = core(inspectorWebView);
m_frontendClient = new InspectorFrontendClient(m_inspectedWebView, inspectorWebView, webInspector, m_frontendPage, this);
m_frontendPage->inspectorController()->setInspectorFrontendClient(m_frontendClient);
// The inspector must be in it's own PageGroup to avoid deadlock while debugging.
m_frontendPage->setGroupName("");
}
void InspectorClient::releaseFrontendPage()
......
......@@ -387,9 +387,6 @@ extern "C" {
WEBKIT_API gchar*
webkit_web_view_get_selected_text (WebKitWebView* web_view);
WEBKIT_API void
webkit_web_view_set_group_name(WebKitWebView* web_view, const gchar* group_name);
WEBKIT_API void
webkit_web_settings_add_extra_plugin_directory (WebKitWebView *web_view, const gchar* directory);
......
......@@ -3248,6 +3248,12 @@ static void webkit_web_view_init(WebKitWebView* webView)
pageClients.inspectorClient = new WebKit::InspectorClient(webView);
priv->corePage = new Page(pageClients);
// Pages within a same session need to be linked together otherwise some functionalities such
// as visited link coloration (across pages) and changing popup window location will not work.
// To keep the default behavior simple (and because no PageGroup API exist in WebKitGTK at the
// time of writing this comment), we simply set all the pages to the same group.
priv->corePage->setGroupName("org.webkit.gtk.WebKitGTK");
// We also add a simple wrapper class to provide the public
// interface for the Web Inspector.
priv->webInspector = adoptPlatformRef(WEBKIT_WEB_INSPECTOR(g_object_new(WEBKIT_TYPE_WEB_INSPECTOR, NULL)));
......@@ -4513,18 +4519,6 @@ void webkit_web_view_move_cursor(WebKitWebView* webView, GtkMovementStep step, g
g_signal_emit(webView, webkit_web_view_signals[MOVE_CURSOR], 0, step, count, &handled);
}
void webkit_web_view_set_group_name(WebKitWebView* webView, const gchar* groupName)
{
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
WebKitWebViewPrivate* priv = webView->priv;
if (!priv->corePage)
return;
priv->corePage->setGroupName(String::fromUTF8(groupName));
}
/**
* webkit_web_view_can_undo:
* @webView: a #WebKitWebView
......
2010-11-08 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Link with target name set does not work
https://bugs.webkit.org/show_bug.cgi?id=48865
When a new page is created with a name (target=myFrame), the new
mainFrame could not be found because they where not stored in the
same PageGroup. As PageGroup are not exposed externally so the
simpliest solution is to use a global page group name. This also fixes
issue with visited link coloration across pages. After this change the
private function webkit_web_view_set_group_name() was no longer used
so it was removed completly.
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(createWebView):
2010-11-08 John Knottenbelt <jknotten@chromium.org>
Reviewed by Kent Tamura.
......
......@@ -69,7 +69,6 @@ extern guint webkit_web_frame_get_pending_unload_event_count(WebKitWebFrame* fra
extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory);
extern gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame);
extern void webkit_web_frame_clear_main_frame_name(WebKitWebFrame* frame);
extern void webkit_web_view_set_group_name(WebKitWebView* view, const gchar* groupName);
extern void webkit_reset_origin_access_white_lists();
}
......@@ -1000,10 +999,6 @@ static WebKitWebView* createWebView()
DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled(true);
// From bug 11756: Use a frame group name for all WebViews created by
// DumpRenderTree to allow testing of cross-page frame lookup.
webkit_web_view_set_group_name(view, "org.webkit.gtk.DumpRenderTree");
g_object_connect(G_OBJECT(view),
"signal::load-started", webViewLoadStarted, 0,
"signal::load-finished", webViewLoadFinished, 0,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment