Bug 187492

Summary: WebGL contexts unable to detect correct display upon first WebProcess creation
Product: WebKit Reporter: Justin Fan <justin_fan>
Component: WebGLAssignee: Justin Fan <justin_fan>
Status: NEW ---    
Severity: Normal CC: commit-queue, dino, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Justin Fan 2018-07-09 16:58:07 PDT
WebGL contexts unable to detect correct display upon first WebProcess creation
Comment 1 Justin Fan 2018-07-09 17:13:23 PDT
Created attachment 344642 [details]
Patch
Comment 2 Tim Horton 2018-07-09 18:21:50 PDT
Comment on attachment 344642 [details]
Patch

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

> Source/WebKit/Shared/WebPageCreationParameters.h:142
> +    uint32_t displayID;

Shouldn’t this be a PlatformDisplayID?
Comment 3 Simon Fraser (smfr) 2018-07-09 18:23:03 PDT
Comment on attachment 344642 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:6192
> +    parameters.displayID = mainScreenDisplayID();

But this might not be the screen that at the window is on.
Comment 4 Tim Horton 2018-07-09 18:25:19 PDT
Comment on attachment 344642 [details]
Patch

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

>> Source/WebKit/UIProcess/WebPageProxy.cpp:6192
>> +    parameters.displayID = mainScreenDisplayID();
> 
> But this might not be the screen that at the window is on.

Get it from pageClient instead! There’s a nontrivial chance we have a parented view at this point.
Comment 5 Tim Horton 2018-07-09 18:26:00 PDT
Comment on attachment 344642 [details]
Patch

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

> Source/WebCore/ChangeLog:6
> +

__ up here

> Source/WebCore/ChangeLog:15
> +        Reviewed by NOBODY (OOPS!).

What’s this doing all the way down here? Should be ^^.
Comment 6 Justin Fan 2018-07-09 21:15:12 PDT
<rdar://problem/41915318>
Comment 7 Justin Fan 2018-07-09 21:46:55 PDT
Comment on attachment 344642 [details]
Patch

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

>> Source/WebKit/Shared/WebPageCreationParameters.h:142
>> +    uint32_t displayID;
> 
> Shouldn’t this be a PlatformDisplayID?

It's a using alias for uint32_t in PlatformScreen.h; should I bring in PlatformScreen.h or re-alias it in this header?

>>> Source/WebKit/UIProcess/WebPageProxy.cpp:6192
>>> +    parameters.displayID = mainScreenDisplayID();
>> 
>> But this might not be the screen that at the window is on.
> 
> Get it from pageClient instead! There’s a nontrivial chance we have a parented view at this point.

Will try!