r103578 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103577‎ | r103578 | r103579 >
Date:06:49, 18 November 2011
Author:inez
Status:deferred
Tags:
Comment:
Implementation of static function es.DocumentViewNode.getSplitableNode
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/bases/es.DocumentViewNode.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/bases/es.DocumentViewNode.js
@@ -86,6 +86,19 @@
8787 return this.model;
8888 };
8989
 90+es.DocumentViewNode.getSplitableNode = function( node ) {
 91+ var splitableNode = null;
 92+
 93+ es.DocumentNode.traverseUpstream( node, function( node ) {
 94+ var elementType = node.model.getElementType();
 95+ if ( splitableNode != null && es.DocumentView.splitRules[ elementType ].children === true ) {
 96+ return false;
 97+ }
 98+ splitableNode = es.DocumentView.splitRules[ elementType ].self ? node : null
 99+ } );
 100+ return splitableNode;
 101+};
 102+
90103 /* Inheritance */
91104
92105 es.extendClass( es.DocumentViewNode, es.DocumentNode );

Status & tagging log