r98907 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98906‎ | r98907 | r98908 >
Date:20:45, 4 October 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed typo from moving code around
Modified paths:
  • /trunk/parsers/wikidom/lib/hype/bases/es.DocumentModelNode.js (modified) (history)
  • /trunk/parsers/wikidom/lib/hype/bases/es.ModelNode.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/hype/bases/es.DocumentModelNode.js
@@ -30,6 +30,12 @@
3131 node.contentLength = contents;
3232 } else {
3333 node.contentLength = 0;
 34+ // If contents was an array, some items were added, which we need to account for
 35+ if ( this.length ) {
 36+ for ( var i = 0; i < this.length; i++ ) {
 37+ node.contentLength += this[i].getElementLength();
 38+ }
 39+ }
3440 }
3541
3642 return node;
@@ -124,13 +130,3 @@
125131 es.DocumentModelNode.prototype.getElementLength = function() {
126132 return this.contentLength + 2;
127133 };
128 -
129 -/**
130 - * Checks if this node has child nodes.
131 - *
132 - * @method
133 - * @returns {Boolean} Whether the node has any children
134 - */
135 -es.DocumentModelNode.prototype.hasChildren = function() {
136 - return !!this.length;
137 -};
Index: trunk/parsers/wikidom/lib/hype/bases/es.ModelNode.js
@@ -200,7 +200,7 @@
201201 * @method
202202 * @returns {es.DocumentModelNode} Root node
203203 */
204 -es.DocumentModelNode.prototype.getRoot = function() {
 204+es.ModelNode.prototype.getRoot = function() {
205205 return this.root;
206206 };
207207

Status & tagging log