Граф коммитов

29 Коммитов

Автор SHA1 Сообщение Дата
Ehsan Akhgari 2a127a2d67 Bug 1147668 - Correctly reflect video and track RequestContext values; r=smaug 2015-06-16 21:18:08 -04:00
Wes Kocher 3ae1cac20c Backed out changeset f46a712edf7e (bug 1147668) for assertion failures in test_access_control.html CLOSED TREE 2015-06-16 14:48:15 -07:00
Ehsan Akhgari 103e06656c Bug 1147668 - Correctly reflect video and track RequestContext values; r=smaug 2015-06-16 14:49:58 -04:00
Ehsan Akhgari aeecf7b38d Backed out changeset 7210dfe7ad78 (Bug 1147668) for test failure 2015-06-15 23:20:02 -04:00
Ehsan Akhgari 0096b1db1f Bug 1147668 - Correctly reflect video and track RequestContext values; r=smaug 2015-06-15 22:08:06 -04:00
Ehsan Akhgari cd8eec31d9 Bug 1174868 - Avoid storing RequestContext inside InternalRequest; r=nsm,bkelly,smaug
We are going to infer all RequestContext types from the corresponding
nsContentPolicyType. It no longer makes sense to store both of these on
InternalRequest.  This has the extra benefit that we don't need to worry
about keeping them in sync any more.
2015-06-15 21:36:04 -04:00
Ehsan Akhgari fe838f3834 Bug 1174849 - Remove "serviceworker" from RequestContext; r=smaug,bkelly 2015-06-15 21:36:01 -04:00
Marcos Caceres 8fc79cb285 Bug 1089255 - Implement and test manifest-src CSP directive. r=bholley, r=dveditz, r=ckerschb
---
 dom/base/nsContentPolicyUtils.h                    |   1 +
 dom/base/nsDataDocumentContentPolicy.cpp           |   3 +-
 dom/base/nsIContentPolicy.idl                      |   2 +-
 dom/base/nsIContentPolicyBase.idl                  |   7 +-
 dom/base/nsISimpleContentPolicy.idl                |   2 +-
 dom/base/test/csp/browser.ini                      |   4 +
 dom/base/test/csp/browser_test_web_manifest.js     | 265 +++++++++++++++++++++
 .../csp/browser_test_web_manifest_mixed_content.js |  55 +++++
 dom/base/test/csp/file_CSP_web_manifest.html       |   6 +
 dom/base/test/csp/file_CSP_web_manifest.json       |   1 +
 .../test/csp/file_CSP_web_manifest.json^headers^   |   1 +
 dom/base/test/csp/file_CSP_web_manifest_https.html |   4 +
 dom/base/test/csp/file_CSP_web_manifest_https.json |   1 +
 .../csp/file_CSP_web_manifest_mixed_content.html   |   9 +
 .../test/csp/file_CSP_web_manifest_remote.html     |   8 +
 dom/base/test/csp/file_csp_testserver.sjs          |  14 +-
 dom/base/test/csp/mochitest.ini                    |   7 +
 dom/base/test/moz.build                            |   5 +-
 dom/fetch/InternalRequest.cpp                      |   3 +
 dom/fetch/InternalRequest.h                        |   2 +-
 .../security/nsIContentSecurityPolicy.idl          |   3 +-
 dom/ipc/manifestMessages.js                        |  25 +-
 dom/security/nsCSPUtils.cpp                        |   7 +
 dom/security/nsCSPUtils.h                          |  10 +-
 dom/security/nsMixedContentBlocker.cpp             |   1 +
 dom/webidl/CSPDictionaries.webidl                  |   1 +
 extensions/permissions/nsContentBlocker.cpp        |   6 +-
 netwerk/mime/nsMimeTypes.h                         |   1 +
 28 files changed, 439 insertions(+), 15 deletions(-)
 create mode 100644 dom/base/test/csp/browser.ini
 create mode 100644 dom/base/test/csp/browser_test_web_manifest.js
 create mode 100644 dom/base/test/csp/browser_test_web_manifest_mixed_content.js
 create mode 100644 dom/base/test/csp/file_CSP_web_manifest.html
 create mode 100644 dom/base/test/csp/file_CSP_web_manifest.json
 create mode 100644 dom/base/test/csp/file_CSP_web_manifest.json^headers^
 create mode 100644 dom/base/test/csp/file_CSP_web_manifest_https.html
 create mode 100644 dom/base/test/csp/file_CSP_web_manifest_https.json
 create mode 100644 dom/base/test/csp/file_CSP_web_manifest_mixed_content.html
 create mode 100644 dom/base/test/csp/file_CSP_web_manifest_remote.html
2015-06-02 15:42:19 -04:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Andrea Marchesini 789ad8312d Bug 1156632 - Remove unused forward class declarations - patch 3 - dom/{events,xbl,xslt,xul} and others, r=ehsan 2015-04-22 08:29:18 +02:00
Ehsan Akhgari 47c59f235a Bug 1147699 - Part 1: Move Request::mContext to InternalRequest, and determine the mapping to nsContentPolicyType; r=nsm
As the documentation in InternalRequest.h in this patch shows, the
mapping between nsContentPolicyType and RequestContext is not complete
yet.  Because the InternalRequest object needs to know the actual
nsContentPolicyType in order for FetchDriver to be able to use that
information, we can't just store the RequestContext.  Therefore, this
patch adds both of these to InternalRequest.  Once we get to a stage
where we have a complete mapping of these values, we can store only one
of them and compute the other from it.  That requires addressing all of
the TODO comments in the InternalRequest.h documentation.
2015-03-30 08:42:31 -04:00
Andrew Overholt 51804b48fa Bug 1127552 - Add Telemetry to Fetch. r=nsm
Note when the Fetch is coming from the main thread or a worker.  Also
count Requests just passed through a Service Worker.

--HG--
extra : rebase_source : 5ab71144821a97f0ec1874d467da68f4fd171705
2015-03-27 06:47:00 -04:00
Ehsan Akhgari 1835ea57f2 Bug 1126819 - Part 2: Persist the Request.cache attribute in DOM Cache; r=bkelly 2015-03-23 15:46:58 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ben Kelly 92807f390b Bug 940273 -Part 1 - Fetch changes from maple twig to support Service Worker Cache. r=nsm,ehsan 2015-03-02 14:08:00 +01:00
Ben Kelly e3f6f3f034 Bug 1073231 Implement Request and Response Clone() methods. r=nsm r=baku 2015-02-19 20:24:24 -05:00
Nikhil Marathe b53e5f1ae8 Bug 1119037 - Add context attribute to Request. r=baku
--HG--
extra : transplant_source : p%1Cr%13%ED%F8%B1%B8D%9B%DC5%C6%EFEQD%CC%A2l
2015-01-27 15:43:09 -08:00
Nikhil Marathe ebb4d89793 Bug 1119026 - Respect skip serviceworker flag. r=baku,bkelly
--HG--
extra : rebase_source : 569b51af36fd8c19b59c5d01b88dadddc84d4153
2014-12-24 02:08:41 -08:00
Nikhil Marathe bf76a3c4e1 Bug 1112922 - Implement request referrer correctly in Fetch API. r=bkelly
--HG--
extra : rebase_source : 226756fee8b777ed30b07cce0f3c5879d66ccf80
2014-12-23 07:56:19 -08:00
Nikhil Marathe fe2215618d Bug 1119021 - Implement fetch() redirects correctly. r=bkelly
--HG--
extra : rebase_source : 763d1052fae35a101a6859548b9cb137066dd1c6
2015-01-07 13:47:18 -08:00
Nikhil Marathe dbe1b78cc2 Bug 1119021 - CORS support. r=baku,bkelly
Use nsCrossSiteListenerProxy.h helpers to implement CORS support.
Several CORS fixes and lots of CORS tests.

Fixes:
Use empty string stream if response has no stream.
Parse Access-Control-Expose-Headers correctly.
Copy over remaining InternalRequest constructor attributes and set unsafe request flag.
Call FailWithNetworkError() in more cases.
Add non-simple Request headers to unsafeHeaders list for CORS check.
Do not AsyncOpen channel directly when CORS preflight is required.
Fix check for simple request method (was checking the opposite condition).

--HG--
extra : rebase_source : 4b08f6a5959e470394c88249b39464b3b7d20948
2015-01-07 15:50:54 -08:00
Nikhil Marathe 2b1d550dca Bug 1119044 - Fetch API WebIDL Fixes. r=bkelly,baku
Add various [SameObject]/[NewObject] annotations.
Adds RequestCache enum.
Ensures that cors-with-forced-preflight is translated to cors in getter.
Reject cors-with-forced-preflight as a valid mode value in Request constructor.

--HG--
extra : rebase_source : 3a70d53965def8fe02deec307367b9fda3458935
2015-01-07 16:24:40 -08:00
Ryan VanderMeulen ea9aaf976e Backed out changeset 88970726eb6b (bug 1119044) for Werror bustage. 2015-01-13 13:26:52 -05:00
Nikhil Marathe 7fd4527a9a Bug 1119044 - Fetch API WebIDL Fixes. r=bkelly,baku
Add various [SameObject]/[NewObject] annotations.
Adds RequestCache enum.
Ensures that cors-with-forced-preflight is translated to cors in getter.
Reject cors-with-forced-preflight as a valid mode value in Request constructor.

--HG--
extra : rebase_source : 0b621e13dc5cdbf740fb7d380f96f1380cd5a3eb
extra : amend_source : 7ced6d36ed7212271163c6aa1baacc7d5ca39647
2015-01-07 16:24:40 -08:00
Nikhil Marathe b1aa271f55 Bug 1039846 - Patch 5: FetchDriver basic HTTP fetch support. r=baku,bkelly
This patch has the following big pieces:
HTTP support in FetchDriver, which requires the principal of the caller to be passed.
Managing worker lifetime when a fetch() call is in progress.
Managing worker lifetime when a Response body is being read.
Using nsIPipe to link network streams to Request/Response body streams.
Using nsIInputStreamPump to convert Request/Response body streams into respective types.

Folded:
Bug 1039846 - Fetch API: Use a pipe to immediately start writing HTTP body data to InternalResponse.
Bug 1039846 - Assert bodystream can be set only once
Bug 1039846 - Add feature when handling fetch responses on workers
Bug 1039846 - Try to retarget http fetch delivery off main thread.
Bug 1039846 - Safely consume body using nsIInputStreamPump on workers and main thread.
Bug 1039846 - Retarget body reading to stream transport service.

--HG--
extra : rebase_source : 809c4e799835ad6fd153b673cad70109d257ab6c
2014-12-10 00:51:59 -08:00
Nikhil Marathe 36db9eff13 Bug 1039846 - Patch 4: FetchDriver with about:, blob: and data: fetching. r=baku
--HG--
extra : transplant_source : o%29%0E%5D%90%11%FA%1ExO%26%7E%9D_%F2%E7%0B%FE%21%B2
2014-10-06 11:01:20 -07:00
Peter Van der Beken d76c717d3c Bug 1068740 - Consider putting union types in the binding files where they're used. r=bz.
--HG--
extra : rebase_source : 7e0b1e2f60757b7758704dab3672ee829f3e4085
2014-10-01 20:43:26 +02:00
Nikhil Marathe e1bbdf4cc1 Bug 1039846 - Split Headers into InternalHeaders. r=baku
--HG--
extra : rebase_source : 1b7e0a27e44f1e11ed84de7be18a19155d6750d5
2014-10-02 10:59:20 -07:00
Nikhil Marathe 68bb3e1d0c Bug 1039846 - Request implementation. r=baku
--HG--
extra : transplant_source : %E6%A1%EB%5C3%95%8A%B4%3F%5C%D8%28%B2%98%5E%A1%C2%E5%1C%EE
2014-09-23 22:03:20 -07:00