<?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>70680</bug_id>
          
          <creation_ts>2011-10-22 07:12:08 -0700</creation_ts>
          <short_desc>[WK2][GTK] Application cache directory is incorrectly set</short_desc>
          <delta_ts>2011-11-08 01:07:48 -0800</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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>69523</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Zan Dobersek">zan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mrobinson</cc>
    
    <cc>pnormand</cc>
    
    <cc>svillar</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>488931</commentid>
    <comment_count>0</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-10-22 07:12:08 -0700</bug_when>
    <thetext>In WebProcess::initializeWebProcess the appcache directory of the cache storage is set from the applicationCacheDirectory parameter that is set in WebContext::ensureProcess. Unluckily this parameter holds the return value of WebContext::applicationCacheDirectory() which returns the current cache directory of the cache storage. So it&apos;s basically setting an empty string as the directory, which is wrong.

In WebKit1 the appcache directory is set to be the same as for the web databases - &quot;g_get_user_data_dir()/webkit/databases&quot;. The same should be done in WebKit2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>488932</commentid>
    <comment_count>1</comment_count>
      <attachid>112089</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-10-22 07:17:37 -0700</bug_when>
    <thetext>Created attachment 112089
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494588</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2011-11-02 06:43:00 -0700</bug_when>
    <thetext>Not sure why it&apos;s been done like this in WebKit1 but storing application cache data in a databases directory seems odd. Can we use a new directory for this? At least in WebKit2?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494684</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-11-02 09:54:29 -0700</bug_when>
    <thetext>For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497000</commentid>
    <comment_count>4</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-11-06 23:57:19 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache.

I then propose for application cache directory path to be constructed this way:

&gt; g_build_filename(g_get_user_data_dir(), &quot;webkit&quot;, &quot;applicationcache&quot;, NULL);

Once an agreement is made about which name to use, I&apos;ll upload a new patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497001</commentid>
    <comment_count>5</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-11-07 00:00:24 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache.
&gt; 
&gt; I then propose for application cache directory path to be constructed this way:
&gt; 
&gt; &gt; g_build_filename(g_get_user_data_dir(), &quot;webkit&quot;, &quot;applicationcache&quot;, NULL);
&gt; 
&gt; Once an agreement is made about which name to use, I&apos;ll upload a new patch.

Shouldn&apos;t it be something like this?

g_build_filename(g_get_user_cache_dir(), &quot;webkitgtk&quot;, &quot;applications&quot;, NULL);

or

g_build_filename(g_get_user_cache_dir(), &quot;webkitgtk&quot;, &quot;applicationcache&quot;, NULL);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497004</commentid>
    <comment_count>6</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-11-07 00:11:05 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; (In reply to comment #3)
&gt; &gt; &gt; For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache.
&gt; &gt; 
&gt; &gt; I then propose for application cache directory path to be constructed this way:
&gt; &gt; 
&gt; &gt; &gt; g_build_filename(g_get_user_data_dir(), &quot;webkit&quot;, &quot;applicationcache&quot;, NULL);
&gt; &gt; 
&gt; &gt; Once an agreement is made about which name to use, I&apos;ll upload a new patch.
&gt; 
&gt; Shouldn&apos;t it be something like this?
&gt; 
&gt; g_build_filename(g_get_user_cache_dir(), &quot;webkitgtk&quot;, &quot;applications&quot;, NULL);
&gt; 
&gt; or
&gt; 
&gt; g_build_filename(g_get_user_cache_dir(), &quot;webkitgtk&quot;, &quot;applicationcache&quot;, NULL);

You&apos;re right, this sort of data should be put into user&apos;s cache directory. Regarding the name of bottom directory, I&apos;d prefer &apos;applications&apos; or perhaps nothing, simply putting cached data into ~/.cache/webkitgtk (if application cache is the only cached data). Repeating the word &apos;cache&apos; in the path is not helpful.

Just to note, this again shows just how wrong it is that WebKit1 puts appcache into database directory. If there&apos;s interest/need, I can open another bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497221</commentid>
    <comment_count>7</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-11-07 09:05:37 -0800</bug_when>
    <thetext>(In reply to comment #6)

&gt; Just to note, this again shows just how wrong it is that WebKit1 puts appcache into database directory. If there&apos;s interest/need, I can open another bug.

Yeah, I thnk we should fix both WebKit1 and WebKit2. The name of top-level directory should be &quot;webkitgtk&quot; too, since we no longer pretend to be the only game in town.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497761</commentid>
    <comment_count>8</comment_count>
      <attachid>113995</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-11-07 23:05:39 -0800</bug_when>
    <thetext>Created attachment 113995
Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497762</commentid>
    <comment_count>9</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-11-07 23:07:28 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Created an attachment (id=113995) [details]
&gt; Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications

Sorry for the long name, mixed up flags when uploading through webkit-patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497795</commentid>
    <comment_count>10</comment_count>
      <attachid>113995</attachid>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2011-11-07 23:58:57 -0800</bug_when>
    <thetext>Comment on attachment 113995
Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications

Thanks Zan!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497797</commentid>
    <comment_count>11</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-11-08 00:05:48 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; (From update of attachment 113995 [details])
&gt; Thanks Zan!

Zan do you mind also changing the WebKit2 database directory to relfect the new &quot;webkitgtk&quot; name? I don&apos;t think we can in WebKit1, because it&apos;s an API break.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497833</commentid>
    <comment_count>12</comment_count>
      <attachid>113995</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-08 01:07:44 -0800</bug_when>
    <thetext>Comment on attachment 113995
Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications

Clearing flags on attachment: 113995

Committed r99537: &lt;http://trac.webkit.org/changeset/99537&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497834</commentid>
    <comment_count>13</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-08 01:07:48 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>112089</attachid>
            <date>2011-10-22 07:17:37 -0700</date>
            <delta_ts>2011-11-07 23:04:45 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-70680-20111022161735.patch</filename>
            <type>text/plain</type>
            <size>1501</size>
            <attacher name="Zan Dobersek">zan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTgxOTIKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwppbmRleCA5ZGRkNGFkY2VmN2I4MTRi
MzY3OGRkODVkYjhlNWMwMjBkOTA2YjQzLi4zZGIxMDAzMGUyNGQzNGI5Mjg4YjA2NDI1ZDhhOGNl
NjI5M2ZhNTE1IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKKysrIGIvU291
cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYgQEAKKzIwMTEtMTAtMjIgIFphbiBE
b2JlcnNlayAgPHphbmRvYmVyc2VrQGdtYWlsLmNvbT4KKworICAgICAgICBbV0syXVtHVEtdIEFw
cGxpY2F0aW9uIGNhY2hlIGRpcmVjdG9yeSBpcyBpbmNvcnJlY3RseSBzZXQKKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTcwNjgwCisKKyAgICAgICAgUmV2
aWV3ZWQgYnkgTk9CT0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B7CiAKIFdURjo6U3RyaW5nIFdlYkNvbnRleHQ6OmFwcGxpY2F0aW9uQ2FjaGVEaXJlY3Rvcnko
KQogewotICAgIHJldHVybiBXZWJDb3JlOjpjYWNoZVN0b3JhZ2UoKS5jYWNoZURpcmVjdG9yeSgp
OworICAgIHJldHVybiBwbGF0Zm9ybURlZmF1bHREYXRhYmFzZURpcmVjdG9yeSgpOwogfQogCiB2
b2lkIFdlYkNvbnRleHQ6OnBsYXRmb3JtSW5pdGlhbGl6ZVdlYlByb2Nlc3MoV2ViUHJvY2Vzc0Ny
ZWF0aW9uUGFyYW1ldGVycyYpCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>113995</attachid>
            <date>2011-11-07 23:05:39 -0800</date>
            <delta_ts>2011-11-08 01:07:44 -0800</delta_ts>
            <desc>Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications</desc>
            <filename>bug-70680-20111108080538.patch</filename>
            <type>text/plain</type>
            <size>1623</size>
            <attacher name="Zan Dobersek">zan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTk1MjMKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwppbmRleCA1YWQ1ZjRmODU5MWU1YWIz
Y2ZhZjBhZjA1MmM5MDNlMzBmMzJiOTZjLi4yYTdkMjU3NGU1ZGE3ZmFkNTRiMThkMzMxYWEwODA2
ODE2ZTJkMTU5IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKKysrIGIvU291
cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYgQEAKKzIwMTEtMTEtMDcgIFphbiBE
b2JlcnNlayAgPHphbmRvYmVyc2VrQGdtYWlsLmNvbT4KKworICAgICAgICBbV0syXVtHVEtdIEFw
cGxpY2F0aW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