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

Description Andreas Kling 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()
Comment 1 Andreas Kling 2010-12-15 09:46:50 PST
Created attachment 76655 [details]
Proposed patch
Comment 2 Antonio Gomes 2010-12-15 12:00:58 PST
Comment on attachment 76655 [details]
Proposed patch

numcolor is deprecated ok, but why == instead of <? :)
Comment 3 WebKit Commit Bot 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>
Comment 4 WebKit Commit Bot 2010-12-15 13:00:37 PST
All reviewed patches have been landed.  Closing bug.