New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox default theme changes with UBO (non-webext) v1.11.5rc3+ #2502
Comments
I just noticed this on Windows 10. uBO needs to be enabled at browser start, if it's disabled and then you enable it, it won't change the theme. |
Any errors at the browser console? The only meaningful change I can think which could be related is the fix to #2493. I do not have Windows by the way, I won't be able to even try to reproduce this. |
Unfortunately, I don't see any errors in the browser console. |
True, but not practical;
I am not an experienced user of UBO, so unsure what errors to
The culprit commit is somewhere between
... Most unfortunate, I guess... |
Is this a Firefox theme? I understood the issue to be with a OS theme. If this is a Firefox theme, I would like to have a link to it. |
Not at all!
Default Fx theme, i.e. no persona (lightweight theme) or third party (full) theme installed.
Firefox 52.0.2 x86 release channel (en-US locale): https://ftp.mozilla.org/pub/firefox/releases/52.0.2/win32/en-US/ Firefox 52.0.2 x86 ESR channel (en-US locale): https://ftp.mozilla.org/pub/firefox/releases/52.0.2esr/win32/en-US/ |
What is "Aero Theme" then? On my side there is only one theme available, "Default 52.0.2". |
Windows "Aero Theme" that can be enabled on Windows Vista and Windows 7, https://en.wikipedia.org/wiki/Windows_Aero I just mentioned I have it enabled in my initial post, The issue reported has nothing to do with the OS theme, Thank you... |
@gorhill Also found another issue: I can't get the logger to open through uBO's panel. |
I can reproduce. It seems the issue is only with the logger as a detached window. When using shift-click to go back to non-detached, the logger appears as a tab. |
Same problem. Nightly 01-04-17, uBlock Origin 1.11.5rc4, Windows 8.1 with latest updates. Hamburger menu, close confirmation dialog and Classic Theme Restorer menus are also affected, Virtual_ManPL posted more comparison screenshots in this post: |
The same problems appear when updating umatrix from version 0.9.9b7 to 0.9.9b8. I use ublock and umatrix. With combination 0.9.9b7 and 1.11.5rc2 everything is still okay. Update one of the two and the problems appear. Color representation and window elements are disturbed. |
Fixed with 9f4a879. |
Seems like the current fix to #2493 has even more nasty side-effect on PaleMoon: the uBO icon simply disappears from the browser's toolbar after updating to 1.11.5rc3+ and can't be found in customize window either. Relevant browser console errors after disabling/re-enabling uBO 1.11.5rc3+:
Noticed the issue today on PaleMoon 26.5.0 (x64) + uBO 1.11.5rc3/4/5 under Windows 7 x64 (fully patched) after manually updating via GitHub. uBO 1.11.5.rc2 and earlier worked fine in this regard. Should I file a separate bug report on this? |
Works fine on Pale Moon 27.2.1. However from the error you report, I can probably fix this -- I think there is some ES6-only syntax which has been introduced in there ("method definition shorthand syntax"). |
I can reproduce the theme breakage on my Windows machine. The same thing happens on Nightly and 53. I have no idea why right now, there aren't obvious errors indicating something went wrong, and there's no obvious connection between the changes the patch makes and theming (or even the window in which things break, as the changes all relate to the 'hidden' window and/or offscreen drawing). We use the same APIs without issues from various other bits of Firefox already. I tested the original patch I provided on OS X, which would explain why I didn't notice it before. |
Update: this goes away (on my machine) if we wait 5 seconds to actually load a page into the windowless browser. Of course, that's not an actual fix, the question is what's finishing in those 5 seconds that is making this work instead of break... |
Isn't possible with the browser toolbox's inspector to find out why the theme's styles are not being applied? |
That's not a bad idea, though it's still not immediately obvious what's wrong. As far as I can tell Gecko's windows widget code gets... confused... for some reason, about the state of the world. Specifically, the media query (-moz-windows-default-theme) (which is supposed to match if using aero on vista/win7, or on all non-high-contrast windows 8/10 themes) doesn't match. This means we basically style Firefox as if you're using a high contrast theme, and use many more "native" colours rather than our own palette (for reasons not really relevant here, Windows exposes native colours that don't actually match what you'd be used to seeing on XP and later for non-classic themes, like Aero and all non-high-contrast themes on Win8 and Win10, which is why it looks so spectacularly ugly rather than like we actually tried and failed to apply Windows native styling). All the CSS and JS is loaded correctly, which is why there's no obvious errors in the console. But the media queries being wrong explain the broken appearance. There's probably other Windows-related media queries that are doing the opposite of what they should be here. What I suspect is that the Windows widget code is caching some data about the state of the world, and by creating a window earlier than we used to, that code is getting confused. By pure coincidence, this seems like it might be related to https://bugzilla.mozilla.org/show_bug.cgi?id=1351676 which I happened to file earlier this week... In any case, what I imagine should fix things (esp. on short notice here) is to simply wait until the hidden window is loaded, like before, but then still end up using a windowless browser. I'll put up a PR once I've made that code not-completely-utterly hacky (within the next half hour, I expect). My apologies for the mess! (and, to be clear, I normally work on frontend code, like js/css/xul, and so the actual widget code here would take me too long to figure out for a Saturday night...) |
… it for the background page
OK, I put up a PR. @gorhill, can you check it looks OK to you? This fixes things on my Windows machine, and logically speaking it makes some sense (though only some...) that it does. I'll try to see if I can find someone to look into the breakage this caused on Monday (on the Gecko side). Gecko shouldn't break like this just because consumers happen to create stuff early (or we should just be invoking the bootstrap methods later). That said, if the uBO codebase needs to stay compatible with older versions of Gecko (like Pale Moon) I'm not sure at what point this hack could be removed... |
... I downloaded 1.11.5rc5 from GitHub (file uBlock0.firefox.xpi) and extracted locally; and this was used to overwrite existing version inside 1.11.5rc5; then created a new (unsigned) Thanks all :-) |
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1353022 on the gecko widget issue. |
OS:
Windows Vista SP2 32bit fully updated
Aero Theme Enabled
Firefox version:
52.0.2esr (Vista users moved to ESR channel)
UBO version:
1.11.5rc5 (installed from Github, AMO is on 1.11.5rc4 currently)
DEFAULT settings, all filters updated manually.
Any version of UBO after 1.11.5rc2 alters default colours and other aspects
of Fx default theme after browser is restarted - the issue manifested itself
today, when I manually updated (from AMO) v1.11.5rc1 to v1.11.5rc3;
all versions after that continue to manifest the bug...
Screenshot from Fx's Safe Mode:
Toolbar background light blue, sidebar background paler blue,
"bookmarks" header in bold and "unified" with the rest of the sidebar.
Screenshot with only latest UBO 1.11.5rc5 enabled:
Toolbar background light grey/white, sidebar background white, "bookmarks"
header not in bold, in its own section above the rest of the sidebar,
with a pale blue background...
Please advise how to rectify things...
Thanks for your efforts in maintaining UBO!
The text was updated successfully, but these errors were encountered: