зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1286844 - Add [title] for source location onto the inner ltr element;r=jsnajdr
MozReview-Commit-ID: FSekgJAVXVk
This commit is contained in:
Родитель
4964221598
Коммит
792ccf37c7
|
@ -210,8 +210,11 @@ module.exports = createClass({
|
|||
|
||||
// Inner el is useful for achieving ellipsis on the left and correct LTR/RTL
|
||||
// ordering. See CSS styles for frame-link-source-[inner] and bug 1290056.
|
||||
let sourceInnerEl = dom.span({ className: "frame-link-source-inner" },
|
||||
sourceElements);
|
||||
let sourceInnerEl = dom.span({
|
||||
className: "frame-link-source-inner",
|
||||
title: isLinkable ?
|
||||
l10n.getFormatStr("frame.viewsourceindebugger", tooltip) : tooltip,
|
||||
}, sourceElements);
|
||||
|
||||
// If source is not a URL (self-hosted, eval, etc.), don't make
|
||||
// it an anchor link, as we can't link to it.
|
||||
|
@ -224,12 +227,10 @@ module.exports = createClass({
|
|||
href: source,
|
||||
className: "frame-link-source",
|
||||
draggable: false,
|
||||
title: l10n.getFormatStr("frame.viewsourceindebugger", tooltip)
|
||||
}, sourceInnerEl);
|
||||
} else {
|
||||
sourceEl = dom.span({
|
||||
className: "frame-link-source",
|
||||
title: tooltip,
|
||||
}, sourceInnerEl);
|
||||
}
|
||||
elements.push(sourceEl);
|
||||
|
|
|
@ -149,13 +149,14 @@ function checkFrameString({ frame, file, line, column, source, functionName, sho
|
|||
|
||||
let $func = $(".frame-link-function-display-name");
|
||||
let $source = $(".frame-link-source");
|
||||
let $sourceInner = $(".frame-link-source-inner");
|
||||
let $filename = $(".frame-link-filename");
|
||||
let $line = $(".frame-link-line");
|
||||
|
||||
is($filename.textContent, file, "Correct filename");
|
||||
is(el.getAttribute("data-line"), line ? `${line}` : null, "Expected `data-line` found");
|
||||
is(el.getAttribute("data-column"), column ? `${column}` : null, "Expected `data-column` found");
|
||||
is($source.getAttribute("title"), tooltip, "Correct tooltip");
|
||||
is($sourceInner.getAttribute("title"), tooltip, "Correct tooltip");
|
||||
is($source.tagName, shouldLink ? "A" : "SPAN", "Correct linkable status");
|
||||
if (shouldLink) {
|
||||
is($source.getAttribute("href"), source, "Correct source");
|
||||
|
|
Загрузка…
Ссылка в новой задаче