From 03f09e4e261ae7cf00d4af94ec1d0401641f1651 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 20 May 2014 15:52:46 +0100 Subject: [PATCH] Use new MWInlineExtensionNode and DM node construction Depends on I0ddcabeb and I8d4f37b6 in core. Change-Id: I7d5e1174c4f8a49d926b287b8dd109e3148cf95b --- modules/VisualEditor/ve.ce.MWMathNode.js | 6 +++--- modules/VisualEditor/ve.dm.MWMathNode.js | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/VisualEditor/ve.ce.MWMathNode.js b/modules/VisualEditor/ve.ce.MWMathNode.js index 54ee39d..2607ee4 100644 --- a/modules/VisualEditor/ve.ce.MWMathNode.js +++ b/modules/VisualEditor/ve.ce.MWMathNode.js @@ -11,7 +11,7 @@ * ContentEditable MediaWiki math node. * * @class - * @extends ve.ce.MWExtensionNode + * @extends ve.ce.MWInlineExtensionNode * * @constructor * @param {ve.dm.MWMathNode} model Model to observe @@ -19,7 +19,7 @@ */ ve.ce.MWMathNode = function VeCeMWMathNode( model, config ) { // Parent constructor - ve.ce.MWExtensionNode.call( this, model, config ); + ve.ce.MWInlineExtensionNode.call( this, model, config ); // DOM changes this.$element.addClass( 've-ce-mwMathNode' ); @@ -27,7 +27,7 @@ ve.ce.MWMathNode = function VeCeMWMathNode( model, config ) { /* Inheritance */ -OO.inheritClass( ve.ce.MWMathNode, ve.ce.MWExtensionNode ); +OO.inheritClass( ve.ce.MWMathNode, ve.ce.MWInlineExtensionNode ); /* Static Properties */ diff --git a/modules/VisualEditor/ve.dm.MWMathNode.js b/modules/VisualEditor/ve.dm.MWMathNode.js index 3af2817..00dd821 100644 --- a/modules/VisualEditor/ve.dm.MWMathNode.js +++ b/modules/VisualEditor/ve.dm.MWMathNode.js @@ -11,20 +11,19 @@ * DataModel MediaWiki math node. * * @class - * @extends ve.dm.MWExtensionNode + * @extends ve.dm.MWInlineExtensionNode * * @constructor - * @param {number} [length] Length of content data (ignored, forced to 0) - * @param {Object} [element] Reference to element in linear model + * @param {Object} [element] */ -ve.dm.MWMathNode = function VeDmMWMathNode( length, element ) { +ve.dm.MWMathNode = function VeDmMWMathNode() { // Parent constructor - ve.dm.MWExtensionNode.call( this, 0, element ); + ve.dm.MWInlineExtensionNode.apply( this, arguments ); }; /* Inheritance */ -OO.inheritClass( ve.dm.MWMathNode, ve.dm.MWExtensionNode ); +OO.inheritClass( ve.dm.MWMathNode, ve.dm.MWInlineExtensionNode ); /* Static members */