WebKit Bugzilla
Attachment 349403 Details for
Bug 189505
: [WPE][GTK] API documentation is unclear about how to modify requests before sending them
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189505-20180911195245.patch (text/plain), 5.94 KB, created by
Adrian Perez
on 2018-09-11 09:52:47 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Adrian Perez
Created:
2018-09-11 09:52:47 PDT
Size:
5.94 KB
patch
obsolete
>Subversion Revision: 235894 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index e60abee4189f1442afc52c598099305a20175ed1..72dc1a2e4a89f2ebdd032f4d3fa171e150cd73bc 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1 +1,23 @@ >+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 NOBODY (OOPS!). >+ >+ 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. >+ > == Rolled over to ChangeLog-2018-09-11 == >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitNavigationAction.cpp b/Source/WebKit/UIProcess/API/glib/WebKitNavigationAction.cpp >index a8db939bb8158109e1d53c2f249261beb125c9b8..c9d9ada0fee28ace5c3d104cb90dbd8b1bedd139 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitNavigationAction.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitNavigationAction.cpp >@@ -124,7 +124,12 @@ unsigned webkit_navigation_action_get_modifiers(WebKitNavigationAction* navigati > * 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 > * >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitResponsePolicyDecision.cpp b/Source/WebKit/UIProcess/API/glib/WebKitResponsePolicyDecision.cpp >index ee869d0d898d60ae6e48f526d432230e7adc827d..bf4001b407b6d2756de9dec74449e0e3c984eb68 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitResponsePolicyDecision.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitResponsePolicyDecision.cpp >@@ -114,7 +114,12 @@ static void webkit_response_policy_decision_class_init(WebKitResponsePolicyDecis > * 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. > */ >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >index e687311525f2414e04b580575a07d3d3dea353aa..5ac46cceed8952975c9221a7bd582b1903e745fd 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >@@ -1387,14 +1387,16 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) > * 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. *<!-- -->/ >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp >index 667cd81aff76df8034518757b1a2b1819f160a8b..47f0f04ce7f905d2b52217156e5c8481ae3ca6a2 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp >@@ -479,6 +479,10 @@ static void webkit_web_page_class_init(WebKitWebPageClass* klass) > * @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. > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189505
: 349403