mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Merge "Efficiency improvement for MWLanguageVariantNode#hasRendering"
This commit is contained in:
commit
82c8e64f8f
|
@ -162,6 +162,16 @@ ve.ce.MWLanguageVariantNode.prototype.createInvisibleIcon = function () {
|
||||||
return icon.$element;
|
return icon.$element;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
ve.ce.MWLanguageVariantNode.prototype.hasRendering = function () {
|
||||||
|
// Efficiency improvement: the superclass implementation does a bunch
|
||||||
|
// of DOM measurement to determine if the node is empty.
|
||||||
|
// Instead consult the model for a definitive answer.
|
||||||
|
return !this.model.isHidden();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ContentEditable MediaWiki language variant block node.
|
* ContentEditable MediaWiki language variant block node.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue