Merge "VisualDiff: Don't compare images with different src's"

This commit is contained in:
jenkins-bot 2018-06-11 17:44:48 +00:00 committed by Gerrit Code Review
commit 59e59a5fdf

View file

@ -104,6 +104,11 @@ ve.dm.MWImageNode.static.getMatchRdfaTypes = function () {
ve.dm.MWImageNode.static.allowedRdfaTypes = [ 'mw:Error' ]; ve.dm.MWImageNode.static.allowedRdfaTypes = [ 'mw:Error' ];
ve.dm.MWImageNode.static.isDiffComparable = function ( element, other ) {
// Images with different src's shouldn't be diffed
return element.type === other.type && element.attributes.resource === other.attributes.resource;
};
ve.dm.MWImageNode.static.describeChanges = function ( attributeChanges, attributes ) { ve.dm.MWImageNode.static.describeChanges = function ( attributeChanges, attributes ) {
var key, sizeFrom, sizeTo, change, var key, sizeFrom, sizeTo, change,
customKeys = [ 'width', 'height', 'defaultSize', 'src', 'href' ], customKeys = [ 'width', 'height', 'defaultSize', 'src', 'href' ],