2011-02-16 Joone Hur <joone.hur@collabora.co.uk>
authorjoone.hur@collabora.co.uk <joone.hur@collabora.co.uk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2011 00:50:22 +0000 (00:50 +0000)
committerjoone.hur@collabora.co.uk <joone.hur@collabora.co.uk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2011 00:50:22 +0000 (00:50 +0000)
        Reviewed by Xan Lopez.

        [GTK] Match more various WebKit API enum values with WebCore enum values
        https://bugs.webkit.org/show_bug.cgi?id=54352

        AssertMatchingEnums.cpp was added to assert that various WebKit API enum values
        continue matching WebCore defined enum values in the following changeset.
        http://trac.webkit.org/changeset/77868
        However, there are already enum values that have been asserted in other files,
        so these assert macros defined need to be moved to AssertMatchingEnum.cpp.

        * WebCoreSupport/AssertMatchingEnums.cpp: Add more enum values to be asserted.
        * webkit/webkitwebnavigationaction.cpp:
        (webkit_web_navigation_action_class_init): Move the assert macros of
        WEBKIT_WEB_NAVIGATION_REASON_* to AssertMatchingEnums.cpp.
        * webkit/webkitwebsettings.cpp:
        (webkit_web_settings_class_init): Move the assert macros of WEBKIT_EDITING_BEHAVIOR_*
        to AssertMatchingEnums.cpp.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/AssertMatchingEnums.cpp
Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
Source/WebKit/gtk/webkit/webkitwebsettings.cpp

index 750fdc1..2ae9e68 100644 (file)
@@ -1,3 +1,24 @@
+2011-02-16  Joone Hur  <joone.hur@collabora.co.uk>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Match more various WebKit API enum values with WebCore enum values
+        https://bugs.webkit.org/show_bug.cgi?id=54352
+
+        AssertMatchingEnums.cpp was added to assert that various WebKit API enum values 
+        continue matching WebCore defined enum values in the following changeset.
+        http://trac.webkit.org/changeset/77868
+        However, there are already enum values that have been asserted in other files, 
+        so these assert macros defined need to be moved to AssertMatchingEnum.cpp.  
+
+        * WebCoreSupport/AssertMatchingEnums.cpp: Add more enum values to be asserted.
+        * webkit/webkitwebnavigationaction.cpp:  
+        (webkit_web_navigation_action_class_init): Move the assert macros of 
+        WEBKIT_WEB_NAVIGATION_REASON_* to AssertMatchingEnums.cpp.
+        * webkit/webkitwebsettings.cpp:
+        (webkit_web_settings_class_init): Move the assert macros of WEBKIT_EDITING_BEHAVIOR_* 
+        to AssertMatchingEnums.cpp.
+
 2011-02-16  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Reviewed by Martin Robinson.
index 9c596f8..298f329 100644 (file)
 #include "config.h"
 
 #include "DumpRenderTreeSupportGtk.h"
+#include "EditingBehaviorTypes.h"
 #include "FindOptions.h"
+#include "FrameLoaderTypes.h"
+#include "webkitwebnavigationaction.h"
+#include "webkitwebsettings.h"
 #include <wtf/Assertions.h>
 
 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \
-    COMPILE_ASSERT(int(WebKit::webkit_name) == int(WebCore::webcore_name), mismatching_enums)
+    COMPILE_ASSERT(int(webkit_name) == int(WebCore::webcore_name), mismatching_enums)
 
-COMPILE_ASSERT_MATCHING_ENUM(WebFindOptionsCaseInsensitive , CaseInsensitive);
-COMPILE_ASSERT_MATCHING_ENUM(WebFindOptionsAtWordStarts, AtWordStarts);
-COMPILE_ASSERT_MATCHING_ENUM(WebFindOptionsTreatMedialCapitalAsWordStart, TreatMedialCapitalAsWordStart);
-COMPILE_ASSERT_MATCHING_ENUM(WebFindOptionsBackwards, Backwards);
-COMPILE_ASSERT_MATCHING_ENUM(WebFindOptionsWrapAround, WrapAround);
-COMPILE_ASSERT_MATCHING_ENUM(WebFindOptionsStartInSelection, StartInSelection);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_EDITING_BEHAVIOR_MAC, EditingMacBehavior);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_EDITING_BEHAVIOR_WINDOWS, EditingWindowsBehavior);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_EDITING_BEHAVIOR_UNIX, EditingUnixBehavior);
+
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED, NavigationTypeLinkClicked);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED, NavigationTypeFormSubmitted);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_WEB_NAVIGATION_REASON_BACK_FORWARD, NavigationTypeBackForward);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_WEB_NAVIGATION_REASON_RELOAD, NavigationTypeReload);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_WEB_NAVIGATION_REASON_FORM_RESUBMITTED, NavigationTypeFormResubmitted);
+COMPILE_ASSERT_MATCHING_ENUM(WEBKIT_WEB_NAVIGATION_REASON_OTHER, NavigationTypeOther);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebKit::WebFindOptionsAtWordStarts, AtWordStarts);
+COMPILE_ASSERT_MATCHING_ENUM(WebKit::WebFindOptionsTreatMedialCapitalAsWordStart, TreatMedialCapitalAsWordStart);
+COMPILE_ASSERT_MATCHING_ENUM(WebKit::WebFindOptionsBackwards, Backwards);
+COMPILE_ASSERT_MATCHING_ENUM(WebKit::WebFindOptionsWrapAround, WrapAround);
+COMPILE_ASSERT_MATCHING_ENUM(WebKit::WebFindOptionsStartInSelection, StartInSelection);
index 9f13f28..868e49c 100644 (file)
@@ -131,13 +131,6 @@ static void webkit_web_navigation_action_class_init(WebKitWebNavigationActionCla
 {
     GObjectClass* objectClass = G_OBJECT_CLASS(requestClass);
 
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED) == static_cast<int>(WebCore::NavigationTypeLinkClicked), navigation_type_link_clicked_enum_match);
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED) == static_cast<int>(WebCore::NavigationTypeFormSubmitted), navigation_type_form_submitted_enum_match);
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_WEB_NAVIGATION_REASON_BACK_FORWARD) == static_cast<int>(WebCore::NavigationTypeBackForward), navigation_type_back_forward_enum_match);
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_WEB_NAVIGATION_REASON_RELOAD) == static_cast<int>(WebCore::NavigationTypeReload), navigation_type_reload_enum_match);
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_WEB_NAVIGATION_REASON_FORM_RESUBMITTED) == static_cast<int>(WebCore::NavigationTypeFormResubmitted), navigation_type_form_resubmitted_enum_match);
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_WEB_NAVIGATION_REASON_OTHER) == static_cast<int>(WebCore::NavigationTypeOther), navigation_type_other_enum_match);
-
     objectClass->get_property = webkit_web_navigation_action_get_property;
     objectClass->set_property = webkit_web_navigation_action_set_property;
     objectClass->dispose = webkit_web_navigation_action_finalize;
index 533b377..ff5289b 100644 (file)
@@ -691,9 +691,6 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
                                                          TRUE,
                                                          flags));
 
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_EDITING_BEHAVIOR_MAC) == static_cast<int>(WebCore::EditingMacBehavior), editing_behavior_type_mac_match);
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_EDITING_BEHAVIOR_WINDOWS) == static_cast<int>(WebCore::EditingWindowsBehavior), editing_behavior_type_windows_match);
-    COMPILE_ASSERT(static_cast<int>(WEBKIT_EDITING_BEHAVIOR_UNIX) == static_cast<int>(WebCore::EditingUnixBehavior), editing_behavior_type_unix_match);
 
     /**
     * WebKitWebSettings:editing-behavior