mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Created a test file for ve.ce.TextNode and fixed some minor issues.
Change-Id: Ifbf6b7ba2a27eedf6d5d4f6cb06b98c38eb52c5b
This commit is contained in:
parent
b4313ae262
commit
dd6094842e
|
@ -209,7 +209,7 @@ ve.ce.TextNode.prototype.getHtml = function( range ) {
|
|||
} else {
|
||||
range = { 'start': 0, 'end': undefined };
|
||||
}
|
||||
var data = this.doc.getDataFromNode( this ),
|
||||
var data = this.model.getDocument().getDataFromNode( this.model ),
|
||||
render = ve.ce.TextNode.renderAnnotation,
|
||||
htmlChars = ve.ce.TextNode.htmlCharacters;
|
||||
var out = '',
|
||||
|
|
|
@ -166,7 +166,7 @@ ve.dm.BranchNode.prototype.splice = function( index, howmany ) {
|
|||
* @param {ve.Node} node Node to get offset of
|
||||
* @returns {Integer} Offset of node or -1 of node was not found
|
||||
*/
|
||||
ve.dm.DocumentFragment.prototype.getOffsetFromNode = function( node ) {
|
||||
ve.dm.BranchNode.prototype.getOffsetFromNode = function( node ) {
|
||||
if ( node === this ) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -90,12 +90,14 @@
|
|||
<script src="dm/ve.dm.Document.test.js"></script>
|
||||
<script src="dm/ve.dm.DocumentFragment.test.js"></script>
|
||||
<script src="dm/ve.dm.Transaction.test.js"></script>
|
||||
<script src="dm/ve.dm.TransactionProcessor.test.js"></script>
|
||||
|
||||
<!-- VisualEditor ContentEditable Tests -->
|
||||
<script src="ce/ve.ce.test.js"></script>
|
||||
<script src="ce/ve.ce.NodeFactory.test.js"></script>
|
||||
<script src="ce/ve.ce.Node.test.js"></script>
|
||||
<script src="ce/ve.ce.BranchNode.test.js"></script>
|
||||
<script src="ce/ve.ce.LeafNode.test.js"></script>
|
||||
<script src="dm/ve.dm.TransactionProcessor.test.js"></script>
|
||||
<script src="ce/nodes/ve.ce.TextNode.test.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue