Merge "Hide TOC with CSS instead of JavaScript"
[lhc/web/wiklou.git] / includes / skins / Skin.php
index 57ca2f4..b6de510 100644 (file)
@@ -212,15 +212,9 @@ abstract class Skin extends ContextSource {
                        'syndicate' => [],
                ];
 
-               // Support for high-density display images if enabled
-               if ( $config->get( 'ResponsiveImages' ) ) {
-                       $modules['core'][] = 'mediawiki.hidpi';
-               }
-
                // Preload jquery.tablesorter for mediawiki.page.ready
                if ( strpos( $out->getHTML(), 'sortable' ) !== false ) {
                        $modules['content'][] = 'jquery.tablesorter';
-                       $modules['styles']['content'][] = 'jquery.tablesorter.styles';
                }
 
                // Preload jquery.makeCollapsible for mediawiki.page.ready
@@ -237,6 +231,7 @@ abstract class Skin extends ContextSource {
 
                if ( $out->isTOCEnabled() ) {
                        $modules['content'][] = 'mediawiki.toc';
+                       $modules['styles']['content'][] = 'mediawiki.toc.styles';
                }
 
                // Add various resources if required
@@ -397,13 +392,13 @@ abstract class Skin extends ContextSource {
 
        /**
         * Outputs the HTML generated by other functions.
-        * @param OutputPage $out
+        * @param OutputPage|null $out
         */
        abstract function outputPage( OutputPage $out = null );
 
        /**
         * @param array $data
-        * @param string $nonce OutputPage::getCSPNonce()
+        * @param string|null $nonce OutputPage::getCSPNonce()
         * @return string|WrappedString HTML
         */
        static function makeVariablesScript( $data, $nonce = null ) {
@@ -745,7 +740,7 @@ abstract class Skin extends ContextSource {
        }
 
        /**
-        * @param OutputPage $out Defaults to $this->getOutput() if left as null
+        * @param OutputPage|null $out Defaults to $this->getOutput() if left as null
         * @return string
         */
        function subPageSubtitle( $out = null ) {
@@ -1605,14 +1600,13 @@ abstract class Skin extends ContextSource {
        }
 
        /**
-        * Create a section edit link.  This supersedes editSectionLink() and
-        * editSectionLinkForOther().
+        * Create a section edit link.
         *
         * @param Title $nt The title being linked to (may not be the same as
         *   the current page, if the section is included from a template)
         * @param string $section The designation of the section being pointed to,
         *   to be included in the link, like "&section=$section"
-        * @param string $tooltip The tooltip to use for the link: will be escaped
+        * @param string|null $tooltip The tooltip to use for the link: will be escaped
         *   and wrapped in the 'editsectionhint' message
         * @param string $lang Language code
         * @return string HTML to use for edit link