mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1658469 - When cloning a shadow root for printing, also copy the UA-widget-ness. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86952
This commit is contained in:
parent
7ff5ba6276
commit
6368b296b2
@ -95,6 +95,10 @@ JSObject* ShadowRoot::WrapNode(JSContext* aCx,
|
||||
}
|
||||
|
||||
void ShadowRoot::CloneInternalDataFrom(ShadowRoot* aOther) {
|
||||
if (aOther->IsUAWidget()) {
|
||||
SetIsUAWidget();
|
||||
}
|
||||
|
||||
size_t sheetCount = aOther->SheetCount();
|
||||
for (size_t i = 0; i < sheetCount; ++i) {
|
||||
StyleSheet* sheet = aOther->SheetAt(i);
|
||||
|
@ -424,7 +424,7 @@ async function compareFiles(src1, src2, options = {}) {
|
||||
|
||||
await new Promise((resolve) => {
|
||||
iframeElement.addEventListener("load", resolve, { capture: true, once: true });
|
||||
iframeElement.setAttribute("src", BASE + src1);
|
||||
iframeElement.setAttribute("src", new URL(src1, BASE).href);
|
||||
});
|
||||
|
||||
if (messagePromise) {
|
||||
@ -438,7 +438,7 @@ async function compareFiles(src1, src2, options = {}) {
|
||||
|
||||
await new Promise((resolve) => {
|
||||
iframeElement.addEventListener("load", resolve, { capture: true, once: true });
|
||||
iframeElement.setAttribute("src", BASE + src2);
|
||||
iframeElement.setAttribute("src", new URL(src2, BASE).href);
|
||||
});
|
||||
|
||||
await printpreview(options.ref || options);
|
||||
@ -551,6 +551,11 @@ async function runTest20() {
|
||||
|
||||
exitprintpreview();
|
||||
|
||||
requestAnimationFrame(() => setTimeout(runTest21));
|
||||
}
|
||||
|
||||
async function runTest21() {
|
||||
await compareFiles("data:text/html,<audio controls>", "data:text/html,<audio controls>"); // Shouldn't crash.
|
||||
finish();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user