Bug 23844

Summary: Storage panel should show details about parent domains
Product: WebKit Reporter: Anthony Ricaud <rik>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, kmccullough, mike, timothy, yael
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Testcase
none
Use securityOrigin->host() instead of securityOrigin->domain() for display timothy: review+

Description Anthony Ricaud 2009-02-09 03:14:32 PST
The new details about sessionStorage and localStorage are really cool.

It would be more powerful if it can show the parent domains.

The use case is a website with URLs like pseudo.example.org. Storage is done on example.org in order to access it on every subdomains (by changing the document.domain property). When on pseudo.example.org, the web inspector should list storages on pseudo.example.org and example.org.
Comment 1 Yael 2009-02-09 17:12:00 PST
(In reply to comment #0)
> The new details about sessionStorage and localStorage are really cool.
> 
> It would be more powerful if it can show the parent domains.
> 
> The use case is a website with URLs like pseudo.example.org. Storage is done on
> example.org in order to access it on every subdomains (by changing the
> document.domain property). When on pseudo.example.org, the web inspector should
> list storages on pseudo.example.org and example.org.
> 

Do you have a URL to a test case that I could use? I could not create a test case in which WebKit used the parent url instead of the page url.
thanks!
Comment 2 Anthony Ricaud 2009-02-10 06:53:35 PST
Created attachment 27518 [details]
Testcase

Creating the testcase, I've seen a related bug. When you open the inspector, it uses the actual document.domain (that can be modified with JS) to chose which localStorage is viewed. I think the best is to show every subdomain possible.
Comment 3 Yael 2009-02-27 07:42:31 PST
According to Anne Van Kesteren (I asked on IRC), localStorage should not be affected by document.domain.
It was my mistake to get the host name from the Security Origin instead of the URL.
I will fix that shortly. The same should be for databases.
Comment 4 Yael 2009-02-28 10:35:58 PST
Created attachment 28120 [details]
Use securityOrigin->host() instead of securityOrigin->domain() for display  

databases, localStorage and sessionStorage are all grouped by databaseIdentifier. And that is based on the host, scheme and port, it is more accurate to display the host, and not the domain.
Comment 5 Timothy Hatcher 2009-03-01 08:43:03 PST
Landed in r41334.