<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160687] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160687">160687</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2013-12-16 18:27:01 -0800 (Mon, 16 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove EnumClass.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=125820

Reviewed by Darin Adler.

Source/WebCore:

Replace uses of ENUM_CLASS with real enum class declarations.

* Modules/webdatabase/DatabaseBasicTypes.h:
* Modules/webdatabase/DatabaseError.h:
* Modules/webdatabase/SQLTransactionState.h:
* bindings/js/JSSubtleCryptoCustom.cpp:
* bindings/js/SerializedScriptValue.cpp:
* crypto/CryptoAlgorithmIdentifier.h:
* crypto/CryptoAlgorithmParameters.h:
* crypto/CryptoKey.h:
* crypto/CryptoKeyData.h:
* crypto/CryptoKeyType.h:
* crypto/keys/CryptoKeyDataRSAComponents.h:
* inspector/InspectorTimelineAgent.h:

Source/WTF:

All compilers we build on now support real strongly typed enums, so we can remove the ENUM_CLASS version.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CheckedArithmetic.h:
* wtf/EnumClass.h: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFGNUmakefilelistam">trunk/Source/WTF/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWTFWTFvcxprojWTFvcxproj">trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj</a></li>
<li><a href="#trunkSourceWTFWTFvcxprojWTFvcxprojfilters">trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters</a></li>
<li><a href="#trunkSourceWTFWTFxcodeprojprojectpbxproj">trunk/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWTFwtfCheckedArithmetich">trunk/Source/WTF/wtf/CheckedArithmetic.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseBasicTypesh">trunk/Source/WebCore/Modules/webdatabase/DatabaseBasicTypes.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseErrorh">trunk/Source/WebCore/Modules/webdatabase/DatabaseError.h</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLTransactionStateh">trunk/Source/WebCore/Modules/webdatabase/SQLTransactionState.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsSerializedScriptValuecpp">trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmIdentifierh">trunk/Source/WebCore/crypto/CryptoAlgorithmIdentifier.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoAlgorithmParametersh">trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoKeyh">trunk/Source/WebCore/crypto/CryptoKey.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoKeyDatah">trunk/Source/WebCore/crypto/CryptoKeyData.h</a></li>
<li><a href="#trunkSourceWebCorecryptoCryptoKeyTypeh">trunk/Source/WebCore/crypto/CryptoKeyType.h</a></li>
<li><a href="#trunkSourceWebCorecryptokeysCryptoKeyDataRSAComponentsh">trunk/Source/WebCore/crypto/keys/CryptoKeyDataRSAComponents.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorTimelineAgenth">trunk/Source/WebCore/inspector/InspectorTimelineAgent.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtfEnumClassh">trunk/Source/WTF/wtf/EnumClass.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WTF/ChangeLog        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2013-12-16  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Remove EnumClass.h from WTF
+        https://bugs.webkit.org/show_bug.cgi?id=125820
+
+        Reviewed by Darin Adler.
+
+        All compilers we build on now support real strongly typed enums, so we can remove the ENUM_CLASS version.
+
+        * WTF.vcxproj/WTF.vcxproj:
+        * WTF.vcxproj/WTF.vcxproj.filters:
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/CheckedArithmetic.h:
+        * wtf/EnumClass.h: Removed.
+
</ins><span class="cx"> 2013-12-16  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Remove dead code after conversion to VS2013
</span></span></pre></div>
<a id="trunkSourceWTFGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/GNUmakefile.list.am (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/GNUmakefile.list.am        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WTF/GNUmakefile.list.am        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx">     Source/WTF/wtf/DynamicAnnotations.cpp \
</span><span class="cx">     Source/WTF/wtf/DynamicAnnotations.h \
</span><span class="cx">     Source/WTF/wtf/Encoder.h \
</span><del>-    Source/WTF/wtf/EnumClass.h \
</del><span class="cx">     Source/WTF/wtf/ExportMacros.h \
</span><span class="cx">     Source/WTF/wtf/FastBitVector.cpp \
</span><span class="cx">     Source/WTF/wtf/FastBitVector.h \
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -193,7 +193,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\dtoa\utils.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\DynamicAnnotations.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\Encoder.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\wtf\EnumClass.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\FastBitVector.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\FastMalloc.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\FeatureDefines.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWTFWTFvcxprojWTFvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -423,9 +423,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\Encoder.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;wtf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\wtf\EnumClass.h&quot;&gt;
-      &lt;Filter&gt;wtf&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\wtf\FastBitVector.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;wtf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -64,7 +64,6 @@
</span><span class="cx">                 2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0EE18115C38004DBA70 /* RunLoopCF.cpp */; };
</span><span class="cx">                 2CDED0F318115C85004DBA70 /* RunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0F118115C85004DBA70 /* RunLoop.cpp */; };
</span><span class="cx">                 2CDED0F418115C85004DBA70 /* RunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CDED0F218115C85004DBA70 /* RunLoop.h */; };
</span><del>-                44F66008171AFAE600E4AD19 /* EnumClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 44F66007171AFAA900E4AD19 /* EnumClass.h */; };
</del><span class="cx">                 7E29C33E15FFD79B00516D61 /* ObjcRuntimeExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E29C33D15FFD79B00516D61 /* ObjcRuntimeExtras.h */; };
</span><span class="cx">                 8134013815B092FD001FF0B8 /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8134013615B092FD001FF0B8 /* Base64.cpp */; };
</span><span class="cx">                 8134013915B092FD001FF0B8 /* Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8134013715B092FD001FF0B8 /* Base64.h */; };
</span><span class="lines">@@ -331,7 +330,6 @@
</span><span class="cx">                 2CDED0F118115C85004DBA70 /* RunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoop.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2CDED0F218115C85004DBA70 /* RunLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunLoop.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 44DEE74A152274BB00C6EC37 /* iOS.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = iOS.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                44F66007171AFAA900E4AD19 /* EnumClass.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnumClass.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 5D247B6214689B8600E78B76 /* libWTF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 5D247B6E14689C4700E78B76 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5D247B7014689C4700E78B76 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -690,7 +688,6 @@
</span><span class="cx">                                 A8A47299151A825A004123FF /* DynamicAnnotations.cpp */,
</span><span class="cx">                                 A8A4729A151A825A004123FF /* DynamicAnnotations.h */,
</span><span class="cx">                                 A8A4729E151A825A004123FF /* Encoder.h */,
</span><del>-                                44F66007171AFAA900E4AD19 /* EnumClass.h */,
</del><span class="cx">                                 A8A4729F151A825A004123FF /* ExportMacros.h */,
</span><span class="cx">                                 0F885E0E1845AE9F00F1E3FA /* FastBitVector.cpp */,
</span><span class="cx">                                 0FD81AC4154FB22E00983E72 /* FastBitVector.h */,
</span><span class="lines">@@ -996,7 +993,6 @@
</span><span class="cx">                                 A8A473BB151A825B004123FF /* dtoa.h in Headers */,
</span><span class="cx">                                 A8A473BD151A825B004123FF /* DynamicAnnotations.h in Headers */,
</span><span class="cx">                                 A8A473C0151A825B004123FF /* Encoder.h in Headers */,
</span><del>-                                44F66008171AFAE600E4AD19 /* EnumClass.h in Headers */,
</del><span class="cx">                                 A8A473C1151A825B004123FF /* ExportMacros.h in Headers */,
</span><span class="cx">                                 A8A473B4151A825B004123FF /* fast-dtoa.h in Headers */,
</span><span class="cx">                                 0FD81AC5154FB22E00983E72 /* FastBitVector.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWTFwtfCheckedArithmetich"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CheckedArithmetic.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CheckedArithmetic.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WTF/wtf/CheckedArithmetic.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #define CheckedArithmetic_h
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><del>-#include &lt;wtf/EnumClass.h&gt;
</del><span class="cx"> 
</span><span class="cx"> #include &lt;limits&gt;
</span><span class="cx"> #include &lt;stdint.h&gt;
</span><span class="lines">@@ -67,12 +66,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CheckedState)
-{
</del><ins>+enum class CheckedState {
</ins><span class="cx">     DidOverflow,
</span><span class="cx">     DidNotOverflow
</span><del>-} ENUM_CLASS_END(CheckedState);
-    
</del><ins>+};
+
</ins><span class="cx"> class CrashOnOverflow {
</span><span class="cx"> public:
</span><span class="cx">     static NO_RETURN_DUE_TO_CRASH void overflowed()
</span></span></pre></div>
<a id="trunkSourceWTFwtfEnumClassh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WTF/wtf/EnumClass.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/EnumClass.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WTF/wtf/EnumClass.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -1,134 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef WTF_EnumClass_h
-#define WTF_EnumClass_h
-
-#include &lt;wtf/Compiler.h&gt;
-
-namespace WTF {
-
-// How to define a type safe enum list using the ENUM_CLASS macros?
-// ===============================================================
-// To get an enum list like this:
-//
-//     enum class MyEnums {
-//         Value1,
-//         Value2,
-//         ...
-//         ValueN
-//     };
-//
-// ... write this:
-//
-//     ENUM_CLASS(MyEnums) {
-//         Value1,
-//         Value2,
-//         ...
-//         ValueN
-//     } ENUM_CLASS_END(MyEnums);
-//
-// The ENUM_CLASS macros will use C++11's enum class if the compiler supports it.
-// Otherwise, it will use the EnumClass template below.
-
-#if COMPILER_SUPPORTS(CXX_STRONG_ENUMS)
-
-#define ENUM_CLASS(__enumName) \
-    enum class __enumName
-
-#define ENUM_CLASS_END(__enumName)
-
-#else // !COMPILER_SUPPORTS(CXX_STRONG_ENUMS)
-
-// How to define a type safe enum list using the EnumClass template?
-// ================================================================
-// Definition should be a struct that encapsulates an enum list.
-// The enum list should be names Enums.
-//
-// Here's an example of how to define a type safe enum named MyEnum using
-// the EnumClass template:
-//
-//     struct MyEnumDefinition {
-//         enum Enums {
-//             ValueDefault,
-//             Value1,
-//             ...
-//             ValueN
-//         };
-//     };
-//     typedef EnumClass&lt;MyEnumDefinition, MyEnumDefinition::ValueDefault&gt; MyEnum;
-//
-// With that, you can now use MyEnum enum values as follow:
-//
-//     MyEnum value1; // value1 is assigned MyEnum::ValueDefault by default.
-//     MyEnum value2 = MyEnum::Value1; // value2 is assigned MyEnum::Value1;
-
-template &lt;typename Definition&gt;
-class EnumClass : public Definition {
-    typedef enum Definition::Enums Value;
-public:
-    ALWAYS_INLINE EnumClass() { }
-    ALWAYS_INLINE EnumClass(Value value) : m_value(value) { }
-
-    ALWAYS_INLINE Value value() const { return m_value; }
-
-    ALWAYS_INLINE bool operator==(const EnumClass other) { return m_value == other.m_value; }
-    ALWAYS_INLINE bool operator!=(const EnumClass other) { return m_value != other.m_value; }
-    ALWAYS_INLINE bool operator&lt;(const EnumClass other) { return m_value &lt; other.m_value; }
-    ALWAYS_INLINE bool operator&lt;=(const EnumClass other) { return m_value &lt;= other.m_value; }
-    ALWAYS_INLINE bool operator&gt;(const EnumClass other) { return m_value &gt; other.m_value; }
-    ALWAYS_INLINE bool operator&gt;=(const EnumClass other) { return m_value &gt;= other.m_value; }
-
-    ALWAYS_INLINE bool operator==(const Value value) { return m_value == value; }
-    ALWAYS_INLINE bool operator!=(const Value value) { return m_value != value; }
-    ALWAYS_INLINE bool operator&lt;(const Value value) { return m_value &lt; value; }
-    ALWAYS_INLINE bool operator&lt;=(const Value value) { return m_value &lt;= value; }
-    ALWAYS_INLINE bool operator&gt;(const Value value) { return m_value &gt; value; }
-    ALWAYS_INLINE bool operator&gt;=(const Value value) { return m_value &gt;= value; }
-
-    ALWAYS_INLINE operator Value() { return m_value; }
-
-private:
-    Value m_value;
-};
-
-#define ENUM_CLASS(__enumName) \
-    struct __enumName ## Definition { \
-        enum Enums
-
-#define ENUM_CLASS_END(__enumName) \
-        ; \
-    }; \
-    typedef EnumClass&lt; __enumName ## Definition &gt; __enumName
-
-#endif // !COMPILER_SUPPORTS(CXX_STRONG_ENUMS)
-
-} // namespace WTF
-
-#if !COMPILER_SUPPORTS(CXX_STRONG_ENUMS)
-using WTF::EnumClass;
-#endif
-
-#endif // WTF_EnumClass_h
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/ChangeLog        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2013-12-16  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Remove EnumClass.h from WTF
+        https://bugs.webkit.org/show_bug.cgi?id=125820
+
+        Reviewed by Darin Adler.
+
+        Replace uses of ENUM_CLASS with real enum class declarations.
+
+        * Modules/webdatabase/DatabaseBasicTypes.h:
+        * Modules/webdatabase/DatabaseError.h:
+        * Modules/webdatabase/SQLTransactionState.h:
+        * bindings/js/JSSubtleCryptoCustom.cpp:
+        * bindings/js/SerializedScriptValue.cpp:
+        * crypto/CryptoAlgorithmIdentifier.h:
+        * crypto/CryptoAlgorithmParameters.h:
+        * crypto/CryptoKey.h:
+        * crypto/CryptoKeyData.h:
+        * crypto/CryptoKeyType.h:
+        * crypto/keys/CryptoKeyDataRSAComponents.h:
+        * inspector/InspectorTimelineAgent.h:
+
</ins><span class="cx"> 2013-12-16  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseBasicTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseBasicTypes.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseBasicTypes.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseBasicTypes.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -28,17 +28,15 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> 
</span><del>-#include &lt;wtf/EnumClass.h&gt;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> typedef int DatabaseGuid;
</span><span class="cx"> typedef int ExceptionCode;
</span><span class="cx"> 
</span><del>-ENUM_CLASS(DatabaseType) {
</del><ins>+enum class DatabaseType {
</ins><span class="cx">     Async,
</span><span class="cx">     Sync
</span><del>-} ENUM_CLASS_END(DatabaseType);
</del><ins>+};
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseError.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseError.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseError.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -28,18 +28,16 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> 
</span><del>-#include &lt;wtf/EnumClass.h&gt;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ENUM_CLASS(DatabaseError) {
</del><ins>+enum class DatabaseError {
</ins><span class="cx">     None = 0,
</span><span class="cx">     DatabaseIsBeingDeleted,
</span><span class="cx">     DatabaseSizeExceededQuota,
</span><span class="cx">     DatabaseSizeOverflowed,
</span><span class="cx">     GenericSecurityError,
</span><span class="cx">     InvalidDatabaseState
</span><del>-} ENUM_CLASS_END(DatabaseError);
</del><ins>+};
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLTransactionStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionState.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionState.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionState.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -28,11 +28,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> 
</span><del>-#include &lt;wtf/EnumClass.h&gt;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ENUM_CLASS(SQLTransactionState) {
</del><ins>+enum class SQLTransactionState {
</ins><span class="cx">     End = 0,
</span><span class="cx">     Idle,
</span><span class="cx">     AcquireLock,
</span><span class="lines">@@ -47,7 +45,7 @@
</span><span class="cx">     DeliverQuotaIncreaseCallback,
</span><span class="cx">     DeliverSuccessCallback,
</span><span class="cx">     NumberOfStates // Always keep this at the end of the list.
</span><del>-} ENUM_CLASS_END(SQLTransactionState);
</del><ins>+};
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoKeyFormat) {
</del><ins>+enum class CryptoKeyFormat {
</ins><span class="cx">     // An unformatted sequence of bytes. Intended for secret keys.
</span><span class="cx">     Raw,
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsSerializedScriptValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -166,20 +166,20 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoKeyClassSubtag) {
</del><ins>+enum class CryptoKeyClassSubtag {
</ins><span class="cx">     HMAC = 0,
</span><span class="cx">     AES = 1,
</span><span class="cx">     RSA = 2
</span><span class="cx"> };
</span><span class="cx"> const uint8_t cryptoKeyClassSubtagMaximumValue = 2;
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoKeyAsymmetricTypeSubtag) {
</del><ins>+enum class CryptoKeyAsymmetricTypeSubtag {
</ins><span class="cx">     Public = 0,
</span><span class="cx">     Private = 1
</span><span class="cx"> };
</span><span class="cx"> const uint8_t cryptoKeyAsymmetricTypeSubtagMaximumValue = 1;
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoKeyUsageTag) {
</del><ins>+enum class CryptoKeyUsageTag {
</ins><span class="cx">     Encrypt = 0,
</span><span class="cx">     Decrypt = 1,
</span><span class="cx">     Sign = 2,
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx"> };
</span><span class="cx"> const uint8_t cryptoKeyUsageTagMaximumValue = 7;
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoAlgorithmIdentifierTag) {
</del><ins>+enum class CryptoAlgorithmIdentifierTag {
</ins><span class="cx">     RSAES_PKCS1_v1_5 = 0,
</span><span class="cx">     RSASSA_PKCS1_v1_5 = 1,
</span><span class="cx">     RSA_PSS = 2,
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmIdentifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithmIdentifier.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithmIdentifier.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithmIdentifier.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoAlgorithmIdentifier) {
</del><ins>+enum class CryptoAlgorithmIdentifier {
</ins><span class="cx">     RSAES_PKCS1_v1_5 = 1,
</span><span class="cx">     RSASSA_PKCS1_v1_5,
</span><span class="cx">     RSA_PSS,
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoAlgorithmParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/crypto/CryptoAlgorithmParameters.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     CryptoAlgorithmParameters() { }
</span><span class="cx">     virtual ~CryptoAlgorithmParameters() { }
</span><span class="cx"> 
</span><del>-    ENUM_CLASS(Class) {
</del><ins>+    enum class Class {
</ins><span class="cx">         None,
</span><span class="cx">         AesCbcParams,
</span><span class="cx">         AesKeyGenParams,
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoKey.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoKey.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/crypto/CryptoKey.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> class CryptoAlgorithmDescriptionBuilder;
</span><span class="cx"> class CryptoKeyData;
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoKeyClass) {
</del><ins>+enum class CryptoKeyClass {
</ins><span class="cx">     HMAC,
</span><span class="cx">     AES,
</span><span class="cx">     RSA
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoKeyDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoKeyData.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoKeyData.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/crypto/CryptoKeyData.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> class CryptoKeyData {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(CryptoKeyData);
</span><span class="cx"> public:
</span><del>-    ENUM_CLASS(Format) {
</del><ins>+    enum class Format {
</ins><span class="cx">         OctetSequence,
</span><span class="cx">         RSAComponents
</span><span class="cx">     };
</span></span></pre></div>
<a id="trunkSourceWebCorecryptoCryptoKeyTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/CryptoKeyType.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/CryptoKeyType.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/crypto/CryptoKeyType.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ENUM_CLASS(CryptoKeyType) {
</del><ins>+enum class CryptoKeyType {
</ins><span class="cx">     Secret,
</span><span class="cx">     Public,
</span><span class="cx">     Private
</span></span></pre></div>
<a id="trunkSourceWebCorecryptokeysCryptoKeyDataRSAComponentsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/crypto/keys/CryptoKeyDataRSAComponents.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/crypto/keys/CryptoKeyDataRSAComponents.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/crypto/keys/CryptoKeyDataRSAComponents.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> class CryptoKeyDataRSAComponents FINAL : public CryptoKeyData {
</span><span class="cx"> public:
</span><del>-    ENUM_CLASS(Type) {
</del><ins>+    enum class Type {
</ins><span class="cx">         Public,
</span><span class="cx">         Private
</span><span class="cx">     };
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorTimelineAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (160686 => 160687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h        2013-12-17 02:16:07 UTC (rev 160686)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h        2013-12-17 02:27:01 UTC (rev 160687)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx"> typedef String ErrorString;
</span><span class="cx"> 
</span><del>-ENUM_CLASS(TimelineRecordType) {
</del><ins>+enum class TimelineRecordType {
</ins><span class="cx">     EventDispatch,
</span><span class="cx">     BeginFrame,
</span><span class="cx">     ScheduleStyleRecalculation,
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">     WebSocketSendHandshakeRequest,
</span><span class="cx">     WebSocketReceiveHandshakeResponse,
</span><span class="cx">     WebSocketDestroy
</span><del>-} ENUM_CLASS_END(TimelineRecordType);
</del><ins>+};
</ins><span class="cx"> 
</span><span class="cx"> class TimelineTimeConverter {
</span><span class="cx"> public:
</span></span></pre>
</div>
</div>

</body>
</html>