From b54f427078df4c3bbca662e716a32f82814d9b87 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Sat, 5 May 2018 14:31:20 +0100 Subject: [PATCH] Remove unused overrides in internal link annotation inspector Removes an unused call to mw.util.getUrl. Change-Id: I3988311b7160af628ea4ceeafcfdc3cc0a7a3774 --- .../ui/inspectors/ve.ui.MWLinkAnnotationInspector.js | 9 ++------- .../widgets/ve.ui.MWInternalLinkAnnotationWidget.js | 11 ++++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js index 1bd38b9dca..b48e3b8e45 100644 --- a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js +++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js @@ -361,13 +361,8 @@ ve.ui.MWLinkAnnotationInspector.prototype.getInsertionData = function () { } }; -/** - * ve.ui.MWInternalLinkAnnotationWidget.prototype.getHref will try to return an href, obviously, - * but we don't want this to go into the text and can just call its parent instead. - */ -ve.ui.MWLinkAnnotationInspector.prototype.getInsertionText = function () { - return this.annotationInput.constructor.super.prototype.getHref.call( this.annotationInput ); -}; +// #getInsertionText call annotationInput#getHref, which returns the link title, +// so no custmisation is needed. /* Registration */ diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js index a1a03aa1f0..151dd48e44 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js @@ -77,13 +77,10 @@ ve.ui.MWInternalLinkAnnotationWidget.prototype.getTextInputWidget = function () return this.input.query; }; -/** - * @inheritdoc - */ -ve.ui.MWInternalLinkAnnotationWidget.prototype.getHref = function () { - var title = ve.ui.MWInternalLinkAnnotationWidget.super.prototype.getHref.call( this ); - return mw.util.getUrl( title ); -}; +// #getHref returns the link title, not a fully resolved URL, however the only +// use case of widget.getHref is for link insertion text, which expects a title. +// +// Callers needing the full resolved URL should use ve.resolveUrl /** * @inheritdoc