Commit 04ac10bf authored by ch.dumez@samsung.com's avatar ch.dumez@samsung.com

Update AssertMatchingEnums.cpp now that everything is in blink namespace

Update AssertMatchingEnums.cpp now that everything is in blink namespace.
This CL defines all assertions inside the blink namespace as well so that we
don't have have to specify blink:: explicitly in the assertion macro. Public
names cannot be identical to core blink ones anyway or they would clash now
that they are in the same namespace.

As a side effect, the same COMPILE_ASSERT_MATCHING_*() macros could now be
reused for enumerations that are not in the blink namespace (e.g. in the WTF
one) since the macros no longer specify blink:: explicitly.

This CL also removes a few outdated references to WebKit / WebCore.

R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/416313006

git-svn-id: svn://svn.chromium.org/blink/trunk@179160 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e107064e
......@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Use this file to assert that various WebKit API enum values continue
// matching WebCore defined enum values.
// Use this file to assert that various public API enum values continue
// matching blink defined enum values.
#include "config.h"
......@@ -132,11 +132,13 @@
#include "wtf/Assertions.h"
#include "wtf/text/StringImpl.h"
#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \
COMPILE_ASSERT(int(blink::webkit_name) == int(blink::webcore_name), mismatching_enums)
namespace blink {
#define COMPILE_ASSERT_MATCHING_UINT64(webkit_name, webcore_name) \
COMPILE_ASSERT(blink::webkit_name == blink::webcore_name, mismatching_enums)
#define COMPILE_ASSERT_MATCHING_ENUM(public_name, core_name) \
COMPILE_ASSERT(int(public_name) == int(core_name), mismatching_enums)
#define COMPILE_ASSERT_MATCHING_UINT64(public_name, core_name) \
COMPILE_ASSERT(public_name == core_name, mismatching_enums)
COMPILE_ASSERT_MATCHING_ENUM(WebAXEventActiveDescendantChanged, AXObjectCache::AXActiveDescendantChanged);
COMPILE_ASSERT_MATCHING_ENUM(WebAXEventAlert, AXObjectCache::AXAlert);
......@@ -612,3 +614,5 @@ COMPILE_ASSERT_MATCHING_ENUM(WebTouchActionPanY, TouchActionPanY);
COMPILE_ASSERT_MATCHING_ENUM(WebTouchActionPinchZoom, TouchActionPinchZoom);
COMPILE_ASSERT_MATCHING_UINT64(kSerializedScriptValueVersion, SerializedScriptValue::wireFormatVersion);
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment