Changeset 77714 in webkit


Ignore:
Timestamp:
Feb 4, 2011 6:11:51 PM (13 years ago)
Author:
Martin Robinson
Message:

2011-02-04 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] WebKitWebFrame can return a stale frame name when calling webkit_web_frame_get_name
https://bugs.webkit.org/show_bug.cgi?id=53797

  • platform/gtk/Skipped: Unskip a test which is now passing.

2011-02-04 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] WebKitWebFrame can return a stale frame name when calling webkit_web_frame_get_name
https://bugs.webkit.org/show_bug.cgi?id=53797

When the frame name changes between different calls to webkit_web_frame_get_name
on the same frame, return the new frame name instead of the one valid during the
previous call.

  • webkit/webkitwebframe.cpp: (webkit_web_frame_init): Initialize the frame name to 0. (webkit_web_frame_get_name): Check the current frame name first before returning the cached value.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r77712 r77714  
     12011-02-04  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] WebKitWebFrame can return a stale frame name when calling webkit_web_frame_get_name
     6        https://bugs.webkit.org/show_bug.cgi?id=53797
     7
     8        * platform/gtk/Skipped: Unskip a test which is now passing.
     9
    1102011-02-04  Martin Robinson  <mrobinson@igalia.com>
    211
  • trunk/LayoutTests/platform/gtk/Skipped

    r77710 r77714  
    37643764# New events failing; see https://bugs.webkit.org/show_bug.cgi?id=28823
    37653765fast/events/pageshow-pagehide-on-back-cached.html
    3766 fast/events/pageshow-pagehide-on-back-uncached.html
    37673766fast/events/pageshow-pagehide.html
    37683767
  • trunk/Source/WebKit/gtk/ChangeLog

    r77710 r77714  
     12011-02-04  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] WebKitWebFrame can return a stale frame name when calling webkit_web_frame_get_name
     6        https://bugs.webkit.org/show_bug.cgi?id=53797
     7
     8        When the frame name changes between different calls to webkit_web_frame_get_name
     9        on the same frame, return the new frame name instead of the one valid during the
     10        previous call.
     11
     12        * webkit/webkitwebframe.cpp:
     13        (webkit_web_frame_init): Initialize the frame name to 0.
     14        (webkit_web_frame_get_name): Check the current frame name first before
     15        returning the cached value.
     16
    1172011-02-04  Martin Robinson  <mrobinson@igalia.com>
    218
  • trunk/Source/WebKit/gtk/webkit/webkitwebframe.cpp

    r76940 r77714  
    475475 * Returns the @frame's name
    476476 *
    477  * Return value: the name of @frame
     477 * Return value: the name of @frame. This method will return NULL if
     478 * the #WebKitWebFrame is invalid or an empty string if it is not backed
     479 * by a live WebCore frame.
    478480 */
    479481G_CONST_RETURN gchar* webkit_web_frame_get_name(WebKitWebFrame* frame)
    480482{
    481483    g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
    482 
    483     WebKitWebFramePrivate* priv = frame->priv;
    484 
    485     if (priv->name)
    486         return priv->name;
    487 
    488484    Frame* coreFrame = core(frame);
    489485    if (!coreFrame)
    490486        return "";
    491487
    492     String string = coreFrame->tree()->uniqueName();
    493     priv->name = g_strdup(string.utf8().data());
     488    WebKitWebFramePrivate* priv = frame->priv;
     489    CString frameName = coreFrame->tree()->uniqueName().string().utf8();
     490    if (!g_strcmp0(frameName.data(), priv->name))
     491        return priv->name;
     492
     493    g_free(priv->name);
     494    priv->name = g_strdup(frameName.data());
    494495    return priv->name;
    495496}
Note: See TracChangeset for help on using the changeset viewer.