mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 1264555 - Remove unused node parameter in canAddHTMLChild; r=jdescottes
MozReview-Commit-ID: 29I9fYJu5td --HG-- extra : rebase_source : e584447260c794f12662278f2707b591bb622c99
This commit is contained in:
parent
7036c2b542
commit
2dd3d16f69
@ -1052,9 +1052,8 @@ InspectorPanel.prototype = {
|
|||||||
* Create a new node as the last child of the current selection, expand the
|
* Create a new node as the last child of the current selection, expand the
|
||||||
* parent and select the new node.
|
* parent and select the new node.
|
||||||
*/
|
*/
|
||||||
addNode: Task.async(function*() {
|
addNode: Task.async(function* () {
|
||||||
let root = this.selection.nodeFront;
|
if (!this.canAddHTMLChild()) {
|
||||||
if (!this.canAddHTMLChild(root)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1062,7 +1061,8 @@ InspectorPanel.prototype = {
|
|||||||
|
|
||||||
// Insert the html and expect a childList markup mutation.
|
// Insert the html and expect a childList markup mutation.
|
||||||
let onMutations = this.once("markupmutation");
|
let onMutations = this.once("markupmutation");
|
||||||
let {nodes} = yield this.walker.insertAdjacentHTML(root, "beforeEnd", html);
|
let {nodes} = yield this.walker.insertAdjacentHTML(this.selection.nodeFront,
|
||||||
|
"beforeEnd", html);
|
||||||
yield onMutations;
|
yield onMutations;
|
||||||
|
|
||||||
// Select the new node (this will auto-expand its parent).
|
// Select the new node (this will auto-expand its parent).
|
||||||
|
Loading…
Reference in New Issue
Block a user