Bug 718816 - Orion upstream update (with debugger ruler support code); r=rcampbell

This commit is contained in:
Mihai Sucan 2012-02-21 20:05:46 +02:00
parent a344f2f7ae
commit 05ae442701
9 changed files with 2014 additions and 1803 deletions

View File

@ -10,7 +10,6 @@ browser.jar:
content/browser/devtools/cssruleview.xul (styleinspector/cssruleview.xul)
content/browser/devtools/styleinspector.css (styleinspector/styleinspector.css)
content/browser/orion.js (sourceeditor/orion/orion.js)
content/browser/orion.css (sourceeditor/orion/orion.css)
content/browser/source-editor-overlay.xul (sourceeditor/source-editor-overlay.xul)
* content/browser/debugger.xul (debugger/debugger.xul)
content/browser/debugger.css (debugger/debugger.css)

View File

@ -49,10 +49,10 @@ copy({
ORION_EDITOR + "/orion/textview/eventTarget.js",
ORION_EDITOR + "/orion/editor/regex.js",
ORION_EDITOR + "/orion/textview/keyBinding.js",
ORION_EDITOR + "/orion/textview/annotations.js",
ORION_EDITOR + "/orion/textview/rulers.js",
ORION_EDITOR + "/orion/textview/undoStack.js",
ORION_EDITOR + "/orion/textview/textModel.js",
ORION_EDITOR + "/orion/textview/annotations.js",
ORION_EDITOR + "/orion/textview/tooltip.js",
ORION_EDITOR + "/orion/textview/textView.js",
ORION_EDITOR + "/orion/textview/textDND.js",

View File

@ -8,15 +8,19 @@ The Orion editor web site: http://www.eclipse.org/orion
To upgrade Orion to a newer version see the UPGRADE file.
Orion version: git clone from 2011-12-09
commit hash d8a6dc01d9c561d6eb99f03b64c8c78ce785c59d
+ patch for Eclipse Bug 366312 - right-clicking outside of the selection causes the caret to move
https://github.com/mihaisucan/orion.client/tree/bug-366312
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=366312
+ patch for Mozilla Bug 711737 - Orion should support all the CSS properties from CSS1, CSS2, CSS2.1 and CSS3
https://bugzilla.mozilla.org/show_bug.cgi?id=711737
+ patch for Mozilla Bug 719028 - Style Editor does not highlight a few CSS2.0 and CSS3 properties
https://bugzilla.mozilla.org/show_bug.cgi?id=719028
Orion version: git clone from 2012-01-26
commit hash 1d1150131dacecc9f4d9eb3cdda9103ea1819045
+ patch for Eclipse Bug 370584 - [Firefox] Edit menu items in context menus
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=137d5a8e9bbc0fa204caae74ebd25a7d9d4729bd
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=370584
+ patches for Eclipse Bug 370606 - Problems with UndoStack and deletions at
the beginning of the document
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cec71bddaf32251c34d3728df5da13c130d14f33
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3ce24b94f1d8103b16b9cf16f2f50a6302d43b18
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=27177e9a3dc70c20b4877e3eab3adfff1d56e342
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=370606
# License
@ -25,3 +29,11 @@ file:
orion.js
orion.css
# Theming
The syntax highlighting and the editor UI are themed using a style sheet. The
default theme file is browser/themes/*/devtools/orion.css - this is based on the
orion.css found in this folder.
Please note that the orion.css file from this folder is not used. It is kept
here only as reference.

File diff suppressed because it is too large Load Diff

View File

@ -550,7 +550,7 @@ SourceEditor.prototype = {
*/
undo: function SE_undo()
{
this._undoStack.undo();
return this._undoStack.undo();
},
/**
@ -558,7 +558,7 @@ SourceEditor.prototype = {
*/
redo: function SE_redo()
{
this._undoStack.redo();
return this._undoStack.redo();
},
/**
@ -875,7 +875,7 @@ SourceEditor.prototype = {
window.require("orion/editor/textMateStyler").TextMateStyler;
let HtmlGrammar =
window.require("orion/editor/htmlGrammar").HtmlGrammar;
this._styler = new TextMateStyler(this._view, new HtmlGrammar().grammar);
this._styler = new TextMateStyler(this._view, new HtmlGrammar());
break;
}

View File

@ -37,22 +37,30 @@ function initEditor()
function editorLoaded()
{
editor.focus();
testWin.resizeBy(1, 2);
let text = "BrowserBug - 725388";
editor.setText(text);
let target = editor.editorElement;
let targetWin = target.ownerDocument.defaultView;
let eventsFired = 0;
let done = function() {
eventsFired++;
if (eventsFired == 3) {
executeSoon(testEnd);
}
};
let mMoveHandler = function(aEvent) {
editor.removeEventListener(SourceEditor.EVENTS.MOUSE_MOVE, mMoveHandler);
is(aEvent.event.type, "mousemove", "MouseMove event fired.");
editor.addEventListener(SourceEditor.EVENTS.MOUSE_OVER, mOverHandler);
waitForFocus(function() {
EventUtils.synthesizeMouse(target, 10, 10, {type: "mouseover"},
targetWin);
});
executeSoon(done);
};
let mOverHandler = function(aEvent) {
@ -60,26 +68,28 @@ function editorLoaded()
is(aEvent.event.type, "mouseover", "MouseOver event fired.");
editor.addEventListener(SourceEditor.EVENTS.MOUSE_OUT, mOutHandler);
waitForFocus(function() {
EventUtils.synthesizeMouse(target, -10, -10, {type: "mouseout"},
targetWin);
}, targetWin);
executeSoon(done);
};
let mOutHandler = function(aEvent) {
editor.removeEventListener(SourceEditor.EVENTS.MOUSE_OUT, mOutHandler);
is(aEvent.event.type, "mouseout", "MouseOut event fired.");
executeSoon(testEnd);
executeSoon(done);
};
editor.addEventListener(SourceEditor.EVENTS.MOUSE_OVER, mOverHandler);
editor.addEventListener(SourceEditor.EVENTS.MOUSE_MOVE, mMoveHandler);
editor.addEventListener(SourceEditor.EVENTS.MOUSE_OUT, mOutHandler);
editor.focus();
waitForFocus(function() {
EventUtils.synthesizeMouse(target, 1, 1, {type: "mousemove"},
targetWin);
EventUtils.synthesizeMouse(target, 10, 10, {type: "mouseover"},
targetWin);
EventUtils.synthesizeMouse(target, 15, 17, {type: "mousemove"},
targetWin);
EventUtils.synthesizeMouse(target, -10, -10, {type: "mouseout"},
targetWin);
}, targetWin);
}

View File

@ -11,18 +11,13 @@
.view {
color: black; /* Default text color */
background: #f0f0ff; /* Background of the editor */
padding-left: 0;
padding-left: 4px;
}
.readonly > .view {
background: #f0f0ff;
}
/* One line */
.viewContent > div {
padding-left: 4px; /* Margin between the ruler and the editor */
}
/* Styles for the line number ruler */
.rulerLines {
border-right: 1px solid #b4c4d3;

View File

@ -11,18 +11,13 @@
.view {
color: black; /* Default text color */
background: #f0f0ff; /* Background of the editor */
padding-left: 0;
padding-left: 4px;
}
.readonly > .view {
background: #f0f0ff;
}
/* One line */
.viewContent > div {
padding-left: 4px; /* Margin between the ruler and the editor */
}
/* Styles for the line number ruler */
.rulerLines {
border-right: 1px solid #b4c4d3;

View File

@ -11,18 +11,13 @@
.view {
color: black; /* Default text color */
background: #f0f0ff; /* Background of the editor */
padding-left: 0;
padding-left: 4px;
}
.readonly > .view {
background: #f0f0ff;
}
/* One line */
.viewContent > div {
padding-left: 4px; /* Margin between the ruler and the editor */
}
/* Styles for the line number ruler */
.rulerLines {
border-right: 1px solid #b4c4d3;