Bug 66856 - [EFL] Do not always return the cached frame name.
: [EFL] Do not always return the cached frame name.
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-08-24 06:56 PST by
Modified: 2011-09-13 10:53 PST (History)


Attachments
Patch (1.90 KB, patch)
2011-08-24 06:57 PST, Raphael Kubo da Costa (:rakuco)
no flags Review Patch | Details | Formatted Diff | Diff
Use operator== instead of strcmp (1.88 KB, patch)
2011-09-13 08:53 PST, Raphael Kubo da Costa (:rakuco)
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-08-24 06:56:37 PST
[EFL] Do not always return the cached frame name.
------- Comment #1 From 2011-08-24 06:57:43 PST -------
Created an attachment (id=104993) [details]
Patch
------- Comment #2 From 2011-08-24 15:59:10 PST -------
(From update of attachment 104993 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=104993&action=review

> Source/WebKit/efl/ewk/ewk_frame.cpp:358
> +    const WTF::String s = sd->frame->tree()->uniqueName();
> +    const WTF::CString cs = s.utf8();

Informal r+.

But, how do you think about making above as one line and giving better name?
------- Comment #3 From 2011-08-25 10:27:02 PST -------
It is possible, but I would rather not do that in this patch, as it is not strictly related to this change.
------- Comment #4 From 2011-09-12 15:48:15 PST -------
(From update of attachment 104993 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=104993&action=review

> Source/WebKit/efl/ewk/ewk_frame.cpp:361
> +    if ((sd->name) && (!strcmp(sd->name, cs.data())))
> +        return sd->name;

WebKit's string classes can do comparison. Please avoid using pure C methods such as strcmp.
------- Comment #5 From 2011-09-13 08:53:24 PST -------
Created an attachment (id=107181) [details]
Use operator== instead of strcmp
------- Comment #6 From 2011-09-13 09:46:14 PST -------
(From update of attachment 107181 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=107181&action=review

> Source/WebKit/efl/ewk/ewk_frame.cpp:357
> +    const WTF::String frameName = sd->frame->tree()->uniqueName();

nit: const here seem unusual.

> Source/WebKit/efl/ewk/ewk_frame.cpp:359
> +    if ((sd->name) && (sd->name == frameName))

nit: extra ()'s
------- Comment #7 From 2011-09-13 10:53:20 PST -------
(From update of attachment 107181 [details])
Clearing flags on attachment: 107181

Committed r95033: <http://trac.webkit.org/changeset/95033>
------- Comment #8 From 2011-09-13 10:53:25 PST -------
All reviewed patches have been landed.  Closing bug.