mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1323553 - Add RTL to JSON Viewer r=Honza
MozReview-Commit-ID: AItCFstp7xd --HG-- extra : rebase_source : 9a77af54503cffce6e7006a2ca6fd5c333507e77
This commit is contained in:
parent
9fa0ca8e62
commit
7ee0a0db1b
@ -225,8 +225,13 @@ Converter.prototype = {
|
||||
os = "linux";
|
||||
}
|
||||
|
||||
let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry);
|
||||
let dir = chromeReg.isLocaleRTL("global") ? "rtl" : "ltr";
|
||||
|
||||
return "<!DOCTYPE html>\n" +
|
||||
"<html platform=\"" + os + "\" class=\"" + themeClassName + "\">" +
|
||||
"<html platform=\"" + os + "\" class=\"" + themeClassName +
|
||||
"\" dir=\"" + dir + "\">" +
|
||||
"<head><title>" + this.htmlEncode(title) + "</title>" +
|
||||
"<base href=\"" + this.htmlEncode(baseUrl) + "\">" +
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"" +
|
||||
@ -256,10 +261,14 @@ Converter.prototype = {
|
||||
output += "</div><div id=\"json\">" + this.highlightError(data,
|
||||
errorInfo.line, errorInfo.column) + "</div>";
|
||||
|
||||
let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry);
|
||||
let dir = chromeReg.isLocaleRTL("global") ? "rtl" : "ltr";
|
||||
|
||||
return "<!DOCTYPE html>\n" +
|
||||
"<html><head><title>" + this.htmlEncode(uri + " - Error") + "</title>" +
|
||||
"<base href=\"" + this.htmlEncode(this.data.url()) + "\">" +
|
||||
"</head><body>" +
|
||||
"</head><body dir=\"" + dir + "\">" +
|
||||
output +
|
||||
"</body></html>";
|
||||
},
|
||||
|
@ -18,6 +18,7 @@
|
||||
/* Panel Content */
|
||||
|
||||
.panelContent {
|
||||
direction: ltr;
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -18,7 +18,12 @@
|
||||
color: var(--theme-content-color1);
|
||||
width: 200px;
|
||||
margin-top: 0;
|
||||
margin-right: 1px;
|
||||
margin-inline-end: 1px;
|
||||
float: right;
|
||||
padding-left: 20px;
|
||||
padding-inline-start: 20px;
|
||||
}
|
||||
|
||||
.searchBox:dir(rtl) {
|
||||
float: left;
|
||||
background-position: calc(100% - 2px) center;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user