mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 891357 - iframes don't appear in breadcrumbs. r=robcee
This commit is contained in:
parent
f8b884172b
commit
eb8f7614d5
@ -484,11 +484,13 @@ HTMLBreadcrumbs.prototype = {
|
||||
if (originalLength > 0) {
|
||||
stopNode = this.nodeHierarchy[originalLength - 1].node;
|
||||
}
|
||||
while (toAppend && toAppend.tagName && toAppend != stopNode) {
|
||||
let button = this.buildButton(toAppend);
|
||||
fragment.insertBefore(button, lastButtonInserted);
|
||||
lastButtonInserted = button;
|
||||
this.nodeHierarchy.splice(originalLength, 0, {node: toAppend, button: button});
|
||||
while (toAppend && toAppend != stopNode) {
|
||||
if (toAppend.tagName) {
|
||||
let button = this.buildButton(toAppend);
|
||||
fragment.insertBefore(button, lastButtonInserted);
|
||||
lastButtonInserted = button;
|
||||
this.nodeHierarchy.splice(originalLength, 0, {node: toAppend, button: button});
|
||||
}
|
||||
toAppend = toAppend.parentNode();
|
||||
}
|
||||
this.container.appendChild(fragment, this.container.firstChild);
|
||||
|
@ -74,7 +74,28 @@ function performTestComparisons2()
|
||||
is(i.selection.node, div2, "selection matches div2 node");
|
||||
is(getHighlitNode(), div2, "highlighter matches selection");
|
||||
|
||||
finish();
|
||||
selectRoot();
|
||||
}
|
||||
|
||||
function selectRoot()
|
||||
{
|
||||
// Select the root document element to clear the breadcrumbs.
|
||||
let i = getActiveInspector();
|
||||
i.selection.setNode(doc.documentElement);
|
||||
i.once("inspector-updated", selectIframe);
|
||||
}
|
||||
|
||||
function selectIframe()
|
||||
{
|
||||
// Directly select an element in an iframe (without navigating to it
|
||||
// with mousemoves).
|
||||
let i = getActiveInspector();
|
||||
i.selection.setNode(div2);
|
||||
i.once("inspector-updated", () => {
|
||||
let breadcrumbs = i.breadcrumbs;
|
||||
is(breadcrumbs.nodeHierarchy.length, 9, "Should have 9 items");
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
function test() {
|
||||
|
Loading…
Reference in New Issue
Block a user