Title: [240853] releases/WebKitGTK/webkit-2.22
Revision
240853
Author
mcatanz...@igalia.com
Date
2019-02-01 09:00:10 -0800 (Fri, 01 Feb 2019)

Log Message

Merge r237541 - [WPE] Add the WebKitVersion.h header
https://bugs.webkit.org/show_bug.cgi?id=191015

Reviewed by Michael Catanzaro.

Source/WebKit:

Add the WebKitVersion.h API header for the WPE port. As with other
headers providing the GLib API, we have to provide a WPE-specific
version, but the implementation file can be shared with the GTK port,
and is moved under the UIProcess/API/glib/ directory accordingly.

* PlatformWPE.cmake:
* SourcesWPE.txt:
* UIProcess/API/glib/WebKitVersion.cpp: Renamed from Source/WebKit/UIProcess/API/gtk/WebKitVersion.cpp.
* UIProcess/API/wpe/WebKitVersion.h.in: Added.
* UIProcess/API/wpe/webkit.h:

Tools:

* MiniBrowser/wpe/main.cpp:
(automationStartedCallback): Remove the FIXME and finally enable the
webkit_application_info_set_version() call.
* TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp: Remove
this FIXME as well and remove the custom WEBKIT_*_VERSION macros.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/Source/WebKit/ChangeLog (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/ChangeLog	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/ChangeLog	2019-02-01 17:00:10 UTC (rev 240853)
@@ -1,3 +1,21 @@
+2018-10-28  Zan Dobersek  <zdober...@igalia.com>
+
+        [WPE] Add the WebKitVersion.h header
+        https://bugs.webkit.org/show_bug.cgi?id=191015
+
+        Reviewed by Michael Catanzaro.
+
+        Add the WebKitVersion.h API header for the WPE port. As with other
+        headers providing the GLib API, we have to provide a WPE-specific
+        version, but the implementation file can be shared with the GTK port,
+        and is moved under the UIProcess/API/glib/ directory accordingly.
+
+        * PlatformWPE.cmake:
+        * SourcesWPE.txt:
+        * UIProcess/API/glib/WebKitVersion.cpp: Renamed from Source/WebKit/UIProcess/API/gtk/WebKitVersion.cpp.
+        * UIProcess/API/wpe/WebKitVersion.h.in: Added.
+        * UIProcess/API/wpe/webkit.h:
+
 2018-12-06  Carlos Eduardo Ramalho  <cadubent...@gmail.com>
 
         REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds

Modified: releases/WebKitGTK/webkit-2.22/Source/WebKit/PlatformWPE.cmake (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/PlatformWPE.cmake	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/PlatformWPE.cmake	2019-02-01 17:00:10 UTC (rev 240853)
@@ -10,6 +10,7 @@
 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_EXTENSION_DIR})
 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_DOM_DIR})
 
+configure_file(UIProcess/API/wpe/WebKitVersion.h.in ${DERIVED_SOURCES_WPE_API_DIR}/WebKitVersion.h)
 configure_file(wpe/wpe-webkit.pc.in ${CMAKE_BINARY_DIR}/wpe-webkit-${WPE_API_VERSION}.pc @ONLY)
 configure_file(wpe/wpe-web-extension.pc.in ${CMAKE_BINARY_DIR}/wpe-web-extension-${WPE_API_VERSION}.pc @ONLY)
 
@@ -96,6 +97,7 @@
 
 set(WPE_API_INSTALLED_HEADERS
     ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
+    ${DERIVED_SOURCES_WPE_API_DIR}/WebKitVersion.h
     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitApplicationInfo.h
     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitAuthenticationRequest.h
     ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitAutomationSession.h

Modified: releases/WebKitGTK/webkit-2.22/Source/WebKit/SourcesGTK.txt (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/SourcesGTK.txt	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/SourcesGTK.txt	2019-02-01 17:00:10 UTC (rev 240853)
@@ -172,6 +172,7 @@
 UIProcess/API/glib/WebKitUserContent.cpp @no-unify
 UIProcess/API/glib/WebKitUserContentManager.cpp @no-unify
 UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp @no-unify
+UIProcess/API/glib/WebKitVersion.cpp @no-unify
 UIProcess/API/glib/WebKitWebContext.cpp @no-unify
 UIProcess/API/glib/WebKitWebResource.cpp @no-unify
 UIProcess/API/glib/WebKitWebView.cpp @no-unify
@@ -191,7 +192,6 @@
 UIProcess/API/gtk/WebKitPrintOperation.cpp @no-unify
 UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp @no-unify
 UIProcess/API/gtk/WebKitScriptDialogGtk.cpp @no-unify
-UIProcess/API/gtk/WebKitVersion.cpp @no-unify
 UIProcess/API/gtk/WebKitWebInspector.cpp @no-unify
 UIProcess/API/gtk/WebKitWebViewBase.cpp @no-unify
 UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp @no-unify

Modified: releases/WebKitGTK/webkit-2.22/Source/WebKit/SourcesWPE.txt (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/SourcesWPE.txt	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/SourcesWPE.txt	2019-02-01 17:00:10 UTC (rev 240853)
@@ -158,6 +158,7 @@
 UIProcess/API/glib/WebKitUserContent.cpp @no-unify
 UIProcess/API/glib/WebKitUserContentManager.cpp @no-unify
 UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp @no-unify
+UIProcess/API/glib/WebKitVersion.cpp @no-unify
 UIProcess/API/glib/WebKitWebContext.cpp @no-unify
 UIProcess/API/glib/WebKitWebResource.cpp @no-unify
 UIProcess/API/glib/WebKitWebView.cpp @no-unify

Copied: releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/glib/WebKitVersion.cpp (from rev 240852, releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/gtk/WebKitVersion.cpp) (0 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/glib/WebKitVersion.cpp	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/glib/WebKitVersion.cpp	2019-02-01 17:00:10 UTC (rev 240853)
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "WebKitVersion.h"
+
+/**
+ * SECTION: WebKitVersion
+ * @Short_description: Provides the WebKit version
+ * @Title: WebKitVersion
+ *
+ * Provides convenience functions returning WebKit's major, minor and
+ * micro versions of the WebKit library your code is running
+ * against. This is not necessarily the same as the
+ * #WEBKIT_MAJOR_VERSION, #WEBKIT_MINOR_VERSION or
+ * #WEBKIT_MICRO_VERSION, which represent the version of the WebKit
+ * headers included when compiling the code.
+ *
+ */
+
+/**
+ * webkit_get_major_version:
+ *
+ * Returns the major version number of the WebKit library.
+ * (e.g. in WebKit version 1.8.3 this is 1.)
+ *
+ * This function is in the library, so it represents the WebKit library
+ * your code is running against. Contrast with the #WEBKIT_MAJOR_VERSION
+ * macro, which represents the major version of the WebKit headers you
+ * have included when compiling your code.
+ *
+ * Returns: the major version number of the WebKit library
+ */
+guint webkit_get_major_version(void)
+{
+    return WEBKIT_MAJOR_VERSION;
+}
+
+/**
+ * webkit_get_minor_version:
+ *
+ * Returns the minor version number of the WebKit library.
+ * (e.g. in WebKit version 1.8.3 this is 8.)
+ *
+ * This function is in the library, so it represents the WebKit library
+ * your code is running against. Contrast with the #WEBKIT_MINOR_VERSION
+ * macro, which represents the minor version of the WebKit headers you
+ * have included when compiling your code.
+ *
+ * Returns: the minor version number of the WebKit library
+ */
+guint webkit_get_minor_version(void)
+{
+    return WEBKIT_MINOR_VERSION;
+}
+
+/**
+ * webkit_get_micro_version:
+ *
+ * Returns the micro version number of the WebKit library.
+ * (e.g. in WebKit version 1.8.3 this is 3.)
+ *
+ * This function is in the library, so it represents the WebKit library
+ * your code is running against. Contrast with the #WEBKIT_MICRO_VERSION
+ * macro, which represents the micro version of the WebKit headers you
+ * have included when compiling your code.
+ *
+ * Returns: the micro version number of the WebKit library
+ */
+guint webkit_get_micro_version(void)
+{
+    return WEBKIT_MICRO_VERSION;
+}

Deleted: releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/gtk/WebKitVersion.cpp (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/gtk/WebKitVersion.cpp	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/gtk/WebKitVersion.cpp	2019-02-01 17:00:10 UTC (rev 240853)
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "WebKitVersion.h"
-
-/**
- * SECTION: WebKitVersion
- * @Short_description: Provides the WebKit version
- * @Title: WebKitVersion
- *
- * Provides convenience functions returning WebKit's major, minor and
- * micro versions of the WebKit library your code is running
- * against. This is not necessarily the same as the
- * #WEBKIT_MAJOR_VERSION, #WEBKIT_MINOR_VERSION or
- * #WEBKIT_MICRO_VERSION, which represent the version of the WebKit
- * headers included when compiling the code.
- *
- */
-
-/**
- * webkit_get_major_version:
- *
- * Returns the major version number of the WebKit library.
- * (e.g. in WebKit version 1.8.3 this is 1.)
- *
- * This function is in the library, so it represents the WebKit library
- * your code is running against. Contrast with the #WEBKIT_MAJOR_VERSION
- * macro, which represents the major version of the WebKit headers you
- * have included when compiling your code.
- *
- * Returns: the major version number of the WebKit library
- */
-guint webkit_get_major_version(void)
-{
-    return WEBKIT_MAJOR_VERSION;
-}
-
-/**
- * webkit_get_minor_version:
- *
- * Returns the minor version number of the WebKit library.
- * (e.g. in WebKit version 1.8.3 this is 8.)
- *
- * This function is in the library, so it represents the WebKit library
- * your code is running against. Contrast with the #WEBKIT_MINOR_VERSION
- * macro, which represents the minor version of the WebKit headers you
- * have included when compiling your code.
- *
- * Returns: the minor version number of the WebKit library
- */
-guint webkit_get_minor_version(void)
-{
-    return WEBKIT_MINOR_VERSION;
-}
-
-/**
- * webkit_get_micro_version:
- *
- * Returns the micro version number of the WebKit library.
- * (e.g. in WebKit version 1.8.3 this is 3.)
- *
- * This function is in the library, so it represents the WebKit library
- * your code is running against. Contrast with the #WEBKIT_MICRO_VERSION
- * macro, which represents the micro version of the WebKit headers you
- * have included when compiling your code.
- *
- * Returns: the micro version number of the WebKit library
- */
-guint webkit_get_micro_version(void)
-{
-    return WEBKIT_MICRO_VERSION;
-}

Added: releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/wpe/WebKitVersion.h.in (0 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/wpe/WebKitVersion.h.in	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/wpe/WebKitVersion.h.in	2019-02-01 17:00:10 UTC (rev 240853)
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitVersion_h
+#define WebKitVersion_h
+
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+/**
+ * WEBKIT_MAJOR_VERSION:
+ *
+ * Like webkit_get_major_version(), but from the headers used at
+ * application compile time, rather than from the library linked
+ * against at application run time.
+ */
+#define WEBKIT_MAJOR_VERSION (@PROJECT_VERSION_MAJOR@)
+
+/**
+ * WEBKIT_MINOR_VERSION:
+ *
+ * Like webkit_get_minor_version(), but from the headers used at
+ * application compile time, rather than from the library linked
+ * against at application run time.
+ */
+#define WEBKIT_MINOR_VERSION (@PROJECT_VERSION_MINOR@)
+
+/**
+ * WEBKIT_MICRO_VERSION:
+ *
+ * Like webkit_get_micro_version(), but from the headers used at
+ * application compile time, rather than from the library linked
+ * against at application run time.
+ */
+#define WEBKIT_MICRO_VERSION (@PROJECT_VERSION_MICRO@)
+
+/**
+ * WEBKIT_CHECK_VERSION:
+ * @major: major version (e.g. 1 for version 1.2.5)
+ * @minor: minor version (e.g. 2 for version 1.2.5)
+ * @micro: micro version (e.g. 5 for version 1.2.5)
+ *
+ * Returns: %TRUE if the version of the WebKit header files
+ * is the same as or newer than the passed-in version.
+ */
+#define WEBKIT_CHECK_VERSION(major, minor, micro) \
+    (WEBKIT_MAJOR_VERSION > (major) || \
+    (WEBKIT_MAJOR_VERSION == (major) && WEBKIT_MINOR_VERSION > (minor)) || \
+    (WEBKIT_MAJOR_VERSION == (major) && WEBKIT_MINOR_VERSION == (minor) && \
+     WEBKIT_MICRO_VERSION >= (micro)))
+
+WEBKIT_API guint
+webkit_get_major_version (void);
+
+WEBKIT_API guint
+webkit_get_minor_version (void);
+
+WEBKIT_API guint
+webkit_get_micro_version (void);
+
+G_END_DECLS
+
+#endif

Modified: releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/wpe/webkit.h (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/wpe/webkit.h	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Source/WebKit/UIProcess/API/wpe/webkit.h	2019-02-01 17:00:10 UTC (rev 240853)
@@ -69,6 +69,7 @@
 #include <wpe/WebKitUserContent.h>
 #include <wpe/WebKitUserContentManager.h>
 #include <wpe/WebKitUserMediaPermissionRequest.h>
+#include <wpe/WebKitVersion.h>
 #include <wpe/WebKitWebContext.h>
 #include <wpe/WebKitWebResource.h>
 #include <wpe/WebKitWebView.h>

Modified: releases/WebKitGTK/webkit-2.22/Tools/ChangeLog (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Tools/ChangeLog	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Tools/ChangeLog	2019-02-01 17:00:10 UTC (rev 240853)
@@ -1,3 +1,16 @@
+2018-10-28  Zan Dobersek  <zdober...@igalia.com>
+
+        [WPE] Add the WebKitVersion.h header
+        https://bugs.webkit.org/show_bug.cgi?id=191015
+
+        Reviewed by Michael Catanzaro.
+
+        * MiniBrowser/wpe/main.cpp:
+        (automationStartedCallback): Remove the FIXME and finally enable the
+        webkit_application_info_set_version() call.
+        * TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp: Remove
+        this FIXME as well and remove the custom WEBKIT_*_VERSION macros.
+
 2018-11-20  Jeff Miller  <je...@apple.com>
 
         Return nullptr immediately if the key doesn't exist in the HashMap.

Modified: releases/WebKitGTK/webkit-2.22/Tools/MiniBrowser/wpe/main.cpp (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Tools/MiniBrowser/wpe/main.cpp	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Tools/MiniBrowser/wpe/main.cpp	2019-02-01 17:00:10 UTC (rev 240853)
@@ -86,8 +86,7 @@
 static void automationStartedCallback(WebKitWebContext*, WebKitAutomationSession* session, WebKitWebView* view)
 {
     auto* info = webkit_application_info_new();
-    // FIXME: add version info when wpe has WebKitVersion.h
-    // webkit_application_info_set_version(info, WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION);
+    webkit_application_info_set_version(info, WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION);
     webkit_automation_session_set_application_info(session, info);
     webkit_application_info_unref(info);
 

Modified: releases/WebKitGTK/webkit-2.22/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp (240852 => 240853)


--- releases/WebKitGTK/webkit-2.22/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp	2019-02-01 17:00:05 UTC (rev 240852)
+++ releases/WebKitGTK/webkit-2.22/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp	2019-02-01 17:00:10 UTC (rev 240853)
@@ -24,13 +24,6 @@
 #include <wtf/UUID.h>
 #include <wtf/text/StringBuilder.h>
 
-// FIXME: WPE doesn't expose WebKitVersion yet, the numbers defined here don't really matter.
-#if PLATFORM(WPE)
-#define WEBKIT_MAJOR_VERSION 1
-#define WEBKIT_MINOR_VERSION 2
-#define WEBKIT_MICRO_VERSION 3
-#endif
-
 class AutomationTest: public Test {
 public:
     MAKE_GLIB_TEST_FIXTURE(AutomationTest);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to