Closed Bug 1489881 Opened 7 years ago Closed 4 years ago

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

Categories

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

Firefox 62
x86_64
Windows 10
defect

Tracking

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

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

People

(Reporter: alice0775, Unassigned)

References

()

Details

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

Attachments

(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: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=04c09eeff73853398a997fba5c1f4c62f3d0efae&tochange=2dca44947bff13747fb708a9ce4adc675afd2d03 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. :emilio 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"); el.removeAttr("disabled"); } 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 != "") { for: 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 https://www.orange-book.com/other/obwfk58020/index 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 overseas@trusco.co.jp
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: https://www.orange-book.com/ja/c/index.html, the page loads as expected:

https://prnt.sc/qvMT5cke9S1M

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)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

WFM too

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

Attachment

General

Created:
Updated:
Size: