gecko-dev/dom/xhr
Bobby Holley d42f0733ac Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam
Our current machinery for enabling stylo requires a docshell - if there isn't
one, we default to the Gecko style system.

When getComputedStyle operates on an element without a presshell, it uses the
caller's presshell instead. If the element has previously been styled with
one style system (but no longer has a presshell), and the caller uses a
different style backend, using the caller's style system can cause crashes when
we pull bits of cached data off the DOM (like cached style attributes).

So we want to throw when window.getComputedStyle(element) is called for a
(window, element) pair with different style backends (which is what the next
patch in this bug does).

However, that causes a few failures where stylo-backed documents try to do
getComputedStyle on an XHR document (which, without a docshell, will use the
gecko style system).

So this patch does some work to propagate the creator's style backend into
various docshell-less documents. This should allow both chrome (which uses gecko)
and content (which uses stylo) to use getComputedStyle on the response document
for XHRs they create.

Note that the second patch in this bug will make
chromeWin.getComputedStyle(contentObj) throw. If we discover code that does
that, we can just make it invoke the content's getComputedStyle method over Xrays.

MozReview-Commit-ID: 5OsmHJKq5Ui
2017-08-15 19:10:43 -07:00
..
tests Bug 1338339 - dom/xhr/tests/browser_blobFromFile.js must use a separate file for testing instead of prefs.js, r=smaug 2017-07-24 19:58:32 +02:00
XMLHttpRequest.cpp Bug 1269162 - part 6 - Merge XMLHttpRequestWorker and XMLHttpRequestMainThread, r=smaug 2016-06-27 19:13:41 +02:00
XMLHttpRequest.h Bug 1367110 - Expose XHRMT's ErrorCode to chrome JS. r=baku 2017-05-24 08:52:15 -04:00
XMLHttpRequestEventTarget.cpp
XMLHttpRequestEventTarget.h Bug 1269162 - part 6 - Merge XMLHttpRequestWorker and XMLHttpRequestMainThread, r=smaug 2016-06-27 19:13:41 +02:00
XMLHttpRequestMainThread.cpp Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam 2017-08-15 19:10:43 -07:00
XMLHttpRequestMainThread.h Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam 2017-08-15 19:10:43 -07:00
XMLHttpRequestString.cpp Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
XMLHttpRequestString.h Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
XMLHttpRequestUpload.cpp Bug 1269162 - part 5 - Merge XMLHttpRequestUploadWorker and XMLHttpRequestUpload, r=smaug 2016-06-27 19:13:41 +02:00
XMLHttpRequestUpload.h Bug 1269162 - part 6 - Merge XMLHttpRequestWorker and XMLHttpRequestMainThread, r=smaug 2016-06-27 19:13:41 +02:00
XMLHttpRequestWorker.cpp Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug 2017-08-07 02:28:52 +09:00
XMLHttpRequestWorker.h Bug 1367110 - Expose XHRMT's ErrorCode to chrome JS. r=baku 2017-05-24 08:52:15 -04:00
moz.build Bug 1337016 - XHR should create a Blob in the parent process when run from a file:// URL, r=smaug 2017-02-08 14:34:42 +01:00
nsIXMLHttpRequest.idl Bug 437381 - Remove nsIJSXMLHttpRequest and fix the comments in nsIXMLHttpRequest.h. r=smaug 2017-08-12 01:16:22 +09:00