зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound. a=merge CLOSED TREE
This commit is contained in:
Коммит
ee20d3cd7c
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
});
|
||||
|
|
|
@ -53,6 +53,14 @@
|
|||
<slot></slot>`;
|
||||
}
|
||||
});
|
||||
|
||||
customElements.define("test-simple-slot", class extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.attachShadow({ mode: "open"});
|
||||
this.shadowRoot.innerHTML = "<slot></slot>";
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
|
@ -93,5 +101,11 @@
|
|||
|
||||
<test-empty id="mode-open"></test-empty>
|
||||
<test-empty-closed id="mode-closed"></test-empty-closed>
|
||||
|
||||
<hr>
|
||||
|
||||
<test-simple-slot id="slot-inline-text">
|
||||
Lorem ipsum
|
||||
</test-simple-slot>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -410,12 +410,14 @@ static bool Moz2DRenderCallback(const Range<const uint8_t> aBlob,
|
|||
|
||||
};
|
||||
|
||||
MOZ_RELEASE_ASSERT(aBlob.length() > sizeof(size_t));
|
||||
// We try hard to not have empty blobs but we can end up with
|
||||
// them because of CompositorHitTestInfo and merging.
|
||||
MOZ_RELEASE_ASSERT(aBlob.length() >= sizeof(size_t));
|
||||
size_t indexOffset = *(size_t*)(aBlob.end().get()-sizeof(size_t));
|
||||
MOZ_RELEASE_ASSERT(indexOffset + sizeof(size_t) <= aBlob.length());
|
||||
Reader reader(aBlob.begin().get()+indexOffset, aBlob.length()-sizeof(size_t)-indexOffset);
|
||||
|
||||
bool ret;
|
||||
bool ret = true;
|
||||
size_t offset = 0;
|
||||
auto absBounds = IntRectAbsolute::FromRect(bounds);
|
||||
while (reader.pos < reader.len) {
|
||||
|
|
|
@ -65,6 +65,12 @@ DocumentL10n::Init(nsTArray<nsString>& aResourceIds)
|
|||
// is ready for localization.
|
||||
uint32_t ret;
|
||||
mDOMLocalization->AddResourceIds(aResourceIds, true, &ret);
|
||||
|
||||
// Register observers for this instance of
|
||||
// mozDOMLocalization to allow it to retranslate
|
||||
// the document when locale changes or pseudolocalization
|
||||
// gets turned on.
|
||||
mDOMLocalization->RegisterObservers();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ interface mozIDOMLocalization : nsISupports
|
|||
{
|
||||
unsigned long addResourceIds(in Array<AString> resourceIds, in bool aEager);
|
||||
unsigned long removeResourceIds(in Array<AString> resourceIds);
|
||||
void registerObservers();
|
||||
|
||||
Promise formatMessages(in Array<jsval> aKeys);
|
||||
Promise formatValues(in Array<jsval> aKeys);
|
||||
|
|
|
@ -27,6 +27,7 @@ L10nRegistry.registerSource(source);
|
|||
add_task(function test_methods_presence() {
|
||||
equal(typeof domLocalization.addResourceIds, "function");
|
||||
equal(typeof domLocalization.removeResourceIds, "function");
|
||||
equal(typeof domLocalization.registerObservers, "function");
|
||||
|
||||
equal(typeof domLocalization.formatMessages, "function");
|
||||
equal(typeof domLocalization.formatValues, "function");
|
||||
|
|
|
@ -212,6 +212,7 @@ load 1467552-1.html
|
|||
load conditional-outer-svg-nondirty-reflow-assert.xhtml
|
||||
load extref-test-1.xhtml
|
||||
load blob-merging-and-retained-display-list.html
|
||||
load empty-blob-merging.html
|
||||
load grouping-empty-bounds.html
|
||||
load 1480275.html
|
||||
load 1480224.html
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<html class="reftest-wait">
|
||||
<style>
|
||||
@keyframes spinnow {
|
||||
100% {
|
||||
transform: rotate(360deg) scale(.2, .2);
|
||||
}
|
||||
}
|
||||
|
||||
rect {
|
||||
transform: rotate(0deg) scale(0.6, 1);
|
||||
transform-origin: center;
|
||||
animation: 5s spinnow infinite linear;
|
||||
}
|
||||
|
||||
</style>
|
||||
<svg width=400 height=400>
|
||||
<!--
|
||||
onwheel is needed so that we get a hit test info display item
|
||||
before the transform on the rect
|
||||
-->
|
||||
<g onwheel="alert(1)">
|
||||
<g id="gr">
|
||||
<circle r=30 fill=yellow cx=300 cy=100 />
|
||||
<circle r=30 fill=yellow cx=10 cy=100 />
|
||||
<circle r=30 fill=yellow cx=300 cy=300 />
|
||||
<circle r=30 fill=yellow cx=10 cy=300 />
|
||||
</g>
|
||||
<rect width=100 height=100 fill=blue x=100 y=100 />
|
||||
<g opacity=0.5>
|
||||
<circle r=30 fill=pink cx=300 cy=100 />
|
||||
<circle r=30 fill=pink cx=10 cy=100 />
|
||||
<circle r=30 fill=pink cx=300 cy=300 />
|
||||
<circle r=30 fill=pink cx=10 cy=300 />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<script>
|
||||
function blam() {
|
||||
let gr = document.getElementById("gr");
|
||||
gr.remove();
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", function() {
|
||||
requestAnimationFrame(function() {
|
||||
blam();
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -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<MINIDUMP_TYPE>(
|
||||
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>(minidump_type |
|
||||
MiniDumpWithUnloadedModules |
|
||||
MiniDumpWithProcessThreadData);
|
||||
|
||||
// dbghelp.dll on Win7 can't handle overlapping memory regions so we only
|
||||
|
|
Загрузка…
Ссылка в новой задаче