Page MenuHomePhabricator

Warning regarding non standard property "zoom" on fawiki
Closed, ResolvedPublic

Description

When logged into fawiki and looking at Special:Search I see this warning in the browser console:

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”.

Clicking on the line number next to it does not take me to a script that doesn't seem to be the source of the issue (specifically, it takes me to this line of resources/src/startup/mediawiki.js).

This doesn't happen on article pages. I made sure this account does not have any Gadgets or user scripts enabled. It is a brand new account.

Searching for zoom in the MediaWiki namespace on fawiki returns a few results all of which gadgets and seem unrelated. Note that one of them, MediaWiki:Gadget-intro.css is indeed part of the definition of a general gadget in MediaWiki:Gadgets-definition and would load for all users; however, the "zoom" related part is commented out in this code.

The warning is shown in debug mode as well. I am unable to find the root cause of the problem.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle subscribed.

Untagging ResourceLoader since it does not have any CSS code. ResourceLoader is a system for delivering frontend code, from skins, extensions and gadgets.

  • Which browser?
  • In debug mode, from which URL and module name does it come from?

This happens with Firefox, but not with Chrome.

Here is a screenshot of the warning, as I get it on https://fa.wikipedia.org/wiki/%D8%A8%D8%AE%D8%B4_%D9%88%D9%84%D8%A7%D9%86%D8%B3?debug=true (a randomly selected article):

image.png (33×952 px, 3 KB)

Clicking on the load.php:718:25 takes me to the code shown below, which is what I referenced above (in mediawiki.js)

image.png (276×510 px, 12 KB)

The warning comes from this piece of code (I found it by searching for 'zoom:' on the Inspector tab). I am guessing it belongs to the CentralNotice extension:

.cn-closeButton {
	display: inline-block;
	zoom: 1;
	background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUBAMAAAB/pwA+AAAAElBMVEUAAAAQEBDPz88AAABAQEDv7+9oe1vvAAAABnRSTlMA3rLe3rJS22KzAAAARElEQVQI12PAAUIUQCSTK5BwFgIxFU1AhKECUFAYKAAioXwwBeZChMGCEGGQIFQYJohgIhQgtCEMQ7ECYTHCOciOxA4AADgJTXIb9s8AAAAASUVORK5CYII=) no-repeat;
	width: 20px;
	height: 20px;
	text-indent: 20px;
	white-space: nowrap;
	overflow: hidden;
}

zoom: 1 doesn't actually do anything; it has been used in the past to work around some issues in IE 6 and 7, and we've removed most uses of it since we dropped support for those browsers (e.g. https://gerrit.wikimedia.org/r/c/mediawiki/core/+/540740).

Good catch! resources/ex.centralNotice.display/display.css matches the chunk of code you pasted above. Let me submit a patch.

Change 613229 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/extensions/CentralNotice@master] Remove IE 6 & 7 hasLayout hacks

https://gerrit.wikimedia.org/r/613229

Huji moved this task from Backlog to Doing on the User-Huji board.

Change 613229 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Remove IE 6 & 7 hasLayout hacks

https://gerrit.wikimedia.org/r/613229

I'm going to keep this open until I can test it in production and verify that the error went away (like it did in my private test wiki).

@Huji: this seems to be fixed on fawiki, isn’t it?

No reply from @Huji, resolving per last comment.