Arlolra has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/349973 )
Change subject: Account for omitted height on audio files when serializing
upright
......................................................................
Account for omitted height on audio files when serializing upright
* Follow up to b05fcc3f. I guess an unresolved question there is,
should height be applied and, if so, what value should it take?
Note that applying a height would be an alternative to this patch.
* Fixes the roundtrip diffs on
fr.wikipedia.org/v3/page/html/Trente-six_fugues_(Reicha)/136420630
Change-Id: Ia735ceb3f1373ba703e736ad67da058737cd2e4b
---
M lib/html2wt/LinkHandler.js
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/73/349973/1
diff --git a/lib/html2wt/LinkHandler.js b/lib/html2wt/LinkHandler.js
index 2c3663c..53b4739 100644
--- a/lib/html2wt/LinkHandler.js
+++ b/lib/html2wt/LinkHandler.js
@@ -1031,7 +1031,12 @@
}
return null;
};
- var sizeUnmodified = ww.fromDataMW || (!ww.modified &&
!wh.modified);
+
+ var heightUnmodified = !wh.modified ||
+ // Since `height` is not applied to audio files
+ (wh.value === null && rdfaType === 'mw:Audio');
+
+ var sizeUnmodified = ww.fromDataMW || (!ww.modified &&
heightUnmodified);
var upright = getOpt('upright');
// XXX: Infer upright factor from default size for all thumbs
by default?
--
To view, visit https://gerrit.wikimedia.org/r/349973
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia735ceb3f1373ba703e736ad67da058737cd2e4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits