Changeset 71604 in webkit


Ignore:
Timestamp:
Nov 8, 2010 9:05:51 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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):
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r71541 r71604  
     12010-11-08  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Link with target name set does not work
     6        https://bugs.webkit.org/show_bug.cgi?id=48865
     7
     8        When a new page is created with a name (target=myFrame), the new
     9        mainFrame could not be found because they where not stored in the
     10        same PageGroup. As PageGroup are not exposed externally so the
     11        simpliest solution is to use a global page group name. This also fixes
     12        issue with visited link coloration across pages. After this change the
     13        private function webkit_web_view_set_group_name() was no longer used
     14        so it was removed completly.
     15
     16        * WebCoreSupport/ChromeClientGtk.cpp:
     17        (WebKit::ChromeClient::closeWindowSoon):
     18        * WebCoreSupport/InspectorClientGtk.cpp:
     19        (WebKit::InspectorClient::openInspectorFrontend):
     20        * webkit/webkitprivate.h:
     21        * webkit/webkitwebview.cpp:
     22        (webkit_web_view_init):
     23
    1242010-11-08  Alexey Proskuryakov  <ap@apple.com>
    225
  • trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp

    r71541 r71604  
    256256    if (isHandled)
    257257        return;
    258 
    259     // FIXME: should we clear the frame group name here explicitly? Mac does it.
    260     // But this gets cleared in Page's destructor anyway.
    261     // webkit_web_view_set_group_name(m_webView, "");
    262258}
    263259
  • trunk/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp

    r69968 r71604  
    7979
    8080    webkit_web_inspector_set_web_view(webInspector, inspectorWebView);
    81 
     81 
    8282    GOwnPtr<gchar> inspectorPath(g_build_filename(inspectorFilesPath(), "inspector.html", NULL));
    8383    GOwnPtr<gchar> inspectorURI(g_filename_to_uri(inspectorPath.get(), 0, 0));
     
    8989    m_frontendClient = new InspectorFrontendClient(m_inspectedWebView, inspectorWebView, webInspector, m_frontendPage, this);
    9090    m_frontendPage->inspectorController()->setInspectorFrontendClient(m_frontendClient);
     91
     92    // The inspector must be in it's own PageGroup to avoid deadlock while debugging.
     93    m_frontendPage->setGroupName("");
    9194}
    9295
  • trunk/WebKit/gtk/webkit/webkitprivate.h

    r71510 r71604  
    389389
    390390    WEBKIT_API void
    391     webkit_web_view_set_group_name(WebKitWebView* web_view, const gchar* group_name);
    392 
    393     WEBKIT_API void
    394391    webkit_web_settings_add_extra_plugin_directory (WebKitWebView *web_view, const gchar* directory);
    395392
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r71510 r71604  
    32493249    priv->corePage = new Page(pageClients);
    32503250
     3251    // Pages within a same session need to be linked together otherwise some functionalities such
     3252    // as visited link coloration (across pages) and changing popup window location will not work.
     3253    // To keep the default behavior simple (and because no PageGroup API exist in WebKitGTK at the
     3254    // time of writing this comment), we simply set all the pages to the same group.
     3255    priv->corePage->setGroupName("org.webkit.gtk.WebKitGTK");
     3256
    32513257    // We also add a simple wrapper class to provide the public
    32523258    // interface for the Web Inspector.
     
    45124518    gboolean handled;
    45134519    g_signal_emit(webView, webkit_web_view_signals[MOVE_CURSOR], 0, step, count, &handled);
    4514 }
    4515 
    4516 void webkit_web_view_set_group_name(WebKitWebView* webView, const gchar* groupName)
    4517 {
    4518     g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
    4519 
    4520     WebKitWebViewPrivate* priv = webView->priv;
    4521 
    4522     if (!priv->corePage)
    4523         return;
    4524 
    4525     priv->corePage->setGroupName(String::fromUTF8(groupName));
    45264520}
    45274521
  • trunk/WebKitTools/ChangeLog

    r71597 r71604  
     12010-11-08  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Link with target name set does not work
     6        https://bugs.webkit.org/show_bug.cgi?id=48865
     7
     8        When a new page is created with a name (target=myFrame), the new
     9        mainFrame could not be found because they where not stored in the
     10        same PageGroup. As PageGroup are not exposed externally so the
     11        simpliest solution is to use a global page group name. This also fixes
     12        issue with visited link coloration across pages. After this change the
     13        private function webkit_web_view_set_group_name() was no longer used
     14        so it was removed completly.
     15
     16        * DumpRenderTree/gtk/DumpRenderTree.cpp:
     17        (createWebView):
     18
    1192010-11-08  John Knottenbelt  <jknotten@chromium.org>
    220
  • trunk/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r71510 r71604  
    7070extern gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame);
    7171extern void webkit_web_frame_clear_main_frame_name(WebKitWebFrame* frame);
    72 extern void webkit_web_view_set_group_name(WebKitWebView* view, const gchar* groupName);
    7372extern void webkit_reset_origin_access_white_lists();
    7473}
     
    10011000    DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled(true);
    10021001
    1003     // From bug 11756: Use a frame group name for all WebViews created by
    1004     // DumpRenderTree to allow testing of cross-page frame lookup.
    1005     webkit_web_view_set_group_name(view, "org.webkit.gtk.DumpRenderTree");
    1006 
    10071002    g_object_connect(G_OBJECT(view),
    10081003                     "signal::load-started", webViewLoadStarted, 0,
Note: See TracChangeset for help on using the changeset viewer.