<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16104</bug_id>
          
          <creation_ts>2007-11-23 14:14:09 -0800</creation_ts>
          <short_desc>[GTK] There is no way to retrieve the frame source</short_desc>
          <delta_ts>2009-04-19 01:18:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>24758</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Christian Dywan">christian</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jmalonzo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62116</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Dywan">christian</who>
    <bug_when>2007-11-23 14:14:09 -0800</bug_when>
    <thetext>There is no way to retrieve the source of a website as a string.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62117</commentid>
    <comment_count>1</comment_count>
      <attachid>17471</attachid>
    <who name="Christian Dywan">christian</who>
    <bug_when>2007-11-23 14:16:05 -0800</bug_when>
    <thetext>Created attachment 17471
Implement webkit_frame_get_string

I went with _string instead of _markup because this has nothing to do with GMarkup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62131</commentid>
    <comment_count>2</comment_count>
      <attachid>17471</attachid>
    <who name="Alp Toker">alp</who>
    <bug_when>2007-11-23 18:14:39 -0800</bug_when>
    <thetext>Comment on attachment 17471
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62285</commentid>
    <comment_count>3</comment_count>
      <attachid>17508</attachid>
    <who name="Christian Dywan">christian</who>
    <bug_when>2007-11-25 08:54:53 -0800</bug_when>
    <thetext>Created attachment 17508
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&apos;t know how long the buffer is valid. And caching behind the scenes doesn&apos;t seem to be a good idea here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62319</commentid>
    <comment_count>4</comment_count>
      <attachid>17508</attachid>
    <who name="Alp Toker">alp</who>
    <bug_when>2007-11-25 14:43:01 -0800</bug_when>
    <thetext>Comment on attachment 17508
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&apos;re following it more closely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62320</commentid>
    <comment_count>5</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2007-11-25 14:43:45 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 17508 [edit])
&gt; The trouble here is that the frame source may be in different formats, and
&gt; copying is not great either. Not sure that returning a const gchar* is a good
&gt; general way of representing this in a way that we can stick to in the long
&gt; term.

s/const//
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74615</commentid>
    <comment_count>6</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2008-03-21 01:31:13 -0700</bug_when>
    <thetext>Is the proposed patch here the same as webkit_web_frame_get_name? If so can we close this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74619</commentid>
    <comment_count>7</comment_count>
    <who name="Christian Dywan">christian</who>
    <bug_when>2008-03-21 05:50:17 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Is the proposed patch here the same as webkit_web_frame_get_name? If so can we
&gt; close this?

Not at all. This is about the source code of the frame in text form. Maybe you confused bugs here?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118056</commentid>
    <comment_count>8</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2009-04-19 01:18:50 -0700</bug_when>
    <thetext>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 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>17471</attachid>
            <date>2007-11-23 14:16:05 -0800</date>
            <delta_ts>2007-11-25 08:54:53 -0800</delta_ts>
            <desc>Implement webkit_frame_get_string</desc>
            <filename>source.diff</filename>
            <type>text/plain</type>
            <size>1347</size>
            <attacher name="Christian Dywan">christian</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9ndGsvQXBpL3dlYmtpdGd0a2ZyYW1lLmNwcAo9PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBX
ZWJLaXQvZ3RrL0FwaS93ZWJraXRndGtmcmFtZS5jcHAJKFJldmlzaW9uIDI3OTg5KQorKysgV2Vi
S2l0L2d0ay9BcGkvd2Via2l0Z3RrZnJhbWUuY3BwCShBcmJlaXRza29waWUpCkBAIC0zNSw2ICsz
NSw3IEBACiAjaW5jbHVkZSAiRnJhbWVMb2FkZXJDbGllbnRHdGsuaCIKICNpbmNsdWRlICJGcmFt
ZVZpZXcuaCIKICNpbmNsdWRlICJIVE1MRnJhbWVPd25lckVsZW1lbnQuaCIKKyNpbmNsdWRlICJ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gZ2NoYXIqCi13ZWJraXRfZnJhbWVfZ2V0X21hcmt1cCAoV2ViS2l0RnJhbWUqIGZy
YW1lKTsKK1dFQktJVF9BUEkgY29uc3QgZ2NoYXIqCit3ZWJraXRfZnJhbWVfZ2V0X3N0cmluZyAo
V2ViS2l0RnJhbWUqIGZyYW1lKTsKIAogV0VCS0lUX0FQSSBnY2hhcioKIHdlYmtpdF9mcmFtZV9n
ZXRfaW5uZXJfdGV4dCAoV2ViS2l0RnJhbWUqIGZyYW1lKTsK
</data>
<flag name="review"
          id="7496"
          type_id="1"
          status="-"
          setter="alp"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>17508</attachid>
            <date>2007-11-25 08:54:53 -0800</date>
            <delta_ts>2007-11-25 14:43:01 -0800</delta_ts>
            <desc>Implement webkit_frame_copy_source</desc>
            <filename>source.diff</filename>
            <type>text/plain</type>
            <size>1771</size>
            <attacher name="Christian Dywan">christian</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9ndGsvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYktpdC9ndGsvQ2hh
bmdlTG9nCShSZXZpc2lvbiAyODAxNikKKysrIFdlYktpdC9ndGsvQ2hhbmdlTG9nCShBcmJlaXRz
a29waWUpCkBAIC0xLDMgKzEsMTUgQEAKKzIwMDctMTEtMjUgIENocmlzdGlhbiBEeXdhbiAgPGNo
cmlzdGlhbkB0d290b2FzdHMuZGU+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BT
ISkuCisKKyAgICAgICAgaHR0cDovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTYx
MDQKKyAgICAgICAgW0dUS10gVGhlcmUgaXMgbm8gd2F5IHRvIHJldHJpZXZlIHRoZSBmcmFtZSBz
b3VyY2UK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ZyYW1lX2dldF9sb2NhdGlvbihXZWJL
aXRGcmFtZSogZnJhbWUpCiB7CiAgICAgZ19yZXR1cm5fdmFsX2lmX2ZhaWwoV0VCS0lUX0lTX0ZS
QU1FKGZyYW1lKSwgTlVMTCk7CkluZGV4OiBXZWJLaXQvZ3RrL0FwaS93ZWJraXRndGtmcmFtZS5o
Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT0KLS0tIFdlYktpdC9ndGsvQXBpL3dlYmtpdGd0a2ZyYW1lLmgJKFJldmlzaW9u
IDI4MDE2KQorKysgV2ViS2l0L2d0ay9BcGkvd2Via2l0Z3RrZnJhbWUuaAkoQXJiZWl0c2tvcGll
KQpAQCAtNzcsNiArNzcsOSBAQAogV0VCS0lUX0FQSSBXZWJLaXRQYWdlKgogd2Via2l0X2ZyYW1l
X2dldF9wYWdlIChXZWJLaXRGcmFtZSogZnJhbWUpOwogCitXRUJLSVRfQVBJIGdjaGFyKgord2Vi
a2l0X2ZyYW1lX2NvcHlfc291cmNlIChXZWJLaXRGcmFtZSogZnJhbWUpOworCiBXRUJLSVRfQVBJ
IGNvbnN0IGdjaGFyKgogd2Via2l0X2ZyYW1lX2dldF9uYW1lIChXZWJLaXRGcmFtZSogZnJhbWUp
OwogCg==
</data>
<flag name="review"
          id="7522"
          type_id="1"
          status="-"
          setter="alp"
    />
          </attachment>
      

    </bug>

</bugzilla>