"Basic Page Style" entry in the View > Page Style menu doesn't work reliably
Categories
(Firefox :: Menus, defect, P3)
Tracking
()
People
(Reporter: espressive, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(7 files, 1 obsolete file)
2.24 MB,
video/mp4
|
Details | |
26 bytes,
text/css
|
Details | |
28 bytes,
text/css
|
Details | |
67 bytes,
text/css
|
Details | |
553 bytes,
text/html
|
Details | |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
I have the following stylesheets defined in the head
section of the HTML document:
<link rel="stylesheet" href="css/main.css" media="screen" />
<link rel="alternate stylesheet" href="css/high-contrast.css" media="screen"
title="High Contast" />
<link rel="alternate stylesheet" href="css/dyslexia.css" media="screen"
title="Open-Dyslexic" />
When I load the page in Firefox, the View > Page Style
menu is populated by these alternate stylesheets. Also, switching to any of the alternates does update the page as expected.
When switching back to Basic Page Style
however, the original page style is not reflected. It seems that whatever the last alternate selected stylesheet was, is assigned to Basic Page Style
. The only way to get back to the original styling is to reload the page.
The attache video demonstrates the problem described.
Assignee | ||
Comment 1•5 years ago
|
||
Live repro: https://crisal.io/tmp/alt-sheet.html
Assignee | ||
Comment 2•5 years ago
|
||
This was regressed by bug 1447009 effectively.
![]() |
||
Comment 3•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
This was regressed by bug 1447009 effectively.
Hmm, I got a different window:
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=8ebcde6a7778fdd450b948f59992f7295c6b9ff7&tochange=ecc9cefef68de7ba316fb8d63848e907f649a801
Updated•5 years ago
|
![]() |
||
Comment 4•5 years ago
|
||
![]() |
||
Comment 5•5 years ago
|
||
![]() |
||
Comment 6•5 years ago
|
||
![]() |
||
Comment 7•5 years ago
|
||
![]() |
||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
(In reply to Alice0775 White from comment #3)
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
This was regressed by bug 1447009 effectively.
Hmm, I got a different window:
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=8ebcde6a7778fdd450b948f59992f7295c6b9ff7&tochange=ecc9cefef68de7ba316fb8d63848e907f649a801
Ah, indeed. Seems like the code was rewritten after my change... Anyhow the fix is trivial. Thanks alice!
Assignee | ||
Comment 10•5 years ago
|
||
We compare the value passed through with the title, and StyleSheet.title
returns null for empty titles, so we never consider an empty title to be
in the document, which is bad.
Assignee | ||
Comment 11•5 years ago
|
||
Depends on D79700
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c2ee72003dc9
https://hg.mozilla.org/mozilla-central/rev/bf23c417bc98
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Is this something we should consider uplifting to ESR78?
Assignee | ||
Comment 15•5 years ago
|
||
This is a very old regression, but on the other hand it might be nice to fix it for ESR. Gijs, thoughts?
Comment 16•5 years ago
|
||
Sure, taking this on esr seems fine
Assignee | ||
Comment 17•5 years ago
|
||
Comment on attachment 9156741 [details]
Bug 1645789 - Fix "Default Page Style" submenu to do the right thing. r=Gijs
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Broken UI (though an uncommon one).
- User impact if declined: Page style menu doesn't work as it should.
- Fix Landed on Version: 79
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Relatively straight forward patch, lots of new tests.
- String or UUID changes made by this patch: none
Assignee | ||
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Comment on attachment 9156741 [details]
Bug 1645789 - Fix "Default Page Style" submenu to do the right thing. r=Gijs
Fixes problems with the Default Page Style menu. New regression for users updating from ESR68 to ESR78. Approved for 78.1esr.
Updated•5 years ago
|
Comment 19•5 years ago
|
||
bugherder uplift |
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Not sure this is relevant or related ... but View > Page Style menu seems to ignore alternate stylesheets when displaying a local HTML file.
See discussion here:
https://support.mozilla.org/en-US/questions/1293681
For example, this simple HTML file saved on Win10 as %TEMP%\alternate_stylesheets.html
<!DOCTYPE html>
<!-- See for example: https://www.w3.org/Style/Examples/007/alternatives -->
<html>
<head>
<link rel="stylesheet"
href="https://www.w3.org/Style/CSS/w3c-2010/main.css" title=Main>
<link rel="alternate stylesheet"
href="http://www.w3.org/StyleSheets/Core/Steely" title=Steely>
<link rel="alternate stylesheet"
href="http://dbaron.org/style/forest" title="Forest (by David Baron)">
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
Comment 21•5 years ago
|
||
I have reproduced the issue on Firefox Nightly 79.0a1 (2020-06-15) under macOS 10.15.5 using the testcases provided by Emilio and Alice.
The issue is fixed on Firefox Nightly 80.0a1 (2020-07-06), Firefox 79.0b4 and Firefox 78.1.0esr (treeherder build). Tests were performed on macOS 10.15.5, Windows 10 and Ubuntu 20.04.
Description
•