jenkins-bot has submitted this change and it was merged.

Change subject: Unimplement wgSVGMaxSize
......................................................................


Unimplement wgSVGMaxSize

Because it doesn't work in MW.

Bug: 66865
Change-Id: Idad2352bee32cbf10c80a757c59e518abaa342de
---
M modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
1 file changed, 3 insertions(+), 15 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
index b8f4317..ba316d0 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
@@ -54,8 +54,7 @@
 ve.dm.MWImageNode.prototype.syncScalableToType = function ( type ) {
        var originalDimensions, dimensions,
                scalable = this.getScalable(),
-               width = this.getAttribute( 'width' ),
-               height = this.getAttribute( 'height' );
+               width = this.getAttribute( 'width' );
 
        // If no type is given, assume we are updating per current type
        type = type || this.getAttribute( 'type' );
@@ -91,20 +90,9 @@
                } else {
                        scalable.setEnforcedMax( false );
                }
-       } else {
-               // Set max to svgMaxSize on the shortest side
-               if ( width < height ) {
-                       dimensions = scalable.getDimensionsFromValue( {
-                               'width': this.svgMaxSize
-                       } );
-               } else {
-                       dimensions = scalable.getDimensionsFromValue( {
-                               'height': this.svgMaxSize
-                       } );
-               }
-               scalable.setMaxDimensions( dimensions );
-               scalable.setEnforcedMax( true );
        }
+       // TODO: Some day, when svgMaxSize works properly in MediaWiki
+       // we can add it back as max dimension consideration.
 };
 /**
  * Respond to attribute change.

-- 
To view, visit https://gerrit.wikimedia.org/r/142380
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idad2352bee32cbf10c80a757c59e518abaa342de
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to