Summary: | [GTK] There is no way to retrieve the frame source | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Christian Dywan <christian> | ||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED DUPLICATE | ||||||||
Severity: | Normal | CC: | jmalonzo | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Other | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Christian Dywan
2007-11-23 14:14:09 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.
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.
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.
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.
(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// Is the proposed patch here the same as webkit_web_frame_get_name? If so can we close this? (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? 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 *** |