mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1356873 - Insert inline text nodes between open and close tags; r=gl
MozReview-Commit-ID: 9bWm0EP7Wrp --HG-- extra : rebase_source : ca64ab2e20a77a828dd8da126ff2bfeb13032d88
This commit is contained in:
parent
ae977fa1ff
commit
475fa7b551
@ -75,6 +75,10 @@ function* checkNode(inspector, testActor, {desc, selector, inline, value}) {
|
||||
if (inline) {
|
||||
textContainer = container.elt.querySelector("pre");
|
||||
ok(!!textContainer, "Text container is already rendered for inline text elements");
|
||||
ok(textContainer.parentNode.previousSibling.classList.contains("open"),
|
||||
"Text container is after the open tag");
|
||||
ok(textContainer.parentNode.nextSibling.classList.contains("close"),
|
||||
"Text container is before the close tag");
|
||||
} else {
|
||||
textContainer = container.elt.querySelector("pre");
|
||||
ok(!textContainer, "Text container is not rendered for collapsed text nodes");
|
||||
|
@ -271,8 +271,7 @@ ElementEditor.prototype = {
|
||||
// This editor won't receive an update automatically, so we rely on
|
||||
// child text editors to let us know that we need updating.
|
||||
this.textEditor = new TextEditor(this.container, node, "text");
|
||||
this.elt.insertBefore(this.textEditor.elt,
|
||||
this.elt.firstChild.nextSibling.nextSibling);
|
||||
this.elt.insertBefore(this.textEditor.elt, this.elt.querySelector(".close"));
|
||||
}
|
||||
|
||||
if (this.textEditor) {
|
||||
|
Loading…
Reference in New Issue
Block a user