gecko-dev/dom/xml
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
..
crashtests
resources
test Bug 1365506 - fix XHTML/XUL tests that use data: URI. r=smaug 2017-05-23 09:02:06 +08:00
CDATASection.cpp
CDATASection.h
ProcessingInstruction.cpp
ProcessingInstruction.h
XMLDocument.cpp Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam 2017-08-15 19:10:43 -07:00
XMLDocument.h Bug 1387956 (part 1) - Change |nsWindowSizes*| arguments to |nsWindowSizes&|. r=mccr8. 2017-08-10 14:13:22 +10:00
XMLStylesheetProcessingInstruction.cpp Bug 1381253 - Remove redundant control flow declarations rs=ehsan 2017-07-15 19:03:04 +02:00
XMLStylesheetProcessingInstruction.h
htmlmathml-f.ent
moz.build Bug 1335099 - add BUG_COMPONENT to many dom/* subdir files. r=overholt 2017-02-06 09:45:55 -05:00
nsIXMLContentSink.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsXMLContentSink.cpp Bug 1279218 - Additional applet tag logic removal; r=bz 2017-07-28 16:44:39 -07:00
nsXMLContentSink.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsXMLElement.cpp Bug 1355351: Add a node property to access the ::before and ::after pseudo-elements. r=heycam 2017-04-16 17:29:49 +02:00
nsXMLElement.h Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz 2017-04-20 12:57:48 -07:00
nsXMLFragmentContentSink.cpp Bug 1381253 - Remove redundant control flow declarations rs=ehsan 2017-07-15 19:03:04 +02:00
nsXMLPrettyPrinter.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsXMLPrettyPrinter.h