Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/316611
Change subject: Add 'noflip' option on RL modules to disable CSSJanus ...................................................................... Add 'noflip' option on RL modules to disable CSSJanus Should be useful for cases where we pull in an external library that already manages RTL flipping in its styles, and CSSJanus does the wrong thing without extra markup. Example: 'ext.tmh.video-js' => $baseExtensionResource + [ 'scripts' => 'resources/videojs/video.js', 'styles' => 'resources/videojs/video-js.css', 'noflip' => true, ... ], Bug: T148572 Bug: T148565 Change-Id: Icbad20d8a6e9a0d354ad159f5816f4fb67cc2775 --- M includes/resourceloader/ResourceLoaderFileModule.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/11/316611/1 diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 2dcc841..d7d85f8 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -128,6 +128,8 @@ protected $targets = [ 'desktop' ]; + protected $noflip = false; + /** * @var bool Whether getStyleURLsForDebug should return raw file paths, * or return load.php urls @@ -277,6 +279,7 @@ // Single booleans case 'debugRaw': case 'raw': + case 'noflip': $this->{$member} = (bool)$option; break; } @@ -913,7 +916,7 @@ * @return bool */ public function getFlip( $context ) { - return $context->getDirection() === 'rtl'; + return $context->getDirection() === 'rtl' && !$this->noflip; } /** -- To view, visit https://gerrit.wikimedia.org/r/316611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbad20d8a6e9a0d354ad159f5816f4fb67cc2775 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER <br...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits