Open Bug 956570 Opened 10 years ago Updated 2 years ago

Invisible unstyled controls except in tilt

Categories

(Core :: Web Painting, defect, P5)

26 Branch
x86_64
Windows 7
defect

Tracking

()

People

(Reporter: realRaven, Unassigned)

References

()

Details

Attachments

(1 file)

In my browser most unstyled controls (checkbox, radio buttons, scrollbars, button borders) are invisible / not painted, except when I switch on tilt (3d view). This only happens on html pages, not in the chrome context (dialogs etc). I also tried remedying it by loading a full theme (Nautipolis) but the same thing happens

Also, tooltips in pages appear broken (they are showing broken up text and seem to be segmented into lines

I am using Windowblinds for styling all my windows apps on Firefox has this problem, I believe there might be an about:config setting to fix this (but I do not know which one). I tried toggling gfx.direct2d.disabled but this doesn't help.



To test, I was using the following page:
http://www.lehigh.edu/~inwww/form-test.html
I have experimented with taking out direct2d from the following settings:
gfx.canvas.azure.backends
gfx.content.azure.backends
but this didn't help. (I know I have a slightly outdated graphics card which has problems with Direct2d - it is a Radeon HD 4850, which AFAIK is not fully direct2d compliant)
Just to test whether Addons are involved or not I restarted in safe mode which makes the controls visible. However, when I disable ALL addons manually and restart the controls are missing again. what other settings that are content / screen related are affected by safe mode? Could it be a broken userContent.css??
Perhaps you should start with a fresh profile and then install your
add-ons / themes one by one in that, just to see which one is causing
the problem?
Priority: -- → P5
(In reply to Mats Palmgren (:mats) from comment #3)
> Perhaps you should start with a fresh profile and then install your
> add-ons / themes one by one in that, just to see which one is causing
> the problem?

That is actually exactly what I did, and which created the problem in the first place. I created a new profile, taking care _not_ to import my old settings. However I did import:
-my addons
-cookies
-bookmarks
-formfill history
-permissions
I did _not_ import
-preferences

My guess is that the required setting might be in there. Which files do I need to diff to see what I might be missing? Hope they are sorted the same way...
preferences (about:config customizations) are stored in preferences.js. Diffing that against a fresh profile may not be super-useful, though -- there's probably a lot of noise in there.

Might be better to:
 - Delete that file (making sure to have backed it up), & check whether that that fixes the problem.
 (if not, the problem lies elsewhere, obviously)

 - Now delete half of the file, see if that fixes it
 - delete half again, etc.
I think the file is called prefs.js actually, in case you didn't find it anyway.
(In reply to Daniel Holbert [:dholbert] from comment #5)
> preferences (about:config customizations) are stored in preferences.js.
> Diffing that against a fresh profile may not be super-useful, though --
> there's probably a lot of noise in there.
Yeah I noticed that (800k on the old profile opposed to 200k on the new one)

Anyway, using ExamDiff pro I did found the setting:

user_pref("layers.prefer-opengl", true);

this fixed the problem for me (regardless of having direct2d disabled). A restart of the browser is necessary when you set it to false only. As I interpret it from my observation Firefox (in Windows) [without the prefer-opengl flag] renders the controls 2 times, once with OpenGL (visible) and then again with DirectX - in this second phase the controls get overwritten with "white paint" and become invisible on my machine. I think I have DirectX 9 (and maybe 10 also) installed on my machine, and that has some problems with Direct2d. Gecko probably does some hard coded Direct2d calls in the rendering of these controls, which causes issues depending on your video hardware + drivers. Fairly esoteric stuff, but I am happy to have this documented here.

Note, disabling the directX stuff will also give me a performance advantage as nothing is rendered twice - maybe there is some room for optimization here for the Windows version? A comment from the core developers would be great!
(Sorry, prefs.js - yeah.) I'm glad you found the responsible pref. Sounds like this is a layers bug, then. Not sure what the current state of this pref is or whether we still expect things to work when it's turned on -- maybe Bas knows?

For what it's worth, it looks like the only usages of this pref are in:
 http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.cpp
and those usages were originally added in bug 546515:
 http://hg.mozilla.org/mozilla-central/rev/d4e5f5f19777
--> Adding that bug as a (soft) dependency.
Component: Layout: Form Controls → Layout: View Rendering
Depends on: 546515
(In reply to Daniel Holbert [:dholbert] from comment #8)

> For what it's worth, it looks like the only usages of this pref are in:
>  http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.cpp
> and those usages were originally added in bug 546515:
>  http://hg.mozilla.org/mozilla-central/rev/d4e5f5f19777
> --> Adding that bug as a (soft) dependency.
Digging around in mxr a bit more I also found
layers.prefer-d3d9
and tried using that instead (and turning off OpenGL), but it let's the bug reappear. So this points to a problem with my DirectX 9 with the Radeon Card that I have; it might also be caused by the fact that Windowblinds paints over the "unstyled" Windows controls (I suspect 

(In reply to Daniel Holbert [:dholbert] from comment #8)

> For what it's worth, it looks like the only usages of this pref are in:
>  http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.cpp
> and those usages were originally added in bug 546515:
>  http://hg.mozilla.org/mozilla-central/rev/d4e5f5f19777
> --> Adding that bug as a (soft) dependency.
Digging around in mxr a bit more I also found
layers.prefer-d3d9
and tried activating that instead (and turning off OpenGL), but it let's the bug reappear. So this points to a problem with my DirectX 9 with the Radeon Card that I have; it might also be caused by the fact that Windowblinds paints over the "unstyled" Windows controls (I suspect Aero does the same, but on a lower "earlier" level). Not sure whether WB completely bypasses the Aero painting or whether it just "paints over" that. That's probably also the reason you do not see this bug a lot more often, it is in edge case. Would still be interested if some Aero users with AMD graphics cards experience the same...

So my initial theory of this being caused by D2D might be wrong; it is also strange how D3D painting works in tilt, but not in layers (if it is used there as well). I am pretty much a layman when it comes to Dx processing, I have stopped paying attention when technology was still simple and all you had to do look at WM_PAINT messages, back in the good old days "programming windows" (Petzold) and having one big dirty message queue :-)
Component: Layout: View Rendering → Layout: Web Painting
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: