Skip to content

Commit

Permalink
Merge r231004 - [WPE] Remove deprecated functions and properties from…
Browse files Browse the repository at this point in the history
… the API

https://bugs.webkit.org/show_bug.cgi?id=179295

Reviewed by Žan Doberšek.

Source/WebKit:

* UIProcess/API/glib/WebKitCookieManager.cpp:
* UIProcess/API/glib/WebKitFormSubmissionRequest.cpp:
* UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp:
(webkitNavigationPolicyDecisionGetProperty):
(webkit_navigation_policy_decision_class_init):
* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextGetProperty):
(webkitWebContextSetProperty):
(webkit_web_context_class_init):
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewHandleAuthenticationChallenge):
(webkitWebViewWebProcessTerminated):
* UIProcess/API/wpe/WebKitCookieManager.h:
* UIProcess/API/wpe/WebKitFormSubmissionRequest.h:
* UIProcess/API/wpe/WebKitNavigationPolicyDecision.h:
* UIProcess/API/wpe/WebKitSettings.h:
* UIProcess/API/wpe/WebKitWebContext.h:

Tools:

* TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
(testWebViewAuthenticationStorage): Disable this test for now. It will require some effort
to rewrite LoadTrackingTest to not require the web view at construction time.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings): Don't test private browsing setting, which is gone.
* TestWebKitAPI/glib/CMakeLists.txt: Disable TestCookieManager for now.
  • Loading branch information
mcatanzaro committed May 9, 2018
1 parent 33e2145 commit 7fed843
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 45 deletions.
30 changes: 30 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,33 @@
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Remove deprecated functions and properties from the API
https://bugs.webkit.org/show_bug.cgi?id=179295

Reviewed by Žan Doberšek.

* UIProcess/API/glib/WebKitCookieManager.cpp:
* UIProcess/API/glib/WebKitFormSubmissionRequest.cpp:
* UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp:
(webkitNavigationPolicyDecisionGetProperty):
(webkit_navigation_policy_decision_class_init):
* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextGetProperty):
(webkitWebContextSetProperty):
(webkit_web_context_class_init):
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewHandleAuthenticationChallenge):
(webkitWebViewWebProcessTerminated):
* UIProcess/API/wpe/WebKitCookieManager.h:
* UIProcess/API/wpe/WebKitFormSubmissionRequest.h:
* UIProcess/API/wpe/WebKitNavigationPolicyDecision.h:
* UIProcess/API/wpe/WebKitSettings.h:
* UIProcess/API/wpe/WebKitWebContext.h:

2018-04-15 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Install files needed for WebKitWebExtensions
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp
Expand Up @@ -420,6 +420,7 @@ gboolean webkit_cookie_manager_delete_cookie_finish(WebKitCookieManager* manager
return g_task_propagate_boolean(G_TASK(result), error);
}

#if PLATFORM(GTK)
/**
* webkit_cookie_manager_get_domains_with_cookies:
* @cookie_manager: a #WebKitCookieManager
Expand Down Expand Up @@ -518,3 +519,4 @@ void webkit_cookie_manager_delete_all_cookies(WebKitCookieManager* manager)

webkit_website_data_manager_clear(manager->priv->dataManager, WEBKIT_WEBSITE_DATA_COOKIES, 0, nullptr, nullptr, nullptr);
}
#endif
Expand Up @@ -86,6 +86,7 @@ WebKitFormSubmissionRequest* webkitFormSubmissionRequestCreate(const Vector<std:
return request;
}

#if PLATFORM(GTK)
/**
* webkit_form_submission_request_get_text_fields:
* @request: a #WebKitFormSubmissionRequest
Expand Down Expand Up @@ -115,6 +116,7 @@ GHashTable* webkit_form_submission_request_get_text_fields(WebKitFormSubmissionR

return request->priv->values.get();
}
#endif

/**
* webkit_form_submission_request_list_text_fields:
Expand Down
Expand Up @@ -59,10 +59,12 @@ WEBKIT_DEFINE_TYPE(WebKitNavigationPolicyDecision, webkit_navigation_policy_deci
enum {
PROP_0,
PROP_NAVIGATION_ACTION,
#if PLATFORM(GTK)
PROP_NAVIGATION_TYPE,
PROP_MOUSE_BUTTON,
PROP_MODIFIERS,
PROP_REQUEST,
#endif
PROP_FRAME_NAME,
};

Expand All @@ -73,6 +75,7 @@ static void webkitNavigationPolicyDecisionGetProperty(GObject* object, guint pro
case PROP_NAVIGATION_ACTION:
g_value_set_boxed(value, webkit_navigation_policy_decision_get_navigation_action(decision));
break;
#if PLATFORM(GTK)
case PROP_NAVIGATION_TYPE:
g_value_set_enum(value, webkit_navigation_action_get_navigation_type(decision->priv->navigationAction));
break;
Expand All @@ -85,6 +88,7 @@ static void webkitNavigationPolicyDecisionGetProperty(GObject* object, guint pro
case PROP_REQUEST:
g_value_set_object(value, webkit_navigation_action_get_request(decision->priv->navigationAction));
break;
#endif
case PROP_FRAME_NAME:
g_value_set_string(value, webkit_navigation_policy_decision_get_frame_name(decision));
break;
Expand Down Expand Up @@ -116,6 +120,7 @@ static void webkit_navigation_policy_decision_class_init(WebKitNavigationPolicyD
WEBKIT_TYPE_NAVIGATION_ACTION,
WEBKIT_PARAM_READABLE));

#if PLATFORM(GTK)
/**
* WebKitNavigationPolicyDecision:navigation-type:
*
Expand Down Expand Up @@ -187,6 +192,7 @@ static void webkit_navigation_policy_decision_class_init(WebKitNavigationPolicyD
_("The URI request that is associated with this navigation"),
WEBKIT_TYPE_URI_REQUEST,
WEBKIT_PARAM_READABLE));
#endif

/**
* WebKitNavigationPolicyDecision:frame-name:
Expand Down Expand Up @@ -221,6 +227,7 @@ WebKitNavigationAction* webkit_navigation_policy_decision_get_navigation_action(
return decision->priv->navigationAction;
}

#if PLATFORM(GTK)
/**
* webkit_navigation_policy_decision_get_navigation_type:
* @decision: a #WebKitNavigationPolicyDecision
Expand Down Expand Up @@ -284,6 +291,7 @@ WebKitURIRequest* webkit_navigation_policy_decision_get_request(WebKitNavigation
g_return_val_if_fail(WEBKIT_IS_NAVIGATION_POLICY_DECISION(decision), nullptr);
return webkit_navigation_action_get_request(decision->priv->navigationAction);
}
#endif

/**
* webkit_navigation_policy_decision_get_frame_name:
Expand Down
10 changes: 10 additions & 0 deletions Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
Expand Up @@ -127,7 +127,9 @@ enum {
PROP_DEFAULT_MONOSPACE_FONT_SIZE,
PROP_MINIMUM_FONT_SIZE,
PROP_DEFAULT_CHARSET,
#if PLATFORM(GTK)
PROP_ENABLE_PRIVATE_BROWSING,
#endif
PROP_ENABLE_DEVELOPER_EXTRAS,
PROP_ENABLE_RESIZABLE_TEXT_AREAS,
PROP_ENABLE_TABS_TO_LINKS,
Expand Down Expand Up @@ -266,11 +268,13 @@ static void webKitSettingsSetProperty(GObject* object, guint propId, const GValu
case PROP_DEFAULT_CHARSET:
webkit_settings_set_default_charset(settings, g_value_get_string(value));
break;
#if PLATFORM(GTK)
case PROP_ENABLE_PRIVATE_BROWSING:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
webkit_settings_set_enable_private_browsing(settings, g_value_get_boolean(value));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
#endif
case PROP_ENABLE_DEVELOPER_EXTRAS:
webkit_settings_set_enable_developer_extras(settings, g_value_get_boolean(value));
break;
Expand Down Expand Up @@ -443,11 +447,13 @@ static void webKitSettingsGetProperty(GObject* object, guint propId, GValue* val
case PROP_DEFAULT_CHARSET:
g_value_set_string(value, webkit_settings_get_default_charset(settings));
break;
#if PLATFORM(GTK)
case PROP_ENABLE_PRIVATE_BROWSING:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_value_set_boolean(value, webkit_settings_get_enable_private_browsing(settings));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
#endif
case PROP_ENABLE_DEVELOPER_EXTRAS:
g_value_set_boolean(value, webkit_settings_get_enable_developer_extras(settings));
break;
Expand Down Expand Up @@ -879,6 +885,7 @@ static void webkit_settings_class_init(WebKitSettingsClass* klass)
"iso-8859-1",
readWriteConstructParamFlags));

#if PLATFORM(GTK)
/**
* WebKitSettings:enable-private-browsing:
*
Expand All @@ -894,6 +901,7 @@ static void webkit_settings_class_init(WebKitSettingsClass* klass)
_("Whether to enable private browsing"),
FALSE,
readWriteConstructParamFlags));
#endif

/**
* WebKitSettings:enable-developer-extras:
Expand Down Expand Up @@ -2242,6 +2250,7 @@ void webkit_settings_set_default_charset(WebKitSettings* settings, const gchar*
g_object_notify(G_OBJECT(settings), "default-charset");
}

#if PLATFORM(GTK)
/**
* webkit_settings_get_enable_private_browsing:
* @settings: a #WebKitSettings
Expand Down Expand Up @@ -2280,6 +2289,7 @@ void webkit_settings_set_enable_private_browsing(WebKitSettings* settings, gbool
priv->preferences->setPrivateBrowsingEnabled(enabled);
g_object_notify(G_OBJECT(settings), "enable-private-browsing");
}
#endif

/**
* webkit_settings_get_enable_developer_extras:
Expand Down
10 changes: 10 additions & 0 deletions Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
Expand Up @@ -109,7 +109,9 @@ using namespace WebKit;
enum {
PROP_0,

#if PLATFORM(GTK)
PROP_LOCAL_STORAGE_DIRECTORY,
#endif
PROP_WEBSITE_DATA_MANAGER
};

Expand Down Expand Up @@ -273,9 +275,11 @@ static void webkitWebContextGetProperty(GObject* object, guint propID, GValue* v
WebKitWebContext* context = WEBKIT_WEB_CONTEXT(object);

switch (propID) {
#if PLATFORM(GTK)
case PROP_LOCAL_STORAGE_DIRECTORY:
g_value_set_string(value, context->priv->localStorageDirectory.data());
break;
#endif
case PROP_WEBSITE_DATA_MANAGER:
g_value_set_object(value, webkit_web_context_get_website_data_manager(context));
break;
Expand All @@ -289,9 +293,11 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa
WebKitWebContext* context = WEBKIT_WEB_CONTEXT(object);

switch (propID) {
#if PLATFORM(GTK)
case PROP_LOCAL_STORAGE_DIRECTORY:
context->priv->localStorageDirectory = g_value_get_string(value);
break;
#endif
case PROP_WEBSITE_DATA_MANAGER: {
gpointer manager = g_value_get_object(value);
context->priv->websiteDataManager = manager ? WEBKIT_WEBSITE_DATA_MANAGER(manager) : nullptr;
Expand Down Expand Up @@ -394,6 +400,7 @@ static void webkit_web_context_class_init(WebKitWebContextClass* webContextClass
gObjectClass->constructed = webkitWebContextConstructed;
gObjectClass->dispose = webkitWebContextDispose;

#if PLATFORM(GTK)
/**
* WebKitWebContext:local-storage-directory:
*
Expand All @@ -412,6 +419,7 @@ static void webkit_web_context_class_init(WebKitWebContextClass* webContextClass
_("The directory where local storage data will be saved"),
nullptr,
static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
#endif

/**
* WebKitWebContext:website-data-manager:
Expand Down Expand Up @@ -1337,6 +1345,7 @@ void webkit_web_context_set_web_extensions_initialization_user_data(WebKitWebCon
context->priv->webExtensionsInitializationUserData = userData;
}

#if PLATFORM(GTK)
/**
* webkit_web_context_set_disk_cache_directory:
* @context: a #WebKitWebContext
Expand All @@ -1359,6 +1368,7 @@ void webkit_web_context_set_disk_cache_directory(WebKitWebContext* context, cons

context->priv->processPool->configuration().setDiskCacheDirectory(WebCore::FileSystem::pathByAppendingComponent(WebCore::FileSystem::stringFromFileSystemRepresentation(directory), networkCacheSubdirectory));
}
#endif

/**
* webkit_web_context_prefetch_dns:
Expand Down
10 changes: 10 additions & 0 deletions Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
Expand Up @@ -144,7 +144,9 @@ enum {

INSECURE_CONTENT_DETECTED,

#if PLATFORM(GTK)
WEB_PROCESS_CRASHED,
#endif
WEB_PROCESS_TERMINATED,

AUTHENTICATE,
Expand Down Expand Up @@ -1791,6 +1793,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_NONE, 1,
WEBKIT_TYPE_INSECURE_CONTENT_EVENT);

#if PLATFORM(GTK)
/**
* WebKitWebView::web-process-crashed:
* @web_view: the #WebKitWebView
Expand All @@ -1810,6 +1813,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
g_signal_accumulator_true_handled, nullptr,
g_cclosure_marshal_generic,
G_TYPE_BOOLEAN, 0);
#endif

/**
* WebKitWebView::web-process-terminated:
Expand Down Expand Up @@ -2345,9 +2349,13 @@ void webkitWebViewSubmitFormRequest(WebKitWebView* webView, WebKitFormSubmission

void webkitWebViewHandleAuthenticationChallenge(WebKitWebView* webView, AuthenticationChallengeProxy* authenticationChallenge)
{
#if PLATFORM(GTK)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gboolean privateBrowsingEnabled = webView->priv->isEphemeral || webkit_settings_get_enable_private_browsing(webView->priv->settings.get());
G_GNUC_END_IGNORE_DEPRECATIONS;
#else
gboolean privateBrowsingEnabled = webView->priv->isEphemeral;
#endif
webView->priv->authenticationRequest = adoptGRef(webkitAuthenticationRequestCreate(authenticationChallenge, privateBrowsingEnabled));
gboolean returnValue;
g_signal_emit(webView, signals[AUTHENTICATE], 0, webView->priv->authenticationRequest.get(), &returnValue);
Expand Down Expand Up @@ -3835,10 +3843,12 @@ cairo_surface_t* webkit_web_view_get_snapshot_finish(WebKitWebView* webView, GAs

void webkitWebViewWebProcessTerminated(WebKitWebView* webView, WebKitWebProcessTerminationReason reason)
{
#if PLATFORM(GTK)
if (reason == WEBKIT_WEB_PROCESS_CRASHED) {
gboolean returnValue;
g_signal_emit(webView, signals[WEB_PROCESS_CRASHED], 0, &returnValue);
}
#endif
g_signal_emit(webView, signals[WEB_PROCESS_TERMINATED], 0, reason);
}

Expand Down
18 changes: 0 additions & 18 deletions Source/WebKit/UIProcess/API/wpe/WebKitCookieManager.h
Expand Up @@ -145,24 +145,6 @@ webkit_cookie_manager_delete_cookie_finish (WebKitCookieManager
GAsyncResult *result,
GError **error);

WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_fetch) void
webkit_cookie_manager_get_domains_with_cookies (WebKitCookieManager *cookie_manager,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);

WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_fetch_finish) gchar **
webkit_cookie_manager_get_domains_with_cookies_finish (WebKitCookieManager *cookie_manager,
GAsyncResult *result,
GError **error);

WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_remove) void
webkit_cookie_manager_delete_cookies_for_domain (WebKitCookieManager *cookie_manager,
const gchar *domain);

WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_clear) void
webkit_cookie_manager_delete_all_cookies (WebKitCookieManager *cookie_manager);

G_END_DECLS

#endif
3 changes: 0 additions & 3 deletions Source/WebKit/UIProcess/API/wpe/WebKitFormSubmissionRequest.h
Expand Up @@ -59,9 +59,6 @@ struct _WebKitFormSubmissionRequestClass {
WEBKIT_API GType
webkit_form_submission_request_get_type (void);

WEBKIT_DEPRECATED_FOR(webkit_form_submission_request_list_text_fields) GHashTable *
webkit_form_submission_request_get_text_fields (WebKitFormSubmissionRequest *request);

WEBKIT_API gboolean
webkit_form_submission_request_list_text_fields (WebKitFormSubmissionRequest *request,
GPtrArray **field_names,
Expand Down
12 changes: 0 additions & 12 deletions Source/WebKit/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h
Expand Up @@ -65,18 +65,6 @@ webkit_navigation_policy_decision_get_type (void);
WEBKIT_API WebKitNavigationAction *
webkit_navigation_policy_decision_get_navigation_action (WebKitNavigationPolicyDecision *decision);

WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) WebKitNavigationType
webkit_navigation_policy_decision_get_navigation_type (WebKitNavigationPolicyDecision *decision);

WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) guint
webkit_navigation_policy_decision_get_mouse_button (WebKitNavigationPolicyDecision *decision);

WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) guint
webkit_navigation_policy_decision_get_modifiers (WebKitNavigationPolicyDecision *decision);

WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) WebKitURIRequest *
webkit_navigation_policy_decision_get_request (WebKitNavigationPolicyDecision *decision);

WEBKIT_API const gchar *
webkit_navigation_policy_decision_get_frame_name (WebKitNavigationPolicyDecision *decision);

Expand Down
7 changes: 0 additions & 7 deletions Source/WebKit/UIProcess/API/wpe/WebKitSettings.h
Expand Up @@ -236,13 +236,6 @@ WEBKIT_API void
webkit_settings_set_default_charset (WebKitSettings *settings,
const gchar *default_charset);

WEBKIT_DEPRECATED gboolean
webkit_settings_get_enable_private_browsing (WebKitSettings *settings);

WEBKIT_DEPRECATED void
webkit_settings_set_enable_private_browsing (WebKitSettings *settings,
gboolean enabled);

WEBKIT_API gboolean
webkit_settings_get_enable_developer_extras (WebKitSettings *settings);

Expand Down
4 changes: 0 additions & 4 deletions Source/WebKit/UIProcess/API/wpe/WebKitWebContext.h
Expand Up @@ -284,10 +284,6 @@ WEBKIT_API void
webkit_web_context_prefetch_dns (WebKitWebContext *context,
const gchar *hostname);

WEBKIT_DEPRECATED_FOR(webkit_web_context_new_with_website_data_manager) void
webkit_web_context_set_disk_cache_directory (WebKitWebContext *context,
const gchar *directory);

WEBKIT_API void
webkit_web_context_allow_tls_certificate_for_host (WebKitWebContext *context,
GTlsCertificate *certificate,
Expand Down

0 comments on commit 7fed843

Please sign in to comment.