<?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>27866</bug_id>
          
          <creation_ts>2009-07-30 21:48:48 -0700</creation_ts>
          <short_desc>[requires-fixup] [Qt] Initialize HTML5 Application Cache for QtWebKit to a sensible default</short_desc>
          <delta_ts>2009-08-02 00:59:09 -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>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Laszlo Gombos">laszlo.gombos</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>hausmann</cc>
    
    <cc>kenneth</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>136097</commentid>
    <comment_count>0</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2009-07-30 21:48:48 -0700</bug_when>
    <thetext>QtLauncher is crashing if a page with HTML5 App Cache is visited. This is because the app cache is designed so that WebCore::cacheStorage().setCacheDirectory() needs to be called with a path before the app cache can be used.

As far as I can tell QtWebKit does not call WebCore::cacheStorage().setCacheDirectory to set the path for the app cache neither provides a public API for QtWebKit clients to set the path; the closes I found an internal API called qt_websettings_setOfflineWebApplicationCachePath() which indeed can be used as a work-around.

As I first step I would like to propose that QtWebKit would set the app cache path to a sensible default so that QtWebKit clients does not have to deal with the issue. Later we might want to revisit how can a client set the path puth a public APi if there is a need for that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136099</commentid>
    <comment_count>1</comment_count>
      <attachid>33856</attachid>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2009-07-30 21:59:56 -0700</bug_when>
    <thetext>Created attachment 33856
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136140</commentid>
    <comment_count>2</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-07-31 04:50:05 -0700</bug_when>
    <thetext>We definately need to deal better with both

WebDatabase
WebStorage - Local and Session
OfflineWebApplicationCache

I actually have a patch adding support for that latter sitting around somewhere, but I stopped working on it as our API for these technologies is currently confusing, due to spec renaming.

For instance our WebDatabase is called OfflineStorageDatabase, which leads people to think that it has to do with the appcache or the webstorage. Also, the webdatabase is not limited to offline usage.

I believe that we need to deal with all this as soon as possible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136147</commentid>
    <comment_count>3</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-07-31 05:47:18 -0700</bug_when>
    <thetext>OK, I posted the patch in question

https://bugs.webkit.org/show_bug.cgi?id=27876</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136153</commentid>
    <comment_count>4</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-07-31 06:30:04 -0700</bug_when>
    <thetext>OK, my patch has been committed (r46628), feel free to update your patch. Notice that you can set the max size now as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136155</commentid>
    <comment_count>5</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-07-31 06:32:35 -0700</bug_when>
    <thetext>When you set defaults, please update the documentation of the methods to mention these.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136156</commentid>
    <comment_count>6</comment_count>
      <attachid>33856</attachid>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2009-07-31 06:34:47 -0700</bug_when>
    <thetext>Comment on attachment 33856
proposed patch

Looks good! A minor nitpick, just fix before landing:

&gt; +static void WebKitInitializeApplicationCachePathIfNecessary()

Should be named initializeApplicationCachePathIfNecessary(), ie no WebKit prefix, and start with lower-case.

Actually this is not in the coding style guidelines, but I think the lower case variant is more prevalent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136524</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-08-02 00:59:09 -0700</bug_when>
    <thetext>Landed with my bare hands due to https://bugs.webkit.org/show_bug.cgi?id=27930

Sending        WebKit/qt/Api/qwebpage.cpp
Sending        WebKit/qt/ChangeLog
Transmitting file data ..
Committed revision 46691.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>33856</attachid>
            <date>2009-07-30 21:59:56 -0700</date>
            <delta_ts>2009-07-31 06:34:47 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>patch_27866.txt</filename>
            <type>text/plain</type>
            <size>2639</size>
            <attacher name="Laszlo Gombos">laszlo.gombos</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9xdC9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L3F0L0NoYW5n
ZUxvZwkocmV2aXNpb24gNDY2MjApCisrKyBXZWJLaXQvcXQvQ2hhbmdlTG9nCSh3b3JraW5nIGNv
cHkpCkBAIC0xLDMgKzEsMTQgQEAKKzIwMDktMDctMzAgIExhc3psbyBHb21ib3MgIDxsYXN6bG8u
MS5nb21ib3NAbm9raWEuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEp
LgorCis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dHkoKSkKKyAgICAgICAgYXBwQ2FjaGVQYXRoID0gUURpcjo6aG9tZVBhdGgo
KSArIFFMYXRpbjFTdHJpbmcoIi8uIikgKyBRQ29yZUFwcGxpY2F0aW9uOjphcHBsaWNhdGlvbk5h
bWUoKTsKKworICAgIFdlYkNvcmU6OmNhY2hlU3RvcmFnZSgpLnNldENhY2hlRGlyZWN0b3J5KGFw
cENhY2hlUGF0aCk7CisgICAgaW5pdGlhbGl6ZWQgPSB0cnVlOworI2VuZGlmCit9ICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisKIFFXZWJQYWdlUHJpdmF0
ZTo6UVdlYlBhZ2VQcml2YXRlKFFXZWJQYWdlICpxcSkKICAgICA6IHEocXEpCiAgICAgLCB2aWV3
KDApCkBAIC0yNzEsNiArMjk3LDcgQEAgUVdlYlBhZ2VQcml2YXRlOjpRV2ViUGFnZVByaXZhdGUo
UVdlYlBhZwogICAgIFdlYkNvcmU6OkluaXRpYWxpemVMb2dnaW5nQ2hhbm5lbHNJZk5lY2Vzc2Fy
eSgpOwogICAgIEpTQzo6aW5pdGlhbGl6ZVRocmVhZGluZygpOwogICAgIFdlYkNvcmU6OkZyYW1l
TG9hZGVyOjpzZXRMb2NhbExvYWRQb2xpY3koV2ViQ29yZTo6RnJhbWVMb2FkZXI6OkFsbG93TG9j
YWxMb2Fkc0ZvckxvY2FsQW5kU3Vic3RpdHV0ZURhdGEpOworICAgIFdlYktpdEluaXRpYWxpemVB
cHBsaWNhdGlvbkNhY2hlUGF0aElmTmVjZXNzYXJ5KCk7CiAKICAgICBjaHJvbWVDbGllbnQgPSBu
ZXcgQ2hyb21lQ2xpZW50UXQocSk7CiAgICAgY29udGV4dE1lbnVDbGllbnQgPSBuZXcgQ29udGV4
dE1lbnVDbGllbnRRdCgpOwo=
</data>
<flag name="review"
          id="18051"
          type_id="1"
          status="+"
          setter="vestbo"
    />
          </attachment>
      

    </bug>

</bugzilla>