RESOLVED FIXED 183048
The WebContent process should not use NSScreen in the screenDepth implementation.
https://bugs.webkit.org/show_bug.cgi?id=183048
Summary The WebContent process should not use NSScreen in the screenDepth implementat...
Per Arne Vollan
Reported 2018-02-22 11:26:57 PST
NSScreen method calls should be done in the UIProcess, since these calls will communicate with the WindowServer.
Attachments
Patch (4.42 KB, patch)
2018-02-22 11:48 PST, Per Arne Vollan
no flags
Patch (5.54 KB, patch)
2018-02-22 12:17 PST, Per Arne Vollan
no flags
Patch (6.73 KB, patch)
2018-02-22 12:51 PST, Per Arne Vollan
no flags
Patch (6.85 KB, patch)
2018-02-22 12:58 PST, Per Arne Vollan
no flags
Radar WebKit Bug Importer
Comment 1 2018-02-22 11:27:57 PST
Per Arne Vollan
Comment 2 2018-02-22 11:48:13 PST
Per Arne Vollan
Comment 3 2018-02-22 12:17:21 PST
Brent Fulgham
Comment 4 2018-02-22 12:20:43 PST
Comment on attachment 334464 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=334464&action=review This patch looks good, but I think it would be better if you got rid of the duplicated code. Can you please revise that? > Source/WebCore/platform/mac/PlatformScreenMac.mm:140 > + return screenProperties().get(iter->key).screenDepth; This snippet of logic is also in 'screenRect' and 'screenAvailableRect', (and perhaps others?). Can you encapsulate it in a common function that returns the appropriate screenProperties, then each of these methods can just return the member we are interested in? Also: Should we ASSERT if the depth is zero, just in case the IPC didn't happen for some reason?
Per Arne Vollan
Comment 5 2018-02-22 12:51:51 PST
Per Arne Vollan
Comment 6 2018-02-22 12:58:00 PST
Brent Fulgham
Comment 7 2018-02-22 13:22:24 PST
Comment on attachment 334470 [details] Patch Looks great! r=me.
Per Arne Vollan
Comment 8 2018-02-22 13:51:27 PST
Comment on attachment 334470 [details] Patch Thanks for reviewing!
WebKit Commit Bot
Comment 9 2018-02-22 16:17:43 PST
Comment on attachment 334470 [details] Patch Clearing flags on attachment: 334470 Committed r228940: <https://trac.webkit.org/changeset/228940>
WebKit Commit Bot
Comment 10 2018-02-22 16:17:44 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.