Alternate stylesheets seem to be broken in Pale Moon. Topic is solved
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.
This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.
Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.
This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.
Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
- athenian200
- Contributing developer
- Posts: 1498
- Joined: 2018-10-28, 19:56
- Location: Georgia
Alternate stylesheets seem to be broken in Pale Moon.
I found this in the official Windows 28.12.0 binary while testing something on my Windows machine. Anyway...
Example page with alternate stylesheets:
https://www.w3.org/Style/Examples/007/a ... es.en.html
Steps to reproduce:
1. Navigate to the above URL.
2. Go to the View Menu, and then go to Page Style and select any alternate stylesheet.
Expected behavior:
Alternate stylesheets are applied to the page and change its appearance.
Actual behavior:
The only choices that actually apply are "No Style" and "Basic Page Style," and if you select an alternate stylesheet it won't get applied to the page and won't remain selected.
Additional quirk noticed:
Borealis Navigator's alternate stylesheets still appear to work okay when built against the same version of UXP as 28.12.0, which suggests the problem lies in the application code rather than the platform.
Is anyone else having this problem?
Example page with alternate stylesheets:
https://www.w3.org/Style/Examples/007/a ... es.en.html
Steps to reproduce:
1. Navigate to the above URL.
2. Go to the View Menu, and then go to Page Style and select any alternate stylesheet.
Expected behavior:
Alternate stylesheets are applied to the page and change its appearance.
Actual behavior:
The only choices that actually apply are "No Style" and "Basic Page Style," and if you select an alternate stylesheet it won't get applied to the page and won't remain selected.
Additional quirk noticed:
Borealis Navigator's alternate stylesheets still appear to work okay when built against the same version of UXP as 28.12.0, which suggests the problem lies in the application code rather than the platform.
Is anyone else having this problem?
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
Re: Alternate stylesheets seem to be broken in Pale Moon.
Are you sure it's because of an issue in the FE and not because it uses upgrade-insecure-requests?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
- RealityRipple
- Astronaut
- Posts: 647
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
Huh, I hadn't tested it, but yeah, there does seem to be a problem. My site (https://realityripple.com/) has seven different named styles to choose from. The buttons at the bottom of the page and the JS to select between them still works, but the actual menu items under View don't work anymore.
Re: Alternate stylesheets seem to be broken in Pale Moon.
TBH, I didn't even know that was a thing, so I'm probably even less suitable to research this than you two are
Wouldn't surprise me if this is some more Janek fallout though. We'll have to see.
Wouldn't surprise me if this is some more Janek fallout though. We'll have to see.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: Alternate stylesheets seem to be broken in Pale Moon.
Interestingly, selecting a style using JS button on the bottom of RealityRipple's website updates the selected style in the View menu.
It may be related or not but selecting style from the View menu generates an error:
Probably sequence does not complete because of this.
It may be related or not but selecting style from the View menu generates an error:
Code: Select all
TypeError: this.controller is undefined[Learn More]
browserPlacesViews.js:223:1
- FranklinDM
- Add-ons Team
- Posts: 575
- Joined: 2017-01-14, 02:40
- Location: Philippines
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
I tested around with a few older versions and found that this feature works fine in v28.10.0 and earlier, and might have been broken with v28.11.0.
Re: Alternate stylesheets seem to be broken in Pale Moon.
I didn't get any error. I'll have to try a new session, I guess.adesh wrote: ↑2020-08-11, 11:17Interestingly, selecting a style using JS button on the bottom of RealityRipple's website updates the selected style in the View menu.
It may be related or not but selecting style from the View menu generates an error:Probably sequence does not complete because of this.Code: Select all
TypeError: this.controller is undefined[Learn More] browserPlacesViews.js:223:1
New session in a portable: still no error. Not that I think it'd be related because this wouldn't plug into places. Possibly an extension problem for you, Adesh?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: Alternate stylesheets seem to be broken in Pale Moon.
Definitely working in 28.10.0 and not working in 28.11.0, so... a regression somewhere.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
- FranklinDM
- Add-ons Team
- Posts: 575
- Joined: 2017-01-14, 02:40
- Location: Philippines
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
I've found a fix, and PR #1825 should resolve the issue.
Re: Alternate stylesheets seem to be broken in Pale Moon.
Yeah I just found out the same, I converted:
to
In my tidying up of formatting, but didn't think of the implied return in the expression format declaration.
Code: Select all
return Array.some(frame.document.styleSheets,
function(stylesheet) stylesheet.title == title);
Code: Select all
return Array.some(frame.document.styleSheets,
function(stylesheet) {
stylesheet.title == title
});
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
- RealityRipple
- Astronaut
- Posts: 647
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
Just did a test build, everything looks back to normal. Nice catch!
Re: Alternate stylesheets seem to be broken in Pale Moon.
So where did these regressions come from?
- RealityRipple
- Astronaut
- Posts: 647
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
Issue #1737. Might want to make sure no similarly written functions lost their returns.
Re: Alternate stylesheets seem to be broken in Pale Moon.
Because of the weird-ass function-body-as-expression syntax that someone at some point in JS's history thought was such a wonderful idea to save a few keystrokes.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
- RealityRipple
- Astronaut
- Posts: 647
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
it's part of the crazy arrow function syntax that turns javascript into an unreadable mess
- RealityRipple
- Astronaut
- Posts: 647
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
I think something's gone wrong here again. My site only shows the selected page style in the menu. All the alternate styles are missing. If I select a different style manually, the menu item changes to match, but all the others are still hidden.
Re: Alternate stylesheets seem to be broken in Pale Moon.
I see all the styles listed for a moment when the page is loading but they vanish when I hover the menu item again.
- FranklinDM
- Add-ons Team
- Posts: 575
- Joined: 2017-01-14, 02:40
- Location: Philippines
- Contact:
Re: Alternate stylesheets seem to be broken in Pale Moon.
The changes in Issue #1629 (UXP) might have been the cause. Try flipping the pref dom.link.disabled_attribute.enabled to false.
EDIT: This was uplifted to release in this commit.
EDIT: This was uplifted to release in this commit.
Last edited by FranklinDM on 2020-09-12, 06:45, edited 2 times in total.