зеркало из https://github.com/mozilla/gecko-dev.git
Bug 705932 - Inspector should allow copying the current element's id/classes; f=jwalker; r=dao
This commit is contained in:
Родитель
5c331d9046
Коммит
39a78492d8
|
@ -63,6 +63,17 @@
|
|||
direction: ltr;
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-container[locked] > #highlighter-nodeinfobar {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-id,
|
||||
.highlighter-nodeinfobar-class,
|
||||
#highlighter-nodeinfobar-tagname {
|
||||
-moz-user-select: text;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.highlighter-nodeinfobar-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
@ -83,14 +94,6 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-id::before {
|
||||
content: "#";
|
||||
}
|
||||
|
||||
.highlighter-nodeinfobar-class::before {
|
||||
content: ".";
|
||||
}
|
||||
|
||||
#highlighter-nodeinfobar-tagname {
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
|
|
@ -487,7 +487,7 @@ Highlighter.prototype = {
|
|||
this.nodeInfo.tagNameLabel.textContent = this.node.tagName;
|
||||
|
||||
// ID
|
||||
this.nodeInfo.idLabel.textContent = this.node.id;
|
||||
this.nodeInfo.idLabel.textContent = this.node.id ? "#" + this.node.id : "";
|
||||
|
||||
// Classes
|
||||
let classes = this.nodeInfo.classesBox;
|
||||
|
@ -500,7 +500,7 @@ Highlighter.prototype = {
|
|||
for (let i = 0; i < this.node.classList.length; i++) {
|
||||
let classLabel = this.chromeDoc.createElement("label");
|
||||
classLabel.className = "highlighter-nodeinfobar-class plain";
|
||||
classLabel.textContent = this.node.classList[i];
|
||||
classLabel.textContent = "." + this.node.classList[i];
|
||||
fragment.appendChild(classLabel);
|
||||
}
|
||||
classes.appendChild(fragment);
|
||||
|
|
|
@ -24,9 +24,9 @@ function test()
|
|||
function setupInfobarTest()
|
||||
{
|
||||
nodes = [
|
||||
{node: doc.querySelector("#top"), position: "bottom", tag: "DIV", id: "top", classes: "class1 class2"},
|
||||
{node: doc.querySelector("#vertical"), position: "overlap", tag: "DIV", id: "vertical", classes: ""},
|
||||
{node: doc.querySelector("#bottom"), position: "top", tag: "DIV", id: "bottom", classes: ""},
|
||||
{node: doc.querySelector("#top"), position: "bottom", tag: "DIV", id: "#top", classes: ".class1 .class2"},
|
||||
{node: doc.querySelector("#vertical"), position: "overlap", tag: "DIV", id: "#vertical", classes: ""},
|
||||
{node: doc.querySelector("#bottom"), position: "top", tag: "DIV", id: "#bottom", classes: ""},
|
||||
{node: doc.querySelector("body"), position: "overlap", tag: "BODY", id: "", classes: ""},
|
||||
]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче