Bug 33880

Summary: [Chromium] Need a way of getting a WebApplicationCacheHost ptr out of the WebKitAPI.
Product: WebKit Reporter: Michael Nordman <michaeln>
Component: WebKit APIAssignee: Michael Nordman <michaeln>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
Attachments:
Description Flags
WebDataSource::applicationCacheHost() getter
none
fix style errors
none
new .h file none

Description Michael Nordman 2010-01-19 21:39:16 PST
Some resource loads are performed without going thru WebCore::ResourceHandle in Chrome. To associate those resource loads with the appropriate appcache, we need to get a ptr to the WebApplicationCacheHost given a WebFrame/WebDataSource.
Comment 1 Michael Nordman 2010-01-19 21:45:29 PST
Created attachment 46975 [details]
WebDataSource::applicationCacheHost() getter
Comment 2 WebKit Review Bot 2010-01-19 21:50:47 PST
Attachment 46975 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebKit/chromium/src/WebDataSourceImpl.cpp:112:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebKit/chromium/src/ApplicationCacheHost.cpp:70:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebKit/chromium/src/ApplicationCacheHost.cpp:265:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 3


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Michael Nordman 2010-01-19 22:00:11 PST
Created attachment 46976 [details]
fix style errors
Comment 4 Darin Fisher (:fishd, Google) 2010-01-19 23:35:07 PST
Comment on attachment 46976 [details]
fix style errors

> Index: WebKit/chromium/public/WebApplicationCacheHost.h
...
> +#if WEBKIT_IMPLEMENTATION
> +    static WebApplicationCacheHost* fromApplicationCacheHost(WebCore::ApplicationCacheHost*);
> +#endif

hmm... how about creating src/ApplicationCacheHostInternal.h, and then
just expose toWebApplicationCacheHost from there?  That way we won't
need any implementation details added to the public header (albeit
in a WEBKIT_IMPLEMENTATION section).

otherwise, this lgtm.
Comment 5 Michael Nordman 2010-01-20 00:19:40 PST
> hmm... how about creating src/ApplicationCacheHostInternal.h, and then
> just expose toWebApplicationCacheHost from there?  That way we won't
> need any implementation details added to the public header (albeit
> in a WEBKIT_IMPLEMENTATION section).

that sounds good

> otherwise, this lgtm.
Comment 6 Michael Nordman 2010-01-20 13:04:52 PST
Created attachment 47054 [details]
new .h file
Comment 7 Michael Nordman 2010-01-21 11:53:45 PST
ping
Comment 8 WebKit Commit Bot 2010-01-21 20:21:27 PST
Comment on attachment 47054 [details]
new .h file

Clearing flags on attachment: 47054

Committed r53671: <http://trac.webkit.org/changeset/53671>
Comment 9 WebKit Commit Bot 2010-01-21 20:21:33 PST
All reviewed patches have been landed.  Closing bug.