зеркало из https://github.com/mozilla/gecko-dev.git
d42f0733ac
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 |
||
---|---|---|
.. | ||
tests | ||
XMLHttpRequest.cpp | ||
XMLHttpRequest.h | ||
XMLHttpRequestEventTarget.cpp | ||
XMLHttpRequestEventTarget.h | ||
XMLHttpRequestMainThread.cpp | ||
XMLHttpRequestMainThread.h | ||
XMLHttpRequestString.cpp | ||
XMLHttpRequestString.h | ||
XMLHttpRequestUpload.cpp | ||
XMLHttpRequestUpload.h | ||
XMLHttpRequestWorker.cpp | ||
XMLHttpRequestWorker.h | ||
moz.build | ||
nsIXMLHttpRequest.idl |