Bug 149149 - Make the enum IDBKey::Type into a utility enum class
Summary: Make the enum IDBKey::Type into a utility enum class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-14 21:00 PDT by Brady Eidson
Modified: 2015-09-15 08:53 PDT (History)
4 users (show)

See Also:


Attachments
Patch v1 (26.71 KB, patch)
2015-09-14 21:02 PDT, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2015-09-14 21:00:27 PDT
Make the enum IDBKey::Type into a utility enum class

It belongs in the IndexedDB.h utility header.
Comment 1 Brady Eidson 2015-09-14 21:02:43 PDT
Created attachment 261167 [details]
Patch v1
Comment 2 WebKit Commit Bot 2015-09-14 21:05:20 PDT
Attachment 261167 [details] did not pass style-queue:


ERROR: Source/WebCore/Modules/indexeddb/IDBKey.h:146:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: Source/WebCore/Modules/indexeddb/IDBKey.h:147:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: Source/WebCore/Modules/indexeddb/IDBKey.h:148:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: Source/WebCore/Modules/indexeddb/IDBKey.h:149:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 4 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alex Christensen 2015-09-15 08:18:45 PDT
Comment on attachment 261167 [details]
Patch v1

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

r=me

> Source/WebCore/Modules/indexeddb/IDBKey.h:37
> +using WebCore::IndexedDB::KeyType;

You shouldn't need this.  You have KeyType:: everywhere.

> Source/WebCore/Modules/indexeddb/IndexedDB.h:63
> +    Max = -1,

Why not put Max at the end?

> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1922
>          // MaxType and MinType are only used for comparison to other keys.

change

> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1958
>          // MaxType and MinType are only used for comparison to other keys.

Change comment, too
Comment 4 Brady Eidson 2015-09-15 08:48:27 PDT
(In reply to comment #3)
> Comment on attachment 261167 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=261167&action=review
> 
> r=me
> 
> > Source/WebCore/Modules/indexeddb/IDBKey.h:37
> > +using WebCore::IndexedDB::KeyType;
> 
> You shouldn't need this.  You have KeyType:: everywhere.

Except I don't have IndexedDB everywhere, and don't want to pull in the entire namespace.

> 
> > Source/WebCore/Modules/indexeddb/IndexedDB.h:63
> > +    Max = -1,
> 
> Why not put Max at the end?

There's actually a spec-defined comparison order for IDB keys, and for many reasons we put the enums in reverse order.

> > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1922
> >          // MaxType and MinType are only used for comparison to other keys.
> 
> change
> 
> > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1958
> >          // MaxType and MinType are only used for comparison to other keys.
> 
> Change comment, too

Oh thanks!
Comment 5 Brady Eidson 2015-09-15 08:53:50 PDT
https://trac.webkit.org/changeset/189809