Closed Bug 466669 Opened 16 years ago Closed 16 years ago

Windows nsIScreen::GetColorDepth() should correct 32 to 24

Categories

(Core :: Widget: Win32, defect)

All
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

In bug 424386, we discussed making the Windows widget code correct color depth values that are 32 to be 24 instead. This is required to follow the spec, as cited in 424386 comment 3. It wasn't done there because of concerns for Web compatibility. However, I think the Web compatibility concerns are not relevant because it actually seems to vary from machine to machine -- some display drivers return 24, and some return 32. (Otherwise bug 424386 would have been a problem for a lot more people, including the tinderboxes.) So I think we should make the Windows widget code do the correction from 32 to 24 and remove the hack in nsMediaFeatures.cpp's GetDepth function.
Flags: wanted1.9.2?
Sorry, my second bug reference should have been bug 458847. (And I meant for bug 424386 comment 3 to be a link as well.)
Attached patch patch (obsolete) — Splinter Review
Not yet tested or compiled.
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
I had just found where to fix this; but I didn't know about the existing override ;-) Could you include my bug 424386 comment 18 nit too ?
Summary: windows nsIScreen::GetColorDepth should correct 32 to 24 → Windows nsIScreen::GetColorDepth() should correct 32 to 24
Depends on: 424386
Attached patch patchSplinter Review
Attachment #349979 - Attachment is obsolete: true
Comment on attachment 353515 [details] [diff] [review] patch Isn't there a reftest that explicitly tests this?
Yeah, but we changed it because it was returning 32 for some people; see bug 458847. Do you think i should undo the change we made there along with this?
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
(In reply to comment #6) > Do you think i should undo the change we made there along with this? I would think the new test is fine, per bug 458847 comment 9 rationale.
In the context of nsIScreen, what's the difference between pixel depth and color depth? The code for both Windows and Mac OS X return the same value for both, so I'm unclear how to document these.
I've written a doc for nsIScreen; I still would like to know what to say about the difference between colorDepth and pixelDepth, but otherwise this is written up, including a note about the change in this bug. https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIScreen
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: