diff --git a/devtools/server/actors/inspector/walker.js b/devtools/server/actors/inspector/walker.js index 4821d191c7c4..4549e42c4cd7 100644 --- a/devtools/server/actors/inspector/walker.js +++ b/devtools/server/actors/inspector/walker.js @@ -521,10 +521,18 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, { // - more than one child // - unique child is not a text node // - unique child is a text node, but is too long to be inlined + // - we are a slot -> these are always represented on their own lines with + // a link to the original node. + const isAssignedSlot = + !!firstChild && + node.rawNode.nodeName === "SLOT" && + isDirectShadowHostChild(firstChild); + if (!firstChild || walker.nextSibling() || firstChild.nodeType !== Node.TEXT_NODE || - firstChild.nodeValue.length > gValueSummaryLength + firstChild.nodeValue.length > gValueSummaryLength || + isAssignedSlot ) { return undefined; } diff --git a/devtools/server/tests/browser/browser_inspector-shadow.js b/devtools/server/tests/browser/browser_inspector-shadow.js index 8675b3b14d7f..c374732ad894 100644 --- a/devtools/server/tests/browser/browser_inspector-shadow.js +++ b/devtools/server/tests/browser/browser_inspector-shadow.js @@ -115,3 +115,25 @@ add_task(async function() { is(closedShadowRoot.shadowRootMode, "closed", "#mode-closed has a shadow root with closed mode"); }); + +add_task(async function() { + info("Test that slotted inline text nodes appear in the Shadow DOM tree"); + const { walker } = await initInspectorFront(URL); + + const el = await walker.querySelector(walker.rootNode, "#slot-inline-text"); + const hostChildren = await walker.children(el); + const originalSlot = hostChildren.nodes[1]; + is(originalSlot.displayName, "#text", "Shadow host as a text node to be slotted"); + + const shadowRoot = hostChildren.nodes[0]; + const shadowChildren = await walker.children(shadowRoot); + const slot = shadowChildren.nodes[0]; + is(slot.displayName, "slot", "shadow-root has a slot child"); + ok(!slot._form.inlineTextChild, "Slotted node is not an inline text"); + + const slotChildren = await walker.children(slot); + const slotted = slotChildren.nodes[0]; + is(slotted.displayName, "#text", "Slotted node is a text node"); + is(slotted._form.nodeValue, originalSlot._form.nodeValue, + "Slotted content is the same as original's"); +}); diff --git a/devtools/server/tests/browser/inspector-shadow.html b/devtools/server/tests/browser/inspector-shadow.html index 6da30689b143..5d6fa37e5bf9 100644 --- a/devtools/server/tests/browser/inspector-shadow.html +++ b/devtools/server/tests/browser/inspector-shadow.html @@ -53,6 +53,14 @@ `; } }); + + customElements.define("test-simple-slot", class extends HTMLElement { + constructor() { + super(); + this.attachShadow({ mode: "open"}); + this.shadowRoot.innerHTML = ""; + } + }); }; + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index 04b41edf4df0..06b7aa6deeda 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -1384,13 +1384,13 @@ ChildFPEFilter(void* context, EXCEPTION_POINTERS* exinfo, static MINIDUMP_TYPE GetMinidumpType() { - MINIDUMP_TYPE minidump_type = MiniDumpWithFullMemoryInfo; + MINIDUMP_TYPE minidump_type = static_cast( + MiniDumpWithFullMemoryInfo | MiniDumpWithUnloadedModules); #ifdef NIGHTLY_BUILD // This is Nightly only because this doubles the size of minidumps based // on the experimental data. minidump_type = static_cast(minidump_type | - MiniDumpWithUnloadedModules | MiniDumpWithProcessThreadData); // dbghelp.dll on Win7 can't handle overlapping memory regions so we only