r99128 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99127‎ | r99128 | r99129 >
Date:18:36, 6 October 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Renamed es.DocumentModel.getContent to es.DocumentModel.getContentFromNode, and made some other documentation and similar renames
Modified paths:
  • /trunk/parsers/wikidom/lib/hype/bases/es.DocumentModelNode.js (modified) (history)
  • /trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js (modified) (history)
  • /trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js
@@ -181,7 +181,8 @@
182182 /**
183183 * Sample content data index.
184184 *
185 - * This is a node tree that describes each partition within the document's content data.
 185+ * This is a node tree that describes each partition within the document's content data. This is
 186+ * what is automatically built by the es.DocumentModel constructor.
186187 */
187188 var tree = [
188189 new es.ParagraphModel( data[0], 3 ),
Index: trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js
@@ -496,7 +496,7 @@
497497 * @param {es.DocumentModelNode} node Node to get element object for
498498 * @returns {Object|null} Element object
499499 */
500 -es.DocumentModel.prototype.getElement = function( node ) {
 500+es.DocumentModel.prototype.getElementFromNode = function( node ) {
501501 var offset = this.getOffsetFromNode( node );
502502 if ( offset !== false ) {
503503 return this.data[offset];
@@ -511,7 +511,7 @@
512512 * @param {es.DocumentModelNode} node Node to get content data for
513513 * @returns {Array|null} List of content and elements inside node or null if node is not found
514514 */
515 -es.DocumentModel.prototype.getContent = function( node, range ) {
 515+es.DocumentModel.prototype.getContentFromNode = function( node, range ) {
516516 if ( range ) {
517517 range.normalize();
518518 }
Index: trunk/parsers/wikidom/lib/hype/bases/es.DocumentModelNode.js
@@ -154,7 +154,7 @@
155155 // Find root
156156 var root = this.data ? this : ( this.root.data ? this.root : null );
157157 if ( root ) {
158 - return root.getContent( this, range );
 158+ return root.getContentFromNode( this, range );
159159 }
160160 return [];
161161 };

Status & tagging log