Bug 187492 - WebGL contexts unable to detect correct display upon first WebProcess creation
Summary: WebGL contexts unable to detect correct display upon first WebProcess creation
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-09 16:58 PDT by Justin Fan
Modified: 2018-07-09 21:46 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.06 KB, patch)
2018-07-09 17:13 PDT, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!