Bug 121783 - [GTK][WK2] --disalble-credential-storage does not hide remember password checkbox
Summary: [GTK][WK2] --disalble-credential-storage does not hide remember password chec...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Manuel Rego Casasnovas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-23 04:42 PDT by Manuel Rego Casasnovas
Modified: 2015-07-07 10:04 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2013-09-23 04:46 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff
Patch (1.84 KB, patch)
2013-09-23 09:03 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rego Casasnovas 2013-09-23 04:42:34 PDT
In WebKitGTK+ 2.0.4 and WK2 --disalble-credential-storage does not hide the checkbox used to remember passwords.
Comment 1 Manuel Rego Casasnovas 2013-09-23 04:46:20 PDT
Created attachment 212340 [details]
Patch
Comment 2 Manuel Rego Casasnovas 2013-09-23 04:53:07 PDT
(In reply to comment #1)
> Created an attachment (id=212340) [details]
> Patch

Current patch applies in trunk and it's fixing the issue in the widget directly.

There's a different alternative to fix this problem, similar to current code (that won't apply in trunk):
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
index 0d9df77..bc43489 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
@@ -1740,10 +1740,13 @@ void webkitWebViewSubmitFormRequest(WebKitWebView* webView, WebKitFormSubmission
 void webkitWebViewHandleAuthenticationChallenge(WebKitWebView* webView, AuthenticationChallengeProxy* authenticationChallenge)
 {
     CredentialStorageMode credentialStorageMode;
-    if (webkit_settings_get_enable_private_browsing(webkit_web_view_get_settings(webView)))
-        credentialStorageMode = DisallowPersistentStorage;
-    else
+#if ENABLE(CREDENTIAL_STORAGE)
+    if (!webkit_settings_get_enable_private_browsing(webkit_web_view_get_settings(webView)))
         credentialStorageMode = AllowPersistentStorage;
+    else
+#else
+        credentialStorageMode = DisallowPersistentStorage;
+#endif
 
     webkitWebViewBaseAddAuthenticationDialog(WEBKIT_WEB_VIEW_BASE(webView), webkitAuthenticationDialogNew(authenticationChallenge, credentialStorageMode));
 }

The new API has already a similar #if (see http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.cpp#L143).

Please tell me your preferences and I can provide a different patch if required :-)
Comment 3 Martin Robinson 2013-09-23 07:30:07 PDT
I think the alternative fix is the way to go.
Comment 4 Manuel Rego Casasnovas 2013-09-23 09:03:38 PDT
Created attachment 212353 [details]
Patch

Patch implementing the other alternative. Take into account that this doesn't apply in trunk.
Comment 5 Martin Robinson 2013-09-23 13:26:50 PDT
Why won't the patch apply in trunk?
Comment 6 Manuel Rego Casasnovas 2013-09-23 13:33:57 PDT
(In reply to comment #5)
> Why won't the patch apply in trunk?

This code has changed, since we added the new API to configure the authentication dialogue. For example, see http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.cpp#L143

The problem is not present in trunk or in the last releases.

So, this patch only apply in webkit-2.0 branch (or in a tar of our last stable release 2.0.4).
Comment 7 Martin Robinson 2013-09-23 14:05:18 PDT
Ah, I see. Are we going to ship any more 2.0.x releases?
Comment 8 Manuel Rego Casasnovas 2013-09-23 14:43:31 PDT
(In reply to comment #7)
> Ah, I see. Are we going to ship any more 2.0.x releases?

According to CarlosGC yes.

We've already merged some patches as you can see in: https://trac.webkit.org/wiki/WebKitGTK/2.0.x
Comment 9 Michael Catanzaro 2015-07-07 10:04:24 PDT
Obsolete -> fixed ?