Bug 208282

Summary: Add ENABLE(SCROLLING_THREAD) and use it to turn off some code we don't need for iOS
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, fred.wang, jamesr, luiz, simon.fraser, thorton, tonikitoo, webkit-bug-importer, zan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch thorton: review+

Description Simon Fraser (smfr) 2020-02-26 18:15:44 PST
Add ENABLE(SCROLLING_THREAD) and use it to turn off some code we don't need for iOS
Comment 1 Simon Fraser (smfr) 2020-02-26 18:19:22 PST
Created attachment 391825 [details]
Patch
Comment 2 Simon Fraser (smfr) 2020-02-26 18:46:17 PST
Created attachment 391830 [details]
Patch
Comment 3 Simon Fraser (smfr) 2020-02-26 20:49:34 PST
Help getting Nicosia to build would be appreciated.
Comment 4 Zan Dobersek 2020-02-27 00:34:40 PST
Comment on attachment 391830 [details]
Patch

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

> Source/WTF/wtf/PlatformEnable.h:475
> +#if !defined(ENABLE_SCROLLING_THREAD)
> +#define ENABLE_SCROLLING_THREAD 0
> +#endif
> +

This block is not specific to any platform, so here the ENABLE_SCROLLING_THREAD gets defined for everybody but Cocoa which handles it in PlatformEnableCocoa.h.

> Source/WTF/wtf/PlatformEnable.h:831
> +#if !defined(ENABLE_SCROLLING_THREAD) && USE(NICOSIA)
> +#define ENABLE_SCROLLING_THREAD 1
> +#endif

Hence, this block does nothing for Nicosia-using ports. If the above block is removed, and ENABLE_SCROLLING_THREAD gets defined to 1 here, everything seems to build and work fine for Nicosia-using ports.

For this patch, I would propose using only this block to define ENABLE_SCROLLING_THREAD (if it was not defined before) to either 0 or 1, depending on USE(NICOSIA). I can swoop in later to introduce PlatformEnable<Port>.h files that handle this for everybody possibly defining USE(NICOSIA), and putting back the above block.
Comment 5 Simon Fraser (smfr) 2020-02-27 08:27:27 PST
What's odd here is that NICOSIA isn't a platform, nor is it an OS feature, and there is no #define USE_NICOSIA 1 in the header files; it all comes in from cmake. That makes the pattern of #defines in PlatformUse.h a bit weird.
Comment 6 Simon Fraser (smfr) 2020-02-27 08:30:30 PST
Created attachment 391876 [details]
Patch
Comment 7 Simon Fraser (smfr) 2020-02-27 11:35:42 PST
https://trac.webkit.org/changeset/257578/webkit
Comment 8 Radar WebKit Bug Importer 2020-02-27 11:36:14 PST
<rdar://problem/59855388>