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

Change subject: Don't set rel="mw:thumb" on the <a> inside a block image
......................................................................


Don't set rel="mw:thumb" on the <a> inside a block image

Causes DOM diffs

Change-Id: I54bd90cfcbdff4baa06f67cbeb2865dca357be19
---
M modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
M modules/ve/test/dm/ve.dm.example.js
2 files changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js 
b/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
index 936c2e2..592e8f9 100644
--- a/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
+++ b/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
@@ -158,7 +158,6 @@
        } else if ( classes.length > 0 ) {
                figure.className = classes.join( ' ' );
        }
-       a.setAttribute( 'rel', 'mw:thumb' );
        a.setAttribute( 'href', dataElement.attributes.href );
        img.setAttribute( 'src', dataElement.attributes.src );
        img.setAttribute( 'width', dataElement.attributes.width );
diff --git a/modules/ve/test/dm/ve.dm.example.js 
b/modules/ve/test/dm/ve.dm.example.js
index 87bcc1c..74b5763 100644
--- a/modules/ve/test/dm/ve.dm.example.js
+++ b/modules/ve/test/dm/ve.dm.example.js
@@ -3367,7 +3367,7 @@
                ]
        },
        'thumb image': {
-               'html': '<body><figure typeof="mw:Image/Thumb" 
class="mw-halign-right"><a rel="mw:thumb" href="Foo"><img src="Bar" width="1" 
height="2" resource="FooBar"></a><figcaption 
class="mw-figcaption">abc</figcaption></figure></body>',
+               'html': '<body><figure typeof="mw:Image/Thumb" 
class="mw-halign-right"><a href="Foo"><img src="Bar" width="1" height="2" 
resource="FooBar"></a><figcaption 
class="mw-figcaption">abc</figcaption></figure></body>',
                'data': [
                        {
                                'type': 'mwBlockImage',
@@ -3393,7 +3393,7 @@
                ]
        },
        'attribute preservation does not crash due to text node split': {
-               'html': '<body><figure typeof="mw:Image/Thumb" 
data-parsoid="{}"><a rel="mw:thumb" href="Foo" data-parsoid="{}"><img src="Bar" 
width="1" height="2" resource="FooBar" data-parsoid="{}"></a><figcaption 
class="mw-figcaption" data-parsoid="{}"> foo <a rel="mw:WikiLink" href="./Bar" 
data-parsoid="{}">bar</a> baz</figcaption></figure></body>',
+               'html': '<body><figure typeof="mw:Image/Thumb" 
data-parsoid="{}"><a href="Foo" data-parsoid="{}"><img src="Bar" width="1" 
height="2" resource="FooBar" data-parsoid="{}"></a><figcaption 
class="mw-figcaption" data-parsoid="{}"> foo <a rel="mw:WikiLink" href="./Bar" 
data-parsoid="{}">bar</a> baz</figcaption></figure></body>',
                'data': [
                        {
                                'type': 'mwBlockImage',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I54bd90cfcbdff4baa06f67cbeb2865dca357be19
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to