<?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>60589</bug_id>
          
          <creation_ts>2011-05-10 15:08:38 -0700</creation_ts>
          <short_desc>[Qt] REGRESSION(r84099): some pages loaded by setHtml cannot use local storage</short_desc>
          <delta_ts>2011-07-22 07:09:32 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P5</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rafael Brandao">rafael.lobo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>rafael.lobo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>401541</commentid>
    <comment_count>0</comment_count>
    <who name="Rafael Brandao">rafael.lobo</who>
    <bug_when>2011-05-10 15:08:38 -0700</bug_when>
    <thetext>Since r84099, pages loaded by QWebFrame::setHtml with blank URLs (empty or &quot;about:blank&quot;), won&apos;t be able to use local storage as they now have a globally unique security origin. When the user loads a page with that, wouldn&apos;t be desired by him that local storage is accessible in such cases? Actually it may be expected that, no matter what url is defined, the user should still be able to use local storage as he is the one setting the html content.

The attachment provides a test case that shows this bug happening. I found it while investigating this bug (https://bugs.webkit.org/show_bug.cgi?id=58847), but I think the discussion of how this should work should be moved to here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401544</commentid>
    <comment_count>1</comment_count>
      <attachid>93019</attachid>
    <who name="Rafael Brandao">rafael.lobo</who>
    <bug_when>2011-05-10 15:09:28 -0700</bug_when>
    <thetext>Created attachment 93019
This creates a test case that shows this bug happening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401603</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-05-10 16:04:00 -0700</bug_when>
    <thetext>I don&apos;t really agree with the expected behavior you suggest.

The spec of local storage is making strong assumption about the origin, for security or for data consistency.

I think it is reasonable that the API force you to define clearly the origin in order to use local storage.

I would say this bug is invalid, and the patch you made for 58847 might be the right solution for the failing test.

Any opinion?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>402266</commentid>
    <comment_count>3</comment_count>
    <who name="Rafael Brandao">rafael.lobo</who>
    <bug_when>2011-05-11 14:11:24 -0700</bug_when>
    <thetext>I think you&apos;re correct. The least that could be done, I guess, is to change QWebFrame documentation about this method. Now it says: &quot;(...) baseUrl is optional and used to resolve relative URLs in the document, such as referenced images or stylesheets. (...)&quot;. Shouldn&apos;t we mention that it is important to determine its security origin or at least mention that he should provide a &quot;valid url&quot; if he wants to use local storage?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>402289</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-05-11 14:31:08 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Shouldn&apos;t we mention that it is important to determine its security origin or at least mention that he should provide a &quot;valid url&quot; if he wants to use local storage?

That could be good if that does not mean a much more complicated documentation.

If you document that, you should keep it generic. Quite a few HTML 5 features depend on a valid origin (geolocation&apos;s authorizations for example).

If you find some good way to express the issue in the doc, I am all for it :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>403059</commentid>
    <comment_count>5</comment_count>
    <who name="Rafael Brandao">rafael.lobo</who>
    <bug_when>2011-05-12 12:11:55 -0700</bug_when>
    <thetext>I had no idea that it was also used in many other features. I&apos;ll take a look on HTML5 specs to learn more about it, but I can imagine how hard it may be to keep the documentation simple but more informative.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>403066</commentid>
    <comment_count>6</comment_count>
    <who name="Rafael Brandao">rafael.lobo</who>
    <bug_when>2011-05-12 12:15:47 -0700</bug_when>
    <thetext>So this bug will be marked as invalid, but we will still have the documentation problem. Should that be reported as another bug? Not sure if we could call this a bug (in documentation). In this case I&apos;ll leave it up to you to decide. :P</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>440936</commentid>
    <comment_count>7</comment_count>
    <who name="Rafael Brandao">rafael.lobo</who>
    <bug_when>2011-07-22 07:09:32 -0700</bug_when>
    <thetext>Closing it as &apos;invalid&apos;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>93019</attachid>
            <date>2011-05-10 15:09:28 -0700</date>
            <delta_ts>2011-05-10 15:09:28 -0700</delta_ts>
            <desc>This creates a test case that shows this bug happening.</desc>
            <filename>create-test-sethtml.diff</filename>
            <type>text/plain</type>
            <size>1734</size>
            <attacher name="Rafael Brandao">rafael.lobo</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvcXQvdGVzdHMvcXdlYnBhZ2UvdHN0X3F3ZWJwYWdl
LmNwcCBiL1NvdXJjZS9XZWJLaXQvcXQvdGVzdHMvcXdlYnBhZ2UvdHN0X3F3ZWJwYWdlLmNwcApp
bmRleCBiNGMxMTkxLi4yMTE4MmRhIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0L3F0L3Rlc3Rz
L3F3ZWJwYWdlL3RzdF9xd2VicGFnZS5jcHAKKysrIGIvU291cmNlL1dlYktpdC9xdC90ZXN0cy9x
d2VicGFnZS90c3RfcXdlYnBhZ2UuY3Bw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