Bug 112571 - [Chromium] Create WebFileSystemType enum to allow easier filesystem refactoring
Summary: [Chromium] Create WebFileSystemType enum to allow easier filesystem refactoring
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Pilgrim (Google)
URL:
Keywords:
Depends on:
Blocks: 106829
  Show dependency treegraph
 
Reported: 2013-03-18 07:19 PDT by Mark Pilgrim (Google)
Modified: 2013-03-18 13:28 PDT (History)
7 users (show)

See Also:


Attachments
WIP Patch (22.57 KB, patch)
2013-03-18 07:22 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (27.40 KB, patch)
2013-03-18 10:51 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (27.55 KB, patch)
2013-03-18 11:01 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (31.45 KB, patch)
2013-03-18 12:22 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Pilgrim (Google) 2013-03-18 07:19:53 PDT
[Chromium] Create WebFileSystemType enum to allow easier filesystem refactoring
Comment 1 Mark Pilgrim (Google) 2013-03-18 07:22:40 PDT
Created attachment 193557 [details]
WIP Patch
Comment 2 Mark Pilgrim (Google) 2013-03-18 07:23:26 PDT
Comment on attachment 193557 [details]
WIP Patch

Pretty sure this will break Chromium build. Still working on it.
Comment 3 WebKit Review Bot 2013-03-18 07:25:58 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 4 Mark Pilgrim (Google) 2013-03-18 10:24:58 PDT
Nope, this definitely needs to be behind a #define so we don't break Chromium.
Comment 5 Mark Pilgrim (Google) 2013-03-18 10:51:45 PDT
Created attachment 193603 [details]
Patch
Comment 6 Mark Pilgrim (Google) 2013-03-18 10:52:57 PDT
Comment on attachment 193603 [details]
Patch

OK, this version puts all changes behind #ifdefs so we can make the changes in Chromium and then turn on everything at once.
Comment 7 Adam Barth 2013-03-18 10:54:56 PDT
Comment on attachment 193603 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=193603&action=review

> Source/Platform/chromium/public/WebFileSystemType.h:35
> +// #define USE_NEW_WEBFILESYSTEMTYPE

USE_NEW_WEBFILESYSTEMTYPE -> WEBKIT_USE_NEW_WEBFILESYSTEMTYPE

> Source/WebKit/chromium/public/WebCommonWorkerClient.h:67
> +#ifdef USE_NEW_WEBFILESYSTEMTYPE
> +    virtual void openFileSystem(WebFileSystemType, long long size, bool create, WebFileSystemCallbacks*)
> +#else
>      virtual void openFileSystem(WebFileSystem::Type, long long size, bool create, WebFileSystemCallbacks*)
> +#endif

Can you use a typedef to avoid adding this ifdef everywhere?
Comment 8 Mark Pilgrim (Google) 2013-03-18 10:57:58 PDT
(In reply to comment #7)
> (From update of attachment 193603 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=193603&action=review
> 
> > Source/Platform/chromium/public/WebFileSystemType.h:35
> > +// #define USE_NEW_WEBFILESYSTEMTYPE
> 
> USE_NEW_WEBFILESYSTEMTYPE -> WEBKIT_USE_NEW_WEBFILESYSTEMTYPE

Grr.

> > Source/WebKit/chromium/public/WebCommonWorkerClient.h:67
> > +#ifdef USE_NEW_WEBFILESYSTEMTYPE
> > +    virtual void openFileSystem(WebFileSystemType, long long size, bool create, WebFileSystemCallbacks*)
> > +#else
> >      virtual void openFileSystem(WebFileSystem::Type, long long size, bool create, WebFileSystemCallbacks*)
> > +#endif
> 
> Can you use a typedef to avoid adding this ifdef everywhere?

Couldn't figure it out. Enlisted help from several C++ gurus. Enums can't define casting operators, enum names don't match because of WebKit* prefixing. The whole mess will be resolved after one Chromium patch lands, so it's not really worth any more time trying to be clever.
Comment 9 Mark Pilgrim (Google) 2013-03-18 11:01:11 PDT
Created attachment 193607 [details]
Patch
Comment 10 Mark Pilgrim (Google) 2013-03-18 11:01:45 PDT
Comment on attachment 193607 [details]
Patch

Now with WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
Comment 11 Adam Barth 2013-03-18 11:53:17 PDT
Comment on attachment 193607 [details]
Patch

ok
Comment 12 Mark Pilgrim (Google) 2013-03-18 12:13:49 PDT
Comment on attachment 193607 [details]
Patch

Nope, turns out there's two more files (in DumpRenderTree) that need munging.
Comment 13 Mark Pilgrim (Google) 2013-03-18 12:22:20 PDT
Created attachment 193627 [details]
Patch
Comment 14 Mark Pilgrim (Google) 2013-03-18 12:23:01 PDT
Comment on attachment 193627 [details]
Patch

Now with necessary DumpRenderTree changes.
Comment 15 WebKit Review Bot 2013-03-18 13:28:47 PDT
Comment on attachment 193627 [details]
Patch

Clearing flags on attachment: 193627

Committed r146111: <http://trac.webkit.org/changeset/146111>
Comment 16 WebKit Review Bot 2013-03-18 13:28:52 PDT
All reviewed patches have been landed.  Closing bug.