mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 04:06:51 +00:00
Clean up static stuff in dm.GeneratedContentNode
Remove enableAboutGrouping from GCNode and move it to the subclasses so we can have GCNodes without grouping. Having matchTagNames there doesn't make sense now that GCNode is a mixin rather than a base class. Also removed unused .static.generatedContent property. Change-Id: I2b5350e70b7829cf009c752d066919e5a3593db0
This commit is contained in:
parent
4c792ba385
commit
e9395273de
|
@ -37,8 +37,7 @@ ve.dm.AlienNode.static.name = 'alien';
|
|||
|
||||
ve.dm.AlienNode.static.storeHtmlAttributes = false;
|
||||
|
||||
// TODO: Develop better method to test for generated content
|
||||
ve.dm.AlienNode.static.generatedContent = true;
|
||||
ve.dm.AlienNode.static.enableAboutGrouping = true;
|
||||
|
||||
ve.dm.AlienNode.static.toDataElement = function ( domElements, converter ) {
|
||||
var isInline = this.isHybridInline( domElements, converter ),
|
||||
|
|
|
@ -17,14 +17,10 @@
|
|||
ve.dm.GeneratedContentNode = function VeDmGeneratedContentNode() {
|
||||
};
|
||||
|
||||
/* Static members */
|
||||
/* Static methods */
|
||||
|
||||
ve.dm.GeneratedContentNode.static = {};
|
||||
|
||||
ve.dm.GeneratedContentNode.static.matchTagNames = [];
|
||||
|
||||
ve.dm.GeneratedContentNode.static.enableAboutGrouping = true;
|
||||
|
||||
/**
|
||||
* Store HTML of DOM elements, hashed on data element
|
||||
* @param {Object} dataElement Data element
|
||||
|
|
|
@ -51,6 +51,8 @@ ve.dm.MWTransclusionNode.static.matchFunction = function ( domElement ) {
|
|||
) !== -1;
|
||||
};
|
||||
|
||||
ve.dm.MWTransclusionNode.static.enableAboutGrouping = true;
|
||||
|
||||
ve.dm.MWTransclusionNode.static.getHashObject = function ( dataElement ) {
|
||||
return {
|
||||
type: dataElement.type,
|
||||
|
|
Loading…
Reference in a new issue