Closed Bug 367618 Opened 13 years ago Closed 12 years ago

Windows 8bit (256) system color makes 99% of window blank/white

Categories

(Core :: Graphics, defect, P2, critical)

x86
Windows XP
defect

Tracking

()

VERIFIED FIXED
mozilla1.9beta3

People

(Reporter: jab_creations, Assigned: vlad)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070120 Minefield/3.0a2pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070120 Minefield/3.0a2pre

In XP I set the system color to 8bit for backwards computability testing. After updating to the latest version of Firefox 3 nightly build I entered and saw nothing but a blank white area where the browser should appear (I could only view the very top bar with the icon, minimize, restore, and close buttons).

Reproducible: Always

Steps to Reproduce:
1. Set XP to 8bit color in the display panel and apply.
2. Start Firefox.
Actual Results:  
Firefox's GUI and rendering area fail to display.

Expected Results:  
Firefox's GUI and rendering area should display but degrade.

I also had issues with graceful color degrading running a local test though when I accessed an internet version it had no issues. This was using the latest stable 2.0 release. I am unable to test that separate bug with Minefield at this time.
Component: General → GFX: Thebes
Product: Firefox → Core
QA Contact: general → thebes
Version: unspecified → Trunk
Duplicate of this bug: 368574
Duplicate of this bug: 408781
Duplicate of this bug: 398230
This bug also occurs when connecting via RDP. If RDP is set to 8-bit the entire window is white. It RDP is set to 15-bit or higher it displays properly. I'm using Firefox 3 Beta 2. Firefox 2.0.0.11 works as expected. The blank page seems to show up on the Firefox Update window when running Firefox 3 Beta 2 for the first time (or anytime after running 2.0.0.11) so I have to guess where the button to continue is. This bug makes Firefox unusable when I have to remote into my work desktop from home. 
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9?
I'll take this; I think I know how to make this work.
Assignee: nobody → vladimir
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Well, that was easy.
Attachment #299871 - Flags: review?(pavlov)
Attachment #299871 - Flags: review?(pavlov) → review+
(In reply to comment #6)
> Created an attachment (id=299871) [details]
> treat all HDCs as RGB24
> 
> Well, that was easy.
> 

Note that at least over RDP this only appears to display in 20 colours (the size of the default palette); is something going wrong with palette selection?
Hmm, where/how do we need to set up the palette?  We're using the HDC given to us by windows, and then, I believe, calling CreateCompatibleDC on it; do we need a palette setup on that DC?
Ah, I see it in the old windows code.  Ok; I'll check this change in for now just to get something to display for b2, and do the extra work to get a nicer palette.  Just to make sure I have the right plan:

If RASTERCAPS says RC_PALETTE, then:
- create palette with CreateHalftonePalette
- select it into the DC using SelectPalette, passing TRUE for the background parameter
- RealizePalette

Do I ever need to call UpdateColors()?  We Invalidate() on WM_PALETTECHANGED, so I'm thinking no.
Ok, checked in that patch to get something drawing, will do followup patch with above.
(In reply to comment #9)
>Do I ever need to call UpdateColors()?  We Invalidate() on WM_PALETTECHANGED,
>so I'm thinking no.
All UpdateColors() is is a a quick pixel mapping hack. I think the point of it is that it's something simple you can do immediately whereas painting is async.
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b3pre) Gecko/2008013002 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

V.Fixed, for this patch: no more white areas :-)

***

The color palette does look poor, but I don't know if that's a bug or to be expected.
Neil and you seem to be discussing that subject, so I'll look forward for the next patch...
Summary: XP 8bit system color makes 99% of window blank/white. → Windows 8bit (256) system color makes 99% of window blank/white
No longer blocks: 367990
Duplicate of this bug: 367990
Priority: P3 → P2
fixed here also, 
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b4pre) Gecko/2008020803 SeaMonkey/2.0a1pre
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b4pre) Gecko/2008022204 Minefield/3.0b4pre
I'm going to mark this as fixed and create a new bug for fixing the palette issue; however, the latter probably won't be fixed for Fx3 unless someone contributes a patch.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Target Milestone: --- → mozilla1.9beta3
You need to log in before you can comment on or make changes to this bug.