Bug 208282 - Add ENABLE(SCROLLING_THREAD) and use it to turn off some code we don't need for iOS
Summary: Add ENABLE(SCROLLING_THREAD) and use it to turn off some code we don't need f...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-26 18:15 PST by Simon Fraser (smfr)
Modified: 2020-02-27 11:36 PST (History)
14 users (show)

See Also:


Attachments
Patch (12.08 KB, patch)
2020-02-26 18:19 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (12.55 KB, patch)
2020-02-26 18:46 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (12.45 KB, patch)
2020-02-27 08:30 PST, Simon Fraser (smfr)
thorton: review+
Details | Formatted Diff | Diff

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