RESOLVED DUPLICATE of bug 24758 16104
[GTK] There is no way to retrieve the frame source
https://bugs.webkit.org/show_bug.cgi?id=16104
Summary [GTK] There is no way to retrieve the frame source
Christian Dywan
Reported 2007-11-23 14:14:09 PST
There is no way to retrieve the source of a website as a string.
Attachments
Implement webkit_frame_get_string (1.32 KB, patch)
2007-11-23 14:16 PST, Christian Dywan
alp: review-
Implement webkit_frame_copy_source (1.73 KB, patch)
2007-11-25 08:54 PST, Christian Dywan
alp: review-
Christian Dywan
Comment 1 2007-11-23 14:16:05 PST
Created attachment 17471 [details] Implement webkit_frame_get_string I went with _string instead of _markup because this has nothing to do with GMarkup.
Alp Toker
Comment 2 2007-11-23 18:14:39 PST
Comment on attachment 17471 [details] Implement webkit_frame_get_string We need to figure out what to do about string lifecycle first. There is no indication of how long the buffer will be valid here, if at all. Looks wrong to me.
Christian Dywan
Comment 3 2007-11-25 08:54:53 PST
Created attachment 17508 [details] Implement webkit_frame_copy_source I changed the name to avoid some confusion. As _copy suggests the function now allocates a new string because we don't know how long the buffer is valid. And caching behind the scenes doesn't seem to be a good idea here.
Alp Toker
Comment 4 2007-11-25 14:43:01 PST
Comment on attachment 17508 [details] Implement webkit_frame_copy_source The trouble here is that the frame source may be in different formats, and copying is not great either. Not sure that returning a const gchar* is a good general way of representing this in a way that we can stick to in the long term. We should try to do something more like the ObjC API now that we're following it more closely.
Alp Toker
Comment 5 2007-11-25 14:43:45 PST
(In reply to comment #4) > (From update of attachment 17508 [details] [edit]) > The trouble here is that the frame source may be in different formats, and > copying is not great either. Not sure that returning a const gchar* is a good > general way of representing this in a way that we can stick to in the long > term. s/const//
Jan Alonzo
Comment 6 2008-03-21 01:31:13 PDT
Is the proposed patch here the same as webkit_web_frame_get_name? If so can we close this?
Christian Dywan
Comment 7 2008-03-21 05:50:17 PDT
(In reply to comment #6) > Is the proposed patch here the same as webkit_web_frame_get_name? If so can we > close this? Not at all. This is about the source code of the frame in text form. Maybe you confused bugs here?
Jan Alonzo
Comment 8 2009-04-19 01:18:50 PDT
Bug #24758 implements a WebDataSource which we can use to get the source of a frame. Though, it also uses const gchar* to return the source, feedback would be appreciated on what is best to represent the source in that bug report. Thanks. *** This bug has been marked as a duplicate of 24758 ***
Note You need to log in before you can comment on or make changes to this bug.