Changeset 93617 in webkit
- Timestamp:
- Aug 23, 2011 11:27:51 AM (13 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r93611 r93617 1 2011-08-23 Raphael Kubo da Costa <kubo@profusion.mobi> 2 3 [EFL] Do not treat valid cases in ewk_frame_child_add() as failures. 4 https://bugs.webkit.org/show_bug.cgi?id=66692 5 6 Rubber-stamped by Kenneth Rohde Christiansen. 7 8 Frame::page() and FrameTree::parent() returning 0 were being considered 9 failure cases, however it is possible for them to return 0 when some 10 arbitrary JavaScript is run. 11 12 The function's return type has been changed to make it easier to convey 13 these cases to the caller (which is only ewk_view_frame_create). 14 15 This should make tests like 16 fast/dom/null-page-show-modal-dialog-crash.html stop outputting 17 erroneous messages to stderr. 18 19 * ewk/ewk_frame.cpp: 20 (ewk_frame_child_add): 21 * ewk/ewk_private.h: 22 1 23 2011-08-23 Leandro Pereira <leandro@profusion.mobi> 2 24 -
trunk/Source/WebKit/efl/ewk/ewk_frame.cpp
r93410 r93617 1132 1132 * Adds child to the frame. 1133 1133 */ 1134 E vas_Object *ewk_frame_child_add(Evas_Object *o, WTF::PassRefPtr<WebCore::Frame> child, const WTF::String &name, const WebCore::KURL &url, const WTF::String &referrer)1134 Eina_Bool ewk_frame_child_add(Evas_Object *o, WTF::PassRefPtr<WebCore::Frame> child, const WTF::String &name, const WebCore::KURL &url, const WTF::String &referrer) 1135 1135 { 1136 1136 EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0); … … 1142 1142 if (!frame) { 1143 1143 ERR("Could not create ewk_frame object."); 1144 return 0;1144 return EINA_FALSE; 1145 1145 } 1146 1146 … … 1154 1154 if (!ewk_frame_init(frame, sd->view, cf)) { 1155 1155 evas_object_del(frame); 1156 return 0;1156 return EINA_FALSE; 1157 1157 } 1158 1158 snprintf(buf, sizeof(buf), "EWK_Frame:child/%s", name.utf8().data()); … … 1161 1161 evas_object_show(frame); 1162 1162 1163 if (!cf->page()) 1164 goto died; 1163 // The creation of the frame may have run arbitrary JavaScript that removed it from the page already. 1164 if (!cf->page()) { 1165 evas_object_del(frame); 1166 return EINA_TRUE; 1167 } 1165 1168 1166 1169 sd->frame->loader()->loadURLIntoChildFrame(url, referrer, cf); 1167 if (!cf->tree()->parent()) 1168 goto died; 1170 1171 // The frame's onload handler may have removed it from the document. 1172 // See fast/dom/null-page-show-modal-dialog-crash.html for an example. 1173 if (!cf->tree()->parent()) { 1174 evas_object_del(frame); 1175 return EINA_TRUE; 1176 } 1169 1177 1170 1178 // TODO: announce frame was created? 1171 return frame; 1172 1173 died: 1174 CRITICAL("does this work: BEGIN"); 1175 ewk_frame_core_gone(frame); // CONFIRM 1176 evas_object_del(frame); // CONFIRM 1177 CRITICAL("does this work: END"); 1178 return 0; 1179 return EINA_TRUE; 1179 1180 } 1180 1181 -
trunk/Source/WebKit/efl/ewk/ewk_private.h
r93602 r93617 158 158 Evas_Object *ewk_frame_add(Evas *e); 159 159 Eina_Bool ewk_frame_init(Evas_Object *o, Evas_Object *view, WebCore::Frame *frame); 160 E vas_Object *ewk_frame_child_add(Evas_Object *o, WTF::PassRefPtr<WebCore::Frame> child, const WTF::String &name, const WebCore::KURL &url, const WTF::String &referrer);160 Eina_Bool ewk_frame_child_add(Evas_Object *o, WTF::PassRefPtr<WebCore::Frame> child, const WTF::String &name, const WebCore::KURL &url, const WTF::String &referrer); 161 161 162 162 WebCore::Frame *ewk_frame_core_get(const Evas_Object *o);
Note: See TracChangeset
for help on using the changeset viewer.