Closed Bug 1489881 Opened 6 years ago Closed 2 years ago

"Basic Page Style" sheet would not load by default. Only alternate stylesheet seems to be applied


(Web Compatibility :: Site Reports, defect, P3)

Firefox 62
Windows 10


(firefox-esr60 unaffected, firefox62 wontfix, firefox63 wontfix, firefox64 fix-optional)

Tracking Status
firefox-esr60 --- unaffected
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- fix-optional


(Reporter: alice0775, Unassigned)




(Keywords: regression, webcompat:contact-ready, Whiteboard: [contactready] [js] )


(2 files)

Reproducible: always

Steps To Reproduce:
1. Open URL

Actual Results:
Only alternate CSS seems to be applied.  (See Alt > View > Page Style.)

Expected Results:
Basic Page Style should be applied by default.

Regression window:

Regressed by: Bug 1447009
Attached image Screenshot, GOOD vs BAD
After selecting "Basic Page Style" in View > Page Style menu, then the page is displayed correctly even if select alternate stylesheet. But after reloading page(F5), page broken again.

Your bunch of patch seems to cause the problem, can you please look into this?
Flags: needinfo?(emilio)
Summary: "Basic Page Style" sheet would not load by default. Only alternate CSS seems to be applied → "Basic Page Style" sheet would not load by default. Only alternate stylesheet seems to be applied
Assignee: nobody → emilio
Thanks for reporting this Alice, as usual you're amazing.

So, this page is relying on the title getter returning the empty string. Their style switcher looks like:

	Styleswitcher.switchStyle = function(name) {
		if (isWebKit) {
			$("link[media='screen']").each(function() {
				var el = $(this);
				if (el.attr("title") != "") {
					if (el.attr("title") == name) {
						el.attr("rel", "stylesheet");
					} else {
						el.attr("rel", "alternate stylesheet");
						el.attr("disabled", "disabled");
		} else {
			var sheets = document.styleSheets;
			for (var i = 0; i < sheets.length; i++) {
				if (sheets[i].title != "") {
					if (sheets[i].title == name) {
						sheets[i].disabled = false;
					} else {
						sheets[i].disabled = true;

		// Cookie をセット
		$.cookie(Styleswitcher.cookieName, name, {path:"/"});

Fix on their side would be to change:

        if (sheets[i].title != "") {


        if (!sheets[i].title) {

So that both null and the empty string are handled. I think I can't fix it here unless we decide to revert my change and raise an issue in the spec.

Given we've shipped the change already I think it might be really confusing though, unless there are more broken pages.

Moving to tech evangelism for now.
Component: CSS Parsing and Computation → Desktop
Flags: needinfo?(emilio)
Product: Core → Tech Evangelism
Version: 62 Branch → Firefox 62
Assignee: emilio → nobody
@Karl could you help us find a contact?
Flags: needinfo?(kdubost)
Priority: -- → P3
The form for contacting them by email is at

Note that they require a lot of information including phone number.

There is also this email which seems to be about contacting people with English
Flags: needinfo?(kdubost)
Whiteboard: [contactready] [js]
Too late to fix in 63. We could still take a patch for 65 and potentially for 64.
Product: Tech Evangelism → Web Compatibility

See bug 1547409. Moving webcompat whiteboard tags to keywords.

With the updated URL:, the page loads as expected:

Reporter, does the issue reproduce on your side?

Tested with:

Browser / Version: Firefox Nightly 101.0a1 (2022-04-21) (64-bit)
Operating System: Windows 10 PRO x64

Flags: needinfo?(alice0775)
Closed: 2 years ago
Resolution: --- → FIXED

WFM too

Flags: needinfo?(alice0775)
You need to log in before you can comment on or make changes to this bug.