Title: [95033] trunk/Source/WebKit/efl
- Revision
- 95033
- Author
- [email protected]
- Date
- 2011-09-13 10:54:15 -0700 (Tue, 13 Sep 2011)
Log 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 <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/efl/ChangeLog (95032 => 95033)
--- trunk/Source/WebKit/efl/ChangeLog 2011-09-13 17:46:41 UTC (rev 95032)
+++ trunk/Source/WebKit/efl/ChangeLog 2011-09-13 17:54:15 UTC (rev 95033)
@@ -1,3 +1,19 @@
+2011-09-13 Raphael Kubo da Costa <[email protected]>
+
+ [EFL] Do not always return the cached frame name.
+ https://bugs.webkit.org/show_bug.cgi?id=66856
+
+ 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):
+
2011-09-12 Flavio Ceolin <[email protected]>
Reviewed by Martin Robinson.
Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (95032 => 95033)
--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp 2011-09-13 17:46:41 UTC (rev 95032)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp 2011-09-13 17:54:15 UTC (rev 95033)
@@ -349,17 +349,18 @@
{
EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
- if (sd->name)
- return sd->name;
-
if (!sd->frame) {
ERR("could not get name of uninitialized frame.");
return 0;
}
- WTF::String s = sd->frame->tree()->uniqueName();
- WTF::CString cs = s.utf8();
- sd->name = eina_stringshare_add_length(cs.data(), cs.length());
+ const WTF::String frameName = sd->frame->tree()->uniqueName();
+
+ if ((sd->name) && (sd->name == frameName))
+ return sd->name;
+
+ eina_stringshare_replace_length(&(sd->name), frameName.utf8().data(), frameName.length());
+
return sd->name;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes