(bug 42398) Kill ve.ce.Meta{Block,Inline}Node, not needed.

CE doesn't actually render meta nodes anymore now that we split them out
into the meta-linmod.

I took a stab at consolidating metaBlock and metaInline (into simply
'meta'), but we can't do that with the current node API unless we put a
lot of meta-specific hacks in the converter. So I'm leaving this for the
node API rewrite.

Change-Id: Ie83413df718eabcaeb504316a2db0d24a1be2226
This commit is contained in:
Catrope 2012-12-19 17:54:32 -08:00 committed by Trevor Parscal
parent 4aec0f6d0d
commit 080dfd7d07
5 changed files with 0 additions and 148 deletions

View file

@ -283,8 +283,6 @@ $wgResourceModules += array(
've/ce/nodes/ve.ce.ImageNode.js',
've/ce/nodes/ve.ce.ListItemNode.js',
've/ce/nodes/ve.ce.ListNode.js',
've/ce/nodes/ve.ce.MetaBlockNode.js',
've/ce/nodes/ve.ce.MetaInlineNode.js',
've/ce/nodes/ve.ce.MWEntityNode.js',
've/ce/nodes/ve.ce.ParagraphNode.js',
've/ce/nodes/ve.ce.PreformattedNode.js',

View file

@ -167,8 +167,6 @@ $html = '<div>' . file_get_contents( $page ) . '</div>';
<script src="../../modules/ve/ce/nodes/ve.ce.ImageNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.ListItemNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.ListNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.MetaBlockNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.MetaInlineNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.MWEntityNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.ParagraphNode.js"></script>
<script src="../../modules/ve/ce/nodes/ve.ce.PreformattedNode.js"></script>

View file

@ -1,78 +0,0 @@
/*!
* VisualEditor content editable MetaBlockNode class.
*
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* ContentEditable node for a list.
*
* @class
* @extends ve.ce.BranchNode
* @constructor
* @param model {ve.dm.MetaBlockNode} Model to observe
*/
ve.ce.MetaBlockNode = function VeCeMetaBlockNode( model ) {
// Parent constructor
ve.ce.BranchNode.call( this, 'metaBlock', model );
// DOM Changes
this.$.addClass( 've-ce-metaBlockNode' );
this.$.attr( 'contenteditable', false );
// Properties
this.currentKey = null; // Populated by the first onUpdate() call
this.currentValue = null; // Populated by the first onUpdate() call
// Events
this.model.addListenerMethod( this, 'update', 'onUpdate' );
// Intialization
this.onUpdate();
};
/* Inheritance */
ve.inheritClass( ve.ce.MetaBlockNode, ve.ce.BranchNode );
/* Static Members */
/**
* Node rules.
*
* @see ve.ce.NodeFactory
* @static
* @property
*/
ve.ce.MetaBlockNode.rules = {
'canBeSplit': false
};
/* Methods */
/**
* Responds to model update events.
*
* @method
*/
ve.ce.MetaBlockNode.prototype.onUpdate = function () {
var key = this.model.getAttribute( 'key' ),
value = this.model.getAttribute( 'value' );
if ( key !== this.currentKey || value !== this.currentValue ) {
this.currentKey = key;
this.currentValue = value;
if ( key !== null && value !== undefined ) {
this.$.text( key + '=' + value );
} else if ( key !== null ) {
this.$.text( key );
} else {
// Most likely <meta typeof="mw:Placeholder"> , we don't know what this is
this.$.text( 'META' );
}
}
};
/* Registration */
ve.ce.nodeFactory.register( 'metaBlock', ve.ce.MetaBlockNode );

View file

@ -1,64 +0,0 @@
/*!
* VisualEditor content editable MetaInlineNode class.
*
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* ContentEditable node for a list.
*
* @class
* @extends ve.ce.LeafNode
* @constructor
* @param model {ve.dm.MetaInlineNode} Model to observe
*/
ve.ce.MetaInlineNode = function VeCeMetaInlineNode( model ) {
// Parent constructor
ve.ce.LeafNode.call( this, 'metaInline', model );
// FIXME most of this is duplicated from MetaBlockNode, use a mixin or something
// DOM Changes
this.$.addClass( 've-ce-metaInlineNode' );
this.$.attr( 'contenteditable', false );
// Properties
this.currentKey = null; // Populated by the first onUpdate() call
this.currentValue = null; // Populated by the first onUpdate() call
// Events
this.model.addListenerMethod( this, 'update', 'onUpdate' );
// Intialization
this.onUpdate();
};
/* Inheritance */
ve.inheritClass( ve.ce.MetaInlineNode, ve.ce.LeafNode );
/* Static Members */
/**
* Node rules.
*
* @see ve.ce.NodeFactory
* @static
* @property
*/
ve.ce.MetaInlineNode.rules = {
'canBeSplit': false
};
/* Methods */
/**
* Responds to model update events.
*
* @method
*/
ve.ce.MetaInlineNode.prototype.onUpdate = ve.ce.MetaBlockNode.prototype.onUpdate;
/* Registration */
ve.ce.nodeFactory.register( 'metaInline', ve.ce.MetaInlineNode );

View file

@ -114,8 +114,6 @@
<script src="../../ve/ce/nodes/ve.ce.ImageNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.ListItemNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.ListNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.MetaBlockNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.MetaInlineNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.MWEntityNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.ParagraphNode.js"></script>
<script src="../../ve/ce/nodes/ve.ce.PreformattedNode.js"></script>