Open Bug 1943796 Opened 11 months ago Updated 2 days ago

"Basic Page Style" option no longer appears for sites using alternative stylesheets where the default stylesheet has no name (e.g. Advent of Code)

Categories

(Firefox :: Menus, defect)

Firefox 134
Desktop
All
defect

Tracking

()

Tracking Status
firefox-esr128 --- wontfix
firefox134 --- wontfix
firefox135 --- wontfix
firefox136 --- fix-optional

People

(Reporter: pokechu022, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0

Steps to reproduce:

  1. Go to https://adventofcode.com/
  2. Press alt
  3. Select view -> page style -> High Contrast
  4. Press alt
  5. Select view -> page style

Actual results:

No option for "Basic Page Style" appears, and after selecting either of the other options, there is no way to return to the basic page style (other than navigating to another page and then navigating back, which does reset stylesheets; refreshing does not).

Expected results:

The "Basic Page Style" option should appear and be selected by default.

https://adventofcode.com/2024/about mentions that an alternative stylesheet is used to provide a high-contrast mode. See https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets. Note that the example at https://mdn.github.io/css-examples/alt-style-sheets/ does not have this issue (as it provides a name for the default stylesheet).

This regressed in build 2023-02-25; build 2023-02-24 works. From https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=25a8668d92431d469b443f0f2030328bab754aea&tochange=adce45ea73836172c7ad0247a8de1acc3f5a2162 I assume it was the fix to bug 1818026 that caused this regression (as that directly touched this functionality).

Flags: needinfo?(gijskruitbosch+bugs)

The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

For clarification: in step 2 I already don't see "basic page style" - are you seeing something else?

Given:

  • it took 2 years to find a page that breaks in this way
  • affected sites have a trivial workaround (put a name attribute on the default style)
  • affected users who want to "go back" to the default style can do that by navigating cross-site
  • other browsers don't even have UI for these alt sheets
  • it looks like fixing this requires debugging the C++ code and very very carefully negotiating the performance optimization so we don't regress page load for the vast majority of pages that don't have alt sheets (as the bug appears to be that we do not get called by the C++ code once the alt sheet is selected)

I don't think I can prioritize fixing this regression. If someone has time to investigate further and write a patch I would normally offer to review, though in this case it would likely need review from a layout peer (i.e. not me) anyway.

Status: UNCONFIRMED → NEW
Component: CSS Parsing and Computation → Menus
Ever confirmed: true
Flags: needinfo?(gijskruitbosch+bugs)
Keywords: regression
OS: Unspecified → All
Product: Core → Firefox
Regressed by: 1818026
Hardware: Unspecified → Desktop

Set release status flags based on info from the regressing bug 1818026

For clarification: in step 2 I already don't see "basic page style" - are you seeing something else?

No, it is also missing at step 2 (but when I first ran into this, I didn't notice until step 5).

Duplicate of this bug: 1867963
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: