Changeset 71466 in webkit


Ignore:
Timestamp:
Nov 5, 2010 10:52:23 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Reviewed by Martin Robinson.

[GTK] Link with target name set does not work correctly
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):
  • webkit/webkitprivate.h:
  • webkit/webkitwebview.cpp: (webkit_web_view_init):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r71451 r71466  
     12010-11-05  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Link with target name set does not work correctly
     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        * webkit/webkitprivate.h:
     19        * webkit/webkitwebview.cpp:
     20        (webkit_web_view_init):
     21
    1222010-11-05  Chris Marrin  <cmarrin@apple.com>
    223
  • trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp

    r70609 r71466  
    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/webkit/webkitprivate.h

    r71090 r71466  
    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

    r71090 r71466  
    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("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/DumpRenderTree/gtk/DumpRenderTree.cpp

    r71403 r71466  
    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.