[Fetch API] Add support to ReferrerPolicy
Created attachment 285012 [details] Patch
Attachment 285012 [details] did not pass style-queue: ERROR: Source/WebCore/loader/ThreadableLoaderClientWrapper.h:98: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 1 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 285012 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285012&action=review > Source/WebCore/Modules/fetch/FetchRequest.cpp:298 > + if (m_internalRequest.referrer != "no-referrer" && m_internalRequest.referrer != "client") It seems like a case-sensitive check is correct in this case. Could you add a test that tests No-Referrer and Client? Could we use enum values instead of doing several string comparisons here? > Source/WebCore/workers/WorkerScriptLoader.cpp:84 > ASSERT(client); > + ASSERT(scriptExecutionContext); We should come back later and make all these references instead of pointers at the callers.
Thanks for the review. (In reply to comment #3) > Comment on attachment 285012 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=285012&action=review > > > Source/WebCore/Modules/fetch/FetchRequest.cpp:298 > > + if (m_internalRequest.referrer != "no-referrer" && m_internalRequest.referrer != "client") > > It seems like a case-sensitive check is correct in this case. Could you add > a test that tests No-Referrer and Client? > Could we use enum values instead of doing several string comparisons here? I will add a FIXME. I do not like the current handling of referrer. Although convenient, it is odd to pass it in the headers as it only serves to compute the actual value in CachedResource. I would much prefer to pass it as a field in a structure like CachedResourceRequest for instance. The same applies to Origin. > > Source/WebCore/workers/WorkerScriptLoader.cpp:84 > > ASSERT(client); > > + ASSERT(scriptExecutionContext); > > We should come back later and make all these references instead of pointers > at the callers. Right.
Created attachment 285078 [details] Patch for landing
Attachment 285078 [details] did not pass style-queue: ERROR: Source/WebCore/loader/ThreadableLoaderClientWrapper.h:98: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 1 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 285078 [details] Patch for landing Clearing flags on attachment: 285078 Committed r204019: <http://trac.webkit.org/changeset/204019>
All reviewed patches have been landed. Closing bug.
Reopening to attach new patch.
Created attachment 285080 [details] Patch for landing