Changeset 95033 in webkit


Ignore:
Timestamp:
Sep 13, 2011 10:54:15 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Do not always return the cached frame name.
https://bugs.webkit.org/show_bug.cgi?id=66856

Patch by Raphael Kubo da Costa <kubo@profusion.mobi> on 2011-09-13
Reviewed by Antonio Gomes.

When a frame has its parent changed (via adoptNode and appendChild,
for example), the frame name will change, so we need to account for
that case and change the cached name when needed.

This should make fast/frames/iframe-reparenting-unique-name.html pass.

  • ewk/ewk_frame.cpp:

(ewk_frame_name_get):

Location:
trunk/Source/WebKit/efl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r94965 r95033  
     12011-09-13  Raphael Kubo da Costa  <kubo@profusion.mobi>
     2
     3        [EFL] Do not always return the cached frame name.
     4        https://bugs.webkit.org/show_bug.cgi?id=66856
     5
     6        Reviewed by Antonio Gomes.
     7
     8        When a frame has its parent changed (via adoptNode and appendChild,
     9        for example), the frame name will change, so we need to account for
     10        that case and change the cached name when needed.
     11
     12        This should make fast/frames/iframe-reparenting-unique-name.html pass.
     13
     14        * ewk/ewk_frame.cpp:
     15        (ewk_frame_name_get):
     16
    1172011-09-12  Flavio Ceolin  <flavio.ceolin@profusion.mobi>
    218
  • trunk/Source/WebKit/efl/ewk/ewk_frame.cpp

    r94063 r95033  
    350350    EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
    351351
    352     if (sd->name)
    353         return sd->name;
    354 
    355352    if (!sd->frame) {
    356353        ERR("could not get name of uninitialized frame.");
     
    358355    }
    359356
    360     WTF::String s = sd->frame->tree()->uniqueName();
    361     WTF::CString cs = s.utf8();
    362     sd->name = eina_stringshare_add_length(cs.data(), cs.length());
     357    const WTF::String frameName = sd->frame->tree()->uniqueName();
     358
     359    if ((sd->name) && (sd->name == frameName))
     360        return sd->name;
     361
     362    eina_stringshare_replace_length(&(sd->name), frameName.utf8().data(), frameName.length());
     363
    363364    return sd->name;
    364365}
Note: See TracChangeset for help on using the changeset viewer.