Merge "Avoid postgres CategoryMembershipChangeTest failures"
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-mediawiki.js
index 4d8061f..30b9f93 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.20.1
+ * OOjs UI v0.21.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-03-28T22:19:29Z
+ * Date: 2017-05-10T00:55:40Z
  */
 ( function ( OO ) {
 
@@ -48,14 +48,19 @@ OO.ui.MediaWikiTheme.prototype.getElementClasses = function ( element ) {
        if ( element.supports( [ 'hasFlag' ] ) ) {
                isFramed = element.supports( [ 'isFramed' ] ) && element.isFramed();
                isActive = element.supports( [ 'isActive' ] ) && element.isActive();
-               if ( isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ) {
-                       // Button with a dark background, use white icon
+               if (
+                       // Button with a dark background
+                       isFramed && ( isActive || element.isDisabled() || element.hasFlag( 'primary' ) ) ||
+                       // Toolbar with a dark background
+                       OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup && ( isActive || element.hasFlag( 'primary' ) )
+               ) {
+                       // … use white icon / indicator, regardless of other flags
                        variants.invert = true;
                } else if ( !isFramed && element.isDisabled() ) {
-                       // Frameless disabled button, always use black icon regardless of flags
+                       // Frameless disabled button, always use black icon / indicator regardless of other flags
                        variants.invert = false;
                } else if ( !element.isDisabled() ) {
-                       // Any other kind of button, use the right colored icon if available
+                       // Any other kind of button, use the right colored icon / indicator if available
                        variants.progressive = element.hasFlag( 'progressive' );
                        variants.constructive = element.hasFlag( 'constructive' );
                        variants.destructive = element.hasFlag( 'destructive' );
@@ -82,3 +87,5 @@ OO.ui.MediaWikiTheme.prototype.getDialogTransitionDuration = function () {
 OO.ui.theme = new OO.ui.MediaWikiTheme();
 
 }( OO ) );
+
+//# sourceMappingURL=oojs-ui-mediawiki.js.map
\ No newline at end of file