Bug 159413 - Remove ClientCredentialPolicy cross-origin option from ResourceLoaderOptions
Summary: Remove ClientCredentialPolicy cross-origin option from ResourceLoaderOptions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks: 151937
  Show dependency treegraph
 
Reported: 2016-07-05 01:04 PDT by youenn fablet
Modified: 2016-07-26 09:24 PDT (History)
9 users (show)

See Also:


Attachments
Patch (38.02 KB, patch)
2016-07-05 04:53 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (710.24 KB, application/zip)
2016-07-05 05:44 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (855.63 KB, application/zip)
2016-07-05 05:46 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (1.34 MB, application/zip)
2016-07-05 05:52 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (573.18 KB, application/zip)
2016-07-05 05:54 PDT, Build Bot
no flags Details
Rebasing test (40.38 KB, patch)
2016-07-05 06:35 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Removing WK1 expectation (42.42 KB, patch)
2016-07-05 07:15 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Rebasing (42.48 KB, patch)
2016-07-21 01:11 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (912.79 KB, application/zip)
2016-07-21 02:07 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (577.07 KB, application/zip)
2016-07-21 02:14 PDT, Build Bot
no flags Details
Fixed test (41.35 KB, patch)
2016-07-21 03:02 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (38.98 KB, patch)
2016-07-26 08:54 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2016-07-05 01:04:21 PDT
It is probably redundant with FetchOptions::Credentials
Comment 1 youenn fablet 2016-07-05 04:53:28 PDT
Created attachment 282769 [details]
Patch
Comment 2 youenn fablet 2016-07-05 04:56:08 PDT
Some options in Mac-specific AV loader code seems a bit odd: stored credentials are not allowed, credential mode is omit but credential request is ask-if-same-origin (see Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp and Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm).
I changed that to not-ask-for-any-credentials.
Comment 3 Build Bot 2016-07-05 05:44:16 PDT
Comment on attachment 282769 [details]
Patch

Attachment 282769 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1629716

New failing tests:
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
Comment 4 Build Bot 2016-07-05 05:44:19 PDT
Created attachment 282773 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Build Bot 2016-07-05 05:46:54 PDT
Comment on attachment 282769 [details]
Patch

Attachment 282769 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1629721

New failing tests:
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
Comment 6 Build Bot 2016-07-05 05:46:57 PDT
Created attachment 282774 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-07-05 05:52:53 PDT
Comment on attachment 282769 [details]
Patch

Attachment 282769 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1629731

New failing tests:
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
Comment 8 Build Bot 2016-07-05 05:52:56 PDT
Created attachment 282775 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-07-05 05:54:18 PDT
Comment on attachment 282769 [details]
Patch

Attachment 282769 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1629733

New failing tests:
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
Comment 10 Build Bot 2016-07-05 05:54:21 PDT
Created attachment 282776 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 11 youenn fablet 2016-07-05 06:35:21 PDT
Created attachment 282782 [details]
Rebasing test
Comment 12 youenn fablet 2016-07-05 07:15:58 PDT
Created attachment 282784 [details]
Removing WK1 expectation
Comment 13 youenn fablet 2016-07-21 01:11:55 PDT
Created attachment 284196 [details]
Rebasing
Comment 14 Build Bot 2016-07-21 02:07:26 PDT
Comment on attachment 284196 [details]
Rebasing

Attachment 284196 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1722575

New failing tests:
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
Comment 15 Build Bot 2016-07-21 02:07:29 PDT
Created attachment 284198 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 16 Build Bot 2016-07-21 02:14:46 PDT
Comment on attachment 284196 [details]
Rebasing

Attachment 284196 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1722581

New failing tests:
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
Comment 17 Build Bot 2016-07-21 02:14:49 PDT
Created attachment 284199 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
Comment 18 youenn fablet 2016-07-21 03:02:17 PDT
Created attachment 284202 [details]
Fixed test
Comment 19 Alex Christensen 2016-07-25 11:42:30 PDT
Comment on attachment 284202 [details]
Fixed test

View in context: https://bugs.webkit.org/attachment.cgi?id=284202&action=review

> Source/WebCore/ChangeLog:14
> +        Since DocumentThreadableLoader is already computing whether the request is cross-origin, it can also computes

computes -> compute

> Source/WebCore/loader/ResourceLoaderOptions.h:139
> +    ClientCredentialPolicy clientCredentialPolicy { ClientCredentialPolicy::CannotAskClientForCredentials };

This adds 6 bits to the size of ResourceLoaderOptions unnecessarily.  Can we still keep it small?

> LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic-expected.txt:-1
> -http://localhost:8800/fetch/api/resources/authentication.py?realm=test - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet

I don't think this part applies to trunk any more.
Comment 20 youenn fablet 2016-07-26 08:54:33 PDT
Created attachment 284594 [details]
Patch for landing
Comment 21 youenn fablet 2016-07-26 08:56:48 PDT
Thanks for the review.

> > Source/WebCore/ChangeLog:14
> > +        Since DocumentThreadableLoader is already computing whether the request is cross-origin, it can also computes
> 
> computes -> compute

OK

> > Source/WebCore/loader/ResourceLoaderOptions.h:139
> > +    ClientCredentialPolicy clientCredentialPolicy { ClientCredentialPolicy::CannotAskClientForCredentials };
> 
> This adds 6 bits to the size of ResourceLoaderOptions unnecessarily.  Can we
> still keep it small?

I removed uint8_t for the enum class.
Do you know why other enumerations are using it?

> > LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic-expected.txt:-1
> > -http://localhost:8800/fetch/api/resources/authentication.py?realm=test - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet
> 
> I don't think this part applies to trunk any more.

Indeed :)
Comment 22 WebKit Commit Bot 2016-07-26 09:24:20 PDT
Comment on attachment 284594 [details]
Patch for landing

Clearing flags on attachment: 284594

Committed r203720: <http://trac.webkit.org/changeset/203720>
Comment 23 WebKit Commit Bot 2016-07-26 09:24:26 PDT
All reviewed patches have been landed.  Closing bug.