Commit 29b339c8 authored by Michael Gratton's avatar Michael Gratton
Browse files

Port to WebKit2. Bug 728002.

Merge branch 'bug/728002-webkit2'
parents 933dae2d e8aa38f6
......@@ -29,6 +29,7 @@ set(LANGUAGE_SUPPORT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/locale)
#
set(TARGET_GLIB 2.42) # Also passed to valac, so don't include a point rev
set(TARGET_GTK 3.14.0)
set(TARGET_WEBKIT 2.10)
if (NOT ISO_CODE_639_XML)
find_path(ISOCODES_DIRECTORY NAMES iso_639.xml PATHS ${CMAKE_INSTALL_PREFIX} /usr/share/xml/iso-codes)
......@@ -152,7 +153,7 @@ include(GlibCompileResourcesSupport)
#
# We don't use CMake's enable_testing/add_test built-ins because they
# use ctest. It's not called "test" because that is cmake reserved.
add_custom_target(tests ALL geary-test)
add_custom_target(tests geary-test)
add_dependencies(tests geary-test)
#
......
GlobalContextRef skip
ObjectRef skip
JavascriptResult
.get_global_context nullable=false unowned=true
.get_value nullable=false unowned=true
//Forward upstream
Download
.failed#signal.error type="WebKit.DownloadError"
PrintOperation
.failed#signal.error type="WebKit.PrintError"
WebResource
.failed#signal.error type="GLib.Error"
WebView
.load_failed#signal.error type="GLib.Error"
namespace WebKit {
namespace DOM {
public delegate void EventTargetFunc (WebKit.DOM.EventTarget target, WebKit.DOM.Event event);
}
}
DOM* parent="WebKit.DOM" name="DOM(.+)"
DOMEventTarget.add_event_listener skip
_ContextMenu skip
_ContextMenuItem skip
Frame.get_javascript_* nullable=false unowned=true
DOMEventTarget.add_event_listener_with_closure.handler type="owned WebKit.DOM.EventTargetFunc"
namespace WebKit {
namespace DOM {
[CCode (cheader_filename="webkit/webkit.h", type_id="webkit_dom_event_target_get_type()")]
public interface EventTarget {
public abstract bool add_event_listener(string event_name, GLib.Callback handler, bool use_capture, GLib.Object? object);
public abstract bool remove_event_listener(string event_name, GLib.Callback handler, bool use_capture);
}
}
}
DOM* parent="WebKit.DOM" name="DOM(.+)"
DOMEventTarget.add_event_listener skip=true
DOMEventTarget.add_event_listener_with_closure skip=true
DOMEventTarget.remove_event_listener skip=true
DOMEventTarget.remove_event_listener_with_closure skip=true
WebView.entering_fullscreen#signal name="entering_fullscreen_signal"
WebView.leaving_fullscreen#signal name="leaving_fullscreen_signal"
WebView.move_cursor#virtual_method name="leaving_fullscreen_method"
WebSettings.enable_default_context_menu#property deprecated=false
WebFrame.get_global_context skip
/*
* Copyright 2017 Michael Gratton <mike@vee.net>
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
[CCode (cprefix = "JS",
gir_namespace = "JavaScriptCore",
gir_version = "4.0",
lower_case_cprefix = "JS_",
cheader_filename = "JavaScriptCore/JavaScript.h")]
namespace JS {
[CCode (cname = "JSContextRef")]
[SimpleType]
public struct Context {
[CCode (cname = "JSEvaluateScript")]
public Value evaluate_script(String script,
Object? thisObject,
String? sourceURL,
int startingLineNumber,
out Value? exception);
[CCode (cname = "JSCheckScriptSyntax")]
public Value check_script_syntax(String script,
String? sourceURL,
int startingLineNumber,
out Value? exception);
}
[CCode (cname = "JSGlobalContextRef")]
[SimpleType]
public struct GlobalContext : Context {
[CCode (cname = "JSGlobalContextRetain")]
public bool retain();
[CCode (cname = "JSGlobalContextRelease")]
public bool release();
}
[CCode (cname = "JSType", has_type_id = false)]
public enum Type {
[CCode (cname = "kJSTypeUndefined")]
UNDEFINED,
[CCode (cname = "kJSTypeNull")]
NULL,
[CCode (cname = "kJSTypeBoolean")]
BOOLEAN,
[CCode (cname = "kJSTypeNumber")]
NUMBER,
[CCode (cname = "kJSTypeString")]
STRING,
[CCode (cname = "kJSTypeObject")]
OBJECT
}
[CCode (cname = "JSObjectRef")]
[SimpleType]
public struct Object {
[CCode (cname = "JSObjectMakeFunction")]
public Object.make_function(String? name,
[CCode (array_length_pos=1.5)]
String[]? parameterNames,
String body,
String? sourceURL,
int startingLineNumber,
out Value? exception);
[CCode (cname = "JSObjectCallAsFunction", instance_pos = 1.1)]
public Value call_as_function(Context ctx,
Object? thisObject,
[CCode (array_length_pos=2.5)]
Value[]? arguments,
out Value? exception);
[CCode (cname = "JSObjectHasProperty", instance_pos = 1.1)]
public bool has_property(Context ctx, String property_name);
[CCode (cname = "JSObjectGetProperty", instance_pos = 1.1)]
public Value get_property(Context ctx,
String property_name,
out Value? exception);
}
[CCode (cname = "JSValueRef")]
[SimpleType]
public struct Value {
[CCode (cname = "JSValueGetType", instance_pos = 1.1)]
public Type get_type(Context context);
[CCode (cname = "JSValueIsBoolean", instance_pos = 1.1)]
public bool is_boolean(Context ctx);
[CCode (cname = "JSValueIsNumber", instance_pos = 1.1)]
public bool is_number(Context ctx);
[CCode (cname = "JSValueIsObject", instance_pos = 1.1)]
public bool is_object(Context ctx);
[CCode (cname = "JSValueIsString", instance_pos = 1.1)]
public bool is_string(Context ctx);
[CCode (cname = "JSValueToBoolean", instance_pos = 1.1)]
public bool to_boolean(Context ctx);
[CCode (cname = "JSValueToNumber", instance_pos = 1.1)]
public double to_number(Context ctx, out Value exception);
[CCode (cname = "JSValueToObject", instance_pos = 1.1)]
public Object to_object(Context ctx, out Value exception);
[CCode (cname = "JSValueToStringCopy", instance_pos = 1.1)]
public String to_string_copy(Context ctx, out Value exception);
}
[CCode (cname = "JSStringRef")]
[SimpleType]
public struct String {
[CCode (cname = "JSStringCreateWithUTF8CString")]
public String.create_with_utf8_cstring(string str);
[CCode (cname = "JSStringGetLength")]
public int String.get_length();
[CCode (cname = "JSStringGetMaximumUTF8CStringSize")]
public int String.get_maximum_utf8_cstring_size();
[CCode (cname = "JSStringGetUTF8CString")]
public void String.get_utf8_cstring(string* buffer, int bufferSize);
[CCode (cname = "JSStringRetain")]
public void String.retain();
[CCode (cname = "JSStringRelease")]
public void String.release();
}
}
......@@ -62,12 +62,6 @@
<description>True if we should display a short preview of each message.</description>
</key>
<key name="spell-check" type="b">
<default>true</default>
<summary>enable inline spell checking</summary>
<description>True to spell check while typing.</description>
</key>
<key name="spell-check-languages" type="as">
<default>[]</default>
<summary>Languages that shall be used in the spell checker</summary>
......
......@@ -22,6 +22,7 @@ src/client/application/geary-config.vala
src/client/application/geary-controller.vala
src/client/application/main.vala
src/client/application/secret-mediator.vala
src/client/components/client-web-view.vala
src/client/components/count-badge.vala
src/client/components/empty-placeholder.vala
src/client/components/folder-popover.vala
......@@ -33,18 +34,18 @@ src/client/components/monitored-spinner.vala
src/client/components/search-bar.vala
src/client/components/status-bar.vala
src/client/components/stock.vala
src/client/components/stylish-webview.vala
src/client/composer/composer-box.vala
src/client/composer/composer-container.vala
src/client/composer/composer-embed.vala
src/client/composer/composer-headerbar.vala
src/client/composer/composer-link-popover.vala
src/client/composer/composer-web-view.vala
src/client/composer/composer-widget.vala
src/client/composer/composer-window.vala
src/client/composer/contact-entry-completion.vala
src/client/composer/contact-list-store.vala
src/client/composer/email-entry.vala
src/client/composer/spell-check-popover.vala
src/client/composer/webview-edit-fixer.vala
src/client/conversation-list/conversation-list-cell-renderer.vala
src/client/conversation-list/conversation-list-store.vala
src/client/conversation-list/conversation-list-view.vala
......@@ -63,8 +64,8 @@ src/client/dialogs/upgrade-dialog.vala
src/client/folder-list/folder-list-abstract-folder-entry.vala
src/client/folder-list/folder-list-account-branch.vala
src/client/folder-list/folder-list-folder-entry.vala
src/client/folder-list/folder-list-inboxes-branch.vala
src/client/folder-list/folder-list-inbox-folder-entry.vala
src/client/folder-list/folder-list-inboxes-branch.vala
src/client/folder-list/folder-list-search-branch.vala
src/client/folder-list/folder-list-special-grouping.vala
src/client/folder-list/folder-list-tree.vala
......@@ -82,13 +83,15 @@ src/client/sidebar/sidebar-tree.vala
src/client/util/util-date.vala
src/client/util/util-email.vala
src/client/util/util-files.vala
src/client/util/util-gio.vala
src/client/util/util-gravatar.vala
src/client/util/util-gtk.vala
src/client/util/util-international.vala
src/client/util/util-migrate.vala
src/client/util/util-random.vala
src/client/util/util-webkit.vala
src/client/web-process/web-process-extension.vala
src/console/main.vala
src/engine/api/geary.vala
src/engine/api/geary-abstract-local-folder.vala
src/engine/api/geary-account-information.vala
src/engine/api/geary-account.vala
......@@ -120,8 +123,8 @@ src/engine/api/geary-folder-supports-move.vala
src/engine/api/geary-folder-supports-remove.vala
src/engine/api/geary-folder.vala
src/engine/api/geary-logging.vala
src/engine/api/geary-named-flags.vala
src/engine/api/geary-named-flag.vala
src/engine/api/geary-named-flags.vala
src/engine/api/geary-progress-monitor.vala
src/engine/api/geary-revokable.vala
src/engine/api/geary-search-folder.vala
......@@ -160,8 +163,10 @@ src/engine/db/db-synchronous-mode.vala
src/engine/db/db-transaction-async-job.vala
src/engine/db/db-transaction-outcome.vala
src/engine/db/db-transaction-type.vala
src/engine/db/db.vala
src/engine/db/db-versioned-database.vala
src/engine/db/db.vala
src/engine/imap/imap.vala
src/engine/imap/imap-error.vala
src/engine/imap/api/imap-account.vala
src/engine/imap/api/imap-email-flags.vala
src/engine/imap/api/imap-email-properties.vala
......@@ -257,25 +262,23 @@ src/engine/imap-engine/replay-ops/imap-engine-server-search-email.vala
src/engine/imap-engine/replay-ops/imap-engine-user-close.vala
src/engine/imap-engine/yahoo/imap-engine-yahoo-account.vala
src/engine/imap-engine/yahoo/imap-engine-yahoo-folder.vala
src/engine/imap/imap-error.vala
src/engine/imap/imap.vala
src/engine/imap/message/imap-data-format.vala
src/engine/imap/message/imap-envelope.vala
src/engine/imap/message/imap-fetch-body-data-specifier.vala
src/engine/imap/message/imap-fetch-data-specifier.vala
src/engine/imap/message/imap-flags.vala
src/engine/imap/message/imap-flag.vala
src/engine/imap/message/imap-flags.vala
src/engine/imap/message/imap-internal-date.vala
src/engine/imap/message/imap-mailbox-parameter.vala
src/engine/imap/message/imap-mailbox-specifier.vala
src/engine/imap/message/imap-message-data.vala
src/engine/imap/message/imap-message-flags.vala
src/engine/imap/message/imap-message-flag.vala
src/engine/imap/message/imap-message-flags.vala
src/engine/imap/message/imap-sequence-number.vala
src/engine/imap/message/imap-status-data-type.vala
src/engine/imap/message/imap-tag.vala
src/engine/imap/message/imap-uid.vala
src/engine/imap/message/imap-uid-validity.vala
src/engine/imap/message/imap-uid.vala
src/engine/imap/parameter/imap-atom-parameter.vala
src/engine/imap/parameter/imap-list-parameter.vala
src/engine/imap/parameter/imap-literal-parameter.vala
......@@ -290,8 +293,8 @@ src/engine/imap/response/imap-capabilities.vala
src/engine/imap/response/imap-continuation-response.vala
src/engine/imap/response/imap-fetch-data-decoder.vala
src/engine/imap/response/imap-fetched-data.vala
src/engine/imap/response/imap-mailbox-attributes.vala
src/engine/imap/response/imap-mailbox-attribute.vala
src/engine/imap/response/imap-mailbox-attributes.vala
src/engine/imap/response/imap-mailbox-information.vala
src/engine/imap/response/imap-response-code-type.vala
src/engine/imap/response/imap-response-code.vala
......@@ -336,8 +339,8 @@ src/engine/rfc822/rfc822-error.vala
src/engine/rfc822/rfc822-gmime-filter-blockquotes.vala
src/engine/rfc822/rfc822-gmime-filter-flowed.vala
src/engine/rfc822/rfc822-gmime-filter-plain.vala
src/engine/rfc822/rfc822-mailbox-addresses.vala
src/engine/rfc822/rfc822-mailbox-address.vala
src/engine/rfc822/rfc822-mailbox-addresses.vala
src/engine/rfc822/rfc822-message-data.vala
src/engine/rfc822/rfc822-message.vala
src/engine/rfc822/rfc822-utils.vala
......@@ -368,6 +371,7 @@ src/engine/util/util-html.vala
src/engine/util/util-imap-utf7.vala
src/engine/util/util-inet.vala
src/engine/util/util-iterable.vala
src/engine/util/util-js.vala
src/engine/util/util-numeric.vala
src/engine/util/util-object.vala
src/engine/util/util-reference-semantics.vala
......@@ -376,6 +380,7 @@ src/engine/util/util-stream.vala
src/engine/util/util-string.vala
src/engine/util/util-synchronization.vala
src/engine/util/util-time.vala
src/engine/util/util-timeout-manager.vala
src/engine/util/util-trillian.vala
src/mailer/main.vala
[type: gettext/glade]ui/accelerators.ui
......@@ -384,23 +389,27 @@ src/mailer/main.vala
[type: gettext/glade]ui/account_spinner.glade
[type: gettext/glade]ui/certificate_warning_dialog.glade
[type: gettext/glade]ui/composer-headerbar.ui
[type: gettext/glade]ui/composer-link-popover.ui
[type: gettext/glade]ui/composer-menus.ui
[type: gettext/glade]ui/composer-widget.ui
[type: gettext/glade]ui/conversation-email.ui
[type: gettext/glade]ui/conversation-email-attachment-view.ui
[type: gettext/glade]ui/conversation-email-menus.ui
[type: gettext/glade]ui/conversation-message.ui
[type: gettext/glade]ui/conversation-message-menus.ui
[type: gettext/glade]ui/conversation-message.ui
[type: gettext/glade]ui/conversation-viewer.ui
[type: gettext/glade]ui/edit_alternate_emails.glade
[type: gettext/glade]ui/empty-placeholder.ui
[type: gettext/glade]ui/find_bar.glade
[type: gettext/glade]ui/folder-popover.ui
[type: gettext/glade]ui/gtk/help-overlay.ui
[type: gettext/glade]ui/gtk/menus.ui
[type: gettext/glade]ui/login.glade
[type: gettext/glade]ui/main-toolbar.ui
[type: gettext/glade]ui/main-window.ui
[type: gettext/glade]ui/password-dialog.glade
[type: gettext/glade]ui/preferences.glade
[type: gettext/glade]ui/preferences-dialog.ui
[type: gettext/glade]ui/remove_confirm.glade
[type: gettext/glade]ui/toolbar_empty_menu.ui
[type: gettext/glade]ui/toolbar_mark_menu.ui
[type: gettext/glade]ui/upgrade_dialog.glade
......@@ -298,6 +298,7 @@ engine/util/util-html.vala
engine/util/util-imap-utf7.vala
engine/util/util-inet.vala
engine/util/util-iterable.vala
engine/util/util-js.vala
engine/util/util-numeric.vala
engine/util/util-object.vala
engine/util/util-reference-semantics.vala
......@@ -306,6 +307,7 @@ engine/util/util-stream.vala
engine/util/util-string.vala
engine/util/util-synchronization.vala
engine/util/util-time.vala
engine/util/util-timeout-manager.vala
engine/util/util-trillian.vala
${CMAKE_BINARY_DIR}/geary-version.vala
......@@ -331,6 +333,7 @@ client/accounts/account-spinner-page.vala
client/accounts/add-edit-page.vala
client/accounts/login-dialog.vala
client/components/client-web-view.vala
client/components/count-badge.vala
client/components/empty-placeholder.vala
client/components/folder-popover.vala
......@@ -342,19 +345,19 @@ client/components/monitored-spinner.vala
client/components/search-bar.vala
client/components/status-bar.vala
client/components/stock.vala
client/components/stylish-webview.vala
client/composer/composer-box.vala
client/composer/composer-container.vala
client/composer/composer-embed.vala
client/composer/composer-headerbar.vala
client/composer/composer-link-popover.vala
client/composer/composer-web-view.vala
client/composer/composer-widget.vala
client/composer/composer-window.vala
client/composer/contact-entry-completion.vala
client/composer/contact-list-store.vala
client/composer/email-entry.vala
client/composer/spell-check-popover.vala
client/composer/webview-edit-fixer.vala
client/conversation-list/conversation-list-cell-renderer.vala
client/conversation-list/conversation-list-store.vala
......@@ -399,12 +402,16 @@ client/sidebar/sidebar-tree.vala
client/util/util-date.vala
client/util/util-email.vala
client/util/util-files.vala
client/util/util-gio.vala
client/util/util-gravatar.vala
client/util/util-gtk.vala
client/util/util-international.vala
client/util/util-random.vala
client/util/util-webkit.vala
client/util/util-migrate.vala
client/util/util-webkit.vala
)
set(WEB_PROCESS_SRC
client/web-process/web-process-extension.vala
)
set(CONSOLE_SRC
......@@ -481,7 +488,6 @@ else ()
)
endif ()
pkg_check_modules(DEPS REQUIRED
gthread-2.0
glib-2.0>=${TARGET_GLIB}.0
......@@ -497,7 +503,9 @@ pkg_check_modules(DEPS REQUIRED
libxml-2.0>=2.7.8
gcr-3>=3.10.1
gobject-introspection-1.0
webkitgtk-3.0>=2.4.0
webkit2gtk-4.0>=${TARGET_WEBKIT}
webkit2gtk-web-extension-4.0>=${TARGET_WEBKIT}
javascriptcoregtk-4.0>=${TARGET_WEBKIT}
enchant>=1.6
${EXTRA_CLIENT_PKG_CONFIG}
)
......@@ -516,6 +524,7 @@ set(ENGINE_PACKAGES
gio-2.0
glib-2.0
gmime-2.6
javascriptcore-4.0
libxml-2.0
posix
sqlite3
......@@ -531,10 +540,20 @@ set(CLIENT_PACKAGES
libnotify
libsecret-1
libsoup-2.4
webkitgtk-3.0
webkit2gtk-4.0
${EXTRA_CLIENT_PACKAGES}
)
# webkit2gtk-web-extension-4.0 is included as custom VAPI below
set(WEB_PROCESS_PACKAGES
geary-engine
gee-0.8
gtk+-3.0
javascriptcore-4.0
libsoup-2.4
webkit2gtk-web-extension-4.0
)
set(CONSOLE_PACKAGES
geary-engine
gtk+-3.0
......@@ -546,6 +565,7 @@ set(CFLAGS
${DEPS_CFLAGS}
${DEPS_CFLAGS_OTHER}
-D_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\"
-D_BUILD_ROOT_DIR=\"${CMAKE_BINARY_DIR}\"
-D_SOURCE_ROOT_DIR=\"${CMAKE_SOURCE_DIR}\"
-D_GSETTINGS_DIR=\"${CMAKE_BINARY_DIR}/gsettings\"
-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"
......@@ -582,18 +602,14 @@ else ()
message(STATUS "POODLE SSLv3 fix: ON")
endif ()
set(WEBKITGTK_METADATA_DIR webkitgtk-2.4)
set(WEBKITGTK_CUSTOM_VALA webkitgtk-2.4/WebKit-3.0-custom.vala)
set(LIB_PATHS ${DEPS_LIBRARY_DIRS})
link_directories(${LIB_PATHS})
add_definitions(${CFLAGS})
set(VALAC_OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi
--vapidir=${CMAKE_BINARY_DIR}/src
--vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi
--metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata
--metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata/${WEBKITGTK_METADATA_DIR}
--target-glib=${TARGET_GLIB}
--thread
--debug
......@@ -617,20 +633,44 @@ OPTIONS
add_library(geary-engine STATIC ${ENGINE_VALA_C})
add_dependencies(geary-engine git-version)
# Build the library statically so we can it statically, but make it
# relocatable so we can link it to the web extension dynamic lib.
set_property(
TARGET geary-engine
PROPERTY POSITION_INDEPENDENT_CODE TRUE
)
target_link_libraries(geary-engine m ${DEPS_LIBRARIES} sqlite3-unicodesn)
# WebKitGTK VAPI generation
# WebKit2GTK VAPI generation
#################################################
add_custom_target(webkitgtk-vapi
DEPENDS "${CMAKE_BINARY_DIR}/src/webkitgtk-3.0.vapi"
add_custom_target(webkit2gtk-vapi
DEPENDS
"${CMAKE_BINARY_DIR}/src/webkit2gtk-4.0.vapi"
"${CMAKE_BINARY_DIR}/src/webkit2gtk-web-extension-4.0.vapi"
"${CMAKE_SOURCE_DIR}/bindings/vapi/javascriptcore-4.0.vapi"
)
add_custom_command(
OUTPUT
${CMAKE_BINARY_DIR}/src/webkit2gtk-4.0.vapi
DEPENDS
"${CMAKE_SOURCE_DIR}/bindings/metadata/WebKit2-4.0.metadata"
"${CMAKE_SOURCE_DIR}/bindings/vapi/javascriptcore-4.0.vapi"
WORKING_DIRECTORY
"${CMAKE_SOURCE_DIR}/bindings/metadata"
COMMAND
vapigen --library=webkit2gtk-4.0 --pkg gtk+-3.0 --pkg libsoup-2.4 --pkg javascriptcore-4.0 --vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi --metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata --directory=${CMAKE_BINARY_DIR}/src `${PKG_CONFIG_EXECUTABLE} --variable=girdir gobject-introspection-1.0`/WebKit2-4.0.gir
)
add_custom_command(
OUTPUT
"${CMAKE_BINARY_DIR}/src/webkitgtk-3.0.vapi"
"${CMAKE_BINARY_DIR}/src/webkit2gtk-web-extension-4.0.vapi"
DEPENDS
"${CMAKE_SOURCE_DIR}/bindings/metadata/WebKit2WebExtension-4.0.metadata"
"${CMAKE_SOURCE_DIR}/bindings/metadata/WebKit2WebExtension-4.0-custom.vala"
"${CMAKE_SOURCE_DIR}/bindings/vapi/javascriptcore-4.0.vapi"
WORKING_DIRECTORY
"${CMAKE_SOURCE_DIR}/bindings/metadata"
COMMAND
vapigen --pkg=gio-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 --metadatadir=. --metadatadir=${WEBKITGTK_METADATA_DIR} --library=webkitgtk-3.0 --directory=${CMAKE_BINARY_DIR}/src ${WEBKITGTK_CUSTOM_VALA} `${PKG_CONFIG_EXECUTABLE} --variable=girdir gobject-introspection-1.0`/WebKit-3.0.gir
vapigen --library=webkit2gtk-web-extension-4.0 --pkg gtk+-3.0 --pkg libsoup-2.4 --pkg javascriptcore-4.0 --vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi --metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata --directory=${CMAKE_BINARY_DIR}/src `${PKG_CONFIG_EXECUTABLE} --variable=girdir gobject-introspection-1.0`/WebKit2WebExtension-4.0.gir WebKit2WebExtension-4.0-custom.vala
)
# Client library (static lib used for building client and unit tests)
......@@ -649,7 +689,7 @@ OPTIONS
)
add_library(geary-client STATIC ${CLIENT_VALA_C})
add_dependencies(geary-client resource_copy webkitgtk-vapi)
add_dependencies(geary-client resource_copy webkit2gtk-vapi)
target_link_libraries(geary-client m ${DEPS_LIBRARIES} geary-engine)
# Main client application binary
......@@ -683,6 +723,21 @@ add_custom_command(
include(GSettings)
add_schemas(geary ${GSETTINGS_DIR} ${CMAKE_INSTALL_PREFIX})
# Client web process extension library
#################################################
vala_precompile(WEB_PROCESS_VALA_C geary-web-process
${WEB_PROCESS_SRC}
PACKAGES
${WEB_PROCESS_PACKAGES}
${ENGINE_PACKAGES} ## XXX REMOVE ME
OPTIONS
${VALAC_OPTIONS}
)
add_library(geary-web-process MODULE ${WEB_PROCESS_VALA_C})
target_link_libraries(geary-web-process PRIVATE ${DEPS_LIBRARIES} geary-engine)
install(TARGETS geary-web-process LIBRARY DESTINATION lib/geary/web-extensions)
# Console app
#################################################
vala_precompile(CONSOLE_VALA_C geary-console
......
......@@ -178,8 +178,8 @@ public class AddEditPage : Gtk.Box {
private Gtk.CheckButton check_use_email_signature;
private Gtk.Stack signature_stack;
private Gtk.TextView textview_email_signature;
private StylishWebView preview_webview;
private ClientWebView preview_webview;
private Gtk.Alignment other_info;
// IMAP info widgets
......@@ -271,13 +271,14 @@ public class AddEditPage : Gtk.Box {