Merge m-c to inbound

This commit is contained in:
Wes Kocher 2014-01-07 18:28:12 -08:00
commit 8c6a40abe2
4 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
{
"revision": "d5d2b5614c32e17c5c3c736181a66bfa3fc5c3ef",
"revision": "9960daf91c384990c4bbe7c1221905db7536596b",
"repo_path": "/integration/gaia-central"
}

View File

@ -77,7 +77,9 @@ const CM_MAPPING = [
"redo",
"clearHistory",
"openDialog",
"refresh"
"refresh",
"getOption",
"setOption"
];
const { cssProperties, cssValues, cssColors } = getCSSKeywords();
@ -288,8 +290,7 @@ Editor.prototype = {
* See Editor.modes for the list of all suppoert modes.
*/
getMode: function () {
let cm = editors.get(this);
return cm.getOption("mode");
return this.getOption("mode");
},
/**
@ -297,8 +298,7 @@ Editor.prototype = {
* See Editor.modes for the list of all suppoert modes.
*/
setMode: function (value) {
let cm = editors.get(this);
cm.setOption("mode", value);
this.setOption("mode", value);
},
/**
@ -649,8 +649,7 @@ Editor.prototype = {
* True if the editor is in the read-only mode, false otherwise.
*/
isReadOnly: function () {
let cm = editors.get(this);
return cm.getOption("readOnly");
return this.getOption("readOnly");
},
/**

View File

@ -11,6 +11,11 @@ function test() {
let src = win.document.querySelector("iframe").getAttribute("src");
ok(~src.indexOf(".CodeMirror"), "correct iframe is there");
// getOption/setOption
ok(ed.getOption("styleActiveLine"), "getOption works");
ed.setOption("styleActiveLine", false);
ok(!ed.getOption("styleActiveLine"), "setOption works");
// Language modes
is(ed.getMode(), Editor.modes.text, "getMode");
ed.setMode(Editor.modes.js);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB