[webkit-reviews] review granted: [Bug 182855] The WebContent process should not use NSScreen in the screenAvailableRect implementation. : [Attachment 334283] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 20 11:39:23 PST 2018


Brent Fulgham <bfulgham at webkit.org> has granted Per Arne Vollan
<pvollan at apple.com>'s request for review:
Bug 182855: The WebContent process should not use NSScreen in the
screenAvailableRect implementation.
https://bugs.webkit.org/show_bug.cgi?id=182855

Attachment 334283: Patch

https://bugs.webkit.org/attachment.cgi?id=334283&action=review




--- Comment #28 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 334283
  --> https://bugs.webkit.org/attachment.cgi?id=334283
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=334283&action=review

r=me

> Source/WebCore/platform/mac/PlatformScreenMac.mm:142
> +    if (screenRects().contains(WebCore::displayID(screen(widget)))) {

Is the result of WebCore::displayID(screen(widget)) worth capturing in a
variable? I'm not sure how costly it is to do this.

> Source/WebCore/platform/mac/PlatformScreenMac.mm:144
> +	   return rect;

... then this could just be:

return screenRects().get(displayIDForWidget);


More information about the webkit-reviews mailing list