~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/inspector/front-end/TextEditorModel.js

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-02-04 19:30:57 UTC
  • mfrom: (1.2.8 upstream) (4.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100204193057-d3018lm1fipb0703
* New upstream release
* debian/copyright:
- Updated with changes since 1.1.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    }
54
54
}
55
55
 
56
 
WebInspector.TextEditorModel = function(changeListener)
 
56
WebInspector.TextEditorModel = function()
57
57
{
58
 
    this._changeListener = changeListener;
59
58
    this._lines = [""];
60
59
    this._attributes = [];
61
60
    this._undoStack = [];
63
62
}
64
63
 
65
64
WebInspector.TextEditorModel.prototype = {
 
65
    set changeListener(changeListener)
 
66
    {
 
67
        this._changeListener = changeListener;
 
68
    },
66
69
 
67
70
    get linesCount()
68
71
    {
89
92
        var newRange = this._innerSetText(range, text);
90
93
        command.range = newRange.clone();
91
94
 
92
 
        this._changeListener(range, newRange, command.text, text);
 
95
        if (this._changeListener)
 
96
            this._changeListener(range, newRange, command.text, text);
93
97
        return newRange;
94
98
    },
95
99