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

Change subject: OutputPage: Ensure setupSkinUserCss() always applies to 
headElement()
......................................................................


OutputPage: Ensure setupSkinUserCss() always applies to headElement()

Follows-up 80e5b160e0, which had to move this call out of the
headElement() and buildCssLinks() methods as it was no longer
allowed to modify the module queue after it was created.

It was moved to OutputPage::output(), right before Skin::outputPage()
is called, which ends up calling headElement().

The point in time was effectively unchanged for page views.

However for the caller in ApiParse() this meant setupSkinUserCss()
no longer got called at all as it never calls output(), but instead
calls headElement() directly.

Move it to getRlClient(), which is where we set all other 
OutputPage-specific things relating to module loading already.

* For page views this has no impact.
* For ApiParse it means headElement(), which calls getRlClient(),
  will once again include skin stylesheets.

Bug: T144301
Change-Id: I5fd4a27fb2d70b98ce9161dc050788d8ac364110
---
M includes/OutputPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Anomie: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 1083687..5aaa474 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2303,7 +2303,6 @@
                        // Hook that allows last minute changes to the output 
page, e.g.
                        // adding of CSS or Javascript by extensions.
                        Hooks::run( 'BeforePageDisplay', [ &$this, &$sk ] );
-                       $this->getSkin()->setupSkinUserCss( $this );
 
                        try {
                                $sk->outputPage();
@@ -2675,6 +2674,7 @@
                                'user.styles',
                                'user.cssprefs',
                        ] );
+                       $this->getSkin()->setupSkinUserCss( $this );
 
                        // Prepare exempt modules for buildExemptModules()
                        $exemptGroups = [ 'site' => [], 'noscript' => [], 
'private' => [], 'user' => [] ];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fd4a27fb2d70b98ce9161dc050788d8ac364110
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to