https://bugs.webkit.org/show_bug.cgi?id=189505
Reviewed by Michael Catanzaro.
Add notes to the API documentation to make explicit where modification
of WebKitURIRequest instances affects the request data sent over the
network.
* UIProcess/API/glib/WebKitNavigationAction.cpp: Clarify that
modifications to the associated WebKitURIRequest do not affect the
actual request. Point to WebKitPage::send-request instead.
* UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Ditto.
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_class_init): Ditto for the description of the
WebKitWebView::decide-policy signal. Also fix the syntax of example.
* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
(webkit_web_page_class_init): Indicate that modifications to the
WebKitURIRequest will change the actual network request data.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235909
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-09-11 Adrian Perez de Castro <aperez@igalia.com>
+
+ [WPE][GTK] API documentation is unclear about how to modify requests before sending them
+ https://bugs.webkit.org/show_bug.cgi?id=189505
+
+ Reviewed by Michael Catanzaro.
+
+ Add notes to the API documentation to make explicit where modification
+ of WebKitURIRequest instances affects the request data sent over the
+ network.
+
+ * UIProcess/API/glib/WebKitNavigationAction.cpp: Clarify that
+ modifications to the associated WebKitURIRequest do not affect the
+ actual request. Point to WebKitPage::send-request instead.
+ * UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Ditto.
+ * UIProcess/API/glib/WebKitWebView.cpp:
+ (webkit_web_view_class_init): Ditto for the description of the
+ WebKitWebView::decide-policy signal. Also fix the syntax of example.
+ * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
+ (webkit_web_page_class_init): Indicate that modifications to the
+ WebKitURIRequest will change the actual network request data.
+
2018-09-11 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, attempt to fix Apple builds after r235903
* webkit_navigation_action_get_request:
* @navigation: a #WebKitNavigationAction
*
- * Return the navigation #WebKitURIRequest
+ * Return the #WebKitURIRequest associated with the navigation action.
+ * Modifications to the returned object are <emphasis>not</emphasis> taken
+ * into account when the request is sent over the network, and is intended
+ * only to aid in evaluating whether a navigation action should be taken or
+ * not. To modify requests before they are sent over the network the
+ * #WebKitPage::send-request signal can be used instead.
*
* Returns: (transfer none): a #WebKitURIRequest
*
* webkit_response_policy_decision_get_request:
* @decision: a #WebKitResponsePolicyDecision
*
- * Gets the value of the #WebKitResponsePolicyDecision:request property.
+ * Return the #WebKitURIRequest associated with the response decision.
+ * Modifications to the returned object are <emphasis>not</emphasis> taken
+ * into account when the request is sent over the network, and is intended
+ * only to aid in evaluating whether a response decision should be taken or
+ * not. To modify requests before they are sent over the network the
+ * #WebKitPage::send-request signal can be used instead.
*
* Returns: (transfer none): The URI request that is associated with this policy decision.
*/
* WebKitPolicyDecisionType type)
* {
* switch (type) {
- * case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
+ * case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: {
* WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
* /<!-- -->* Make a policy decision here. *<!-- -->/
* break;
- * case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
+ * }
+ * case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: {
* WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
* /<!-- -->* Make a policy decision here. *<!-- -->/
* break;
+ * }
* case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
* WebKitResponsePolicyDecision *response = WEBKIT_RESPONSE_POLICY_DECISION (decision);
* /<!-- -->* Make a policy decision here. *<!-- -->/
* @redirected_response parameter containing the response
* received by the server for the initial request.
*
+ * Modifications to the #WebKitURIRequest and its associated
+ * #SoupMessageHeaders will be taken into account when the request
+ * is sent over the network.
+ *
* Returns: %TRUE to stop other handlers from being invoked for the event.
* %FALSE to continue emission of the event.
*/