Bug 49957

Summary: [Qt] screenIsMonochrome() is broken
Product: WebKit Reporter: Andreas Kling <kling>
Component: CSSAssignee: Renata Hodovan <rhodovan.u-szeged>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch none

Andreas Kling
Reported 2010-11-22 20:34:40 PST
Our current implementation of screenIsMonochrome() checks if a QWidget's QPaintDevice::numColors() is < 2. This is incorrect, for a monochrome device it will be == 2, since you get the number of possible colors, not the number of bits per color value. Also, QPaintDevice::numColors() has been deprecated by QPaintDevice::colorCount()
Attachments
Proposed patch (1.01 KB, patch)
2010-12-15 09:46 PST, Andreas Kling
no flags
Andreas Kling
Comment 1 2010-12-15 09:46:50 PST
Created attachment 76655 [details] Proposed patch
Antonio Gomes
Comment 2 2010-12-15 12:00:58 PST
Comment on attachment 76655 [details] Proposed patch numcolor is deprecated ok, but why == instead of <? :)
WebKit Commit Bot
Comment 3 2010-12-15 13:00:32 PST
Comment on attachment 76655 [details] Proposed patch Clearing flags on attachment: 76655 Committed r74137: <http://trac.webkit.org/changeset/74137>
WebKit Commit Bot
Comment 4 2010-12-15 13:00:37 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.