RESOLVED FIXED 205021
Move WKWebView code related to testing to new files, with their own headers, and stop exposing test-only functions as SPI.
https://bugs.webkit.org/show_bug.cgi?id=205021
Summary Move WKWebView code related to testing to new files, with their own headers, ...
Simon Fraser (smfr)
Reported 2019-12-09 10:51:04 PST
Move WKWebView code related to testing to new files, with their own headers
Attachments
Patch (147.09 KB, patch)
2019-12-09 10:52 PST, Simon Fraser (smfr)
no flags
Patch (147.13 KB, patch)
2019-12-09 10:55 PST, Simon Fraser (smfr)
no flags
Patch (138.39 KB, patch)
2019-12-09 22:15 PST, Simon Fraser (smfr)
no flags
Patch (138.42 KB, patch)
2019-12-10 08:23 PST, Simon Fraser (smfr)
no flags
Patch (298.28 KB, patch)
2019-12-10 14:51 PST, Simon Fraser (smfr)
no flags
Patch (299.79 KB, patch)
2019-12-10 16:23 PST, Simon Fraser (smfr)
no flags
Patch (296.16 KB, patch)
2019-12-12 15:00 PST, Simon Fraser (smfr)
no flags
Simon Fraser (smfr)
Comment 1 2019-12-09 10:52:02 PST
Simon Fraser (smfr)
Comment 2 2019-12-09 10:55:54 PST
Simon Fraser (smfr)
Comment 3 2019-12-09 22:15:30 PST
Simon Fraser (smfr)
Comment 4 2019-12-10 08:23:20 PST
David Quesada
Comment 5 2019-12-10 08:42:21 PST
Comment on attachment 385240 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=385240&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:-480 > -- (void)didEndFormControlInteraction WK_API_AVAILABLE(ios(10.3)); It seems Safari is overriding these methods. Could they stay in the private header rather than being demoted to test-only SPI? > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:-576 > -@property (nonatomic, readonly) _WKFrameHandle *_mainFrame WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); _hasInspectorFrontend, _inspector, and _mainFrame are used by Safari, and it doesn't seem like they were added explicitly for test purposes. Can they stay in the private header? > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:-580 > -- (void)_completeTextManipulation:(_WKTextManipulationItem *)item completion:(void(^)(BOOL success))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); I don't think these text manipulation SPIs are test-only. (It looks like they are needed for rdar://problem/56049043) They probably shouldn't have been added to the WKTesting section in the first place.
Simon Fraser (smfr)
Comment 6 2019-12-10 09:15:30 PST
(In reply to David Quesada from comment #5) > Comment on attachment 385240 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=385240&action=review > > > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:-480 > > -- (void)didEndFormControlInteraction WK_API_AVAILABLE(ios(10.3)); > > It seems Safari is overriding these methods. Could they stay in the private > header rather than being demoted to test-only SPI? > > > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:-576 > > -@property (nonatomic, readonly) _WKFrameHandle *_mainFrame WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); > > _hasInspectorFrontend, _inspector, and _mainFrame are used by Safari, and it > doesn't seem like they were added explicitly for test purposes. Can they > stay in the private header? > > > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:-580 > > -- (void)_completeTextManipulation:(_WKTextManipulationItem *)item completion:(void(^)(BOOL success))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); > > I don't think these text manipulation SPIs are test-only. (It looks like > they are needed for rdar://problem/56049043) They probably shouldn't have > been added to the WKTesting section in the first place. I'll be building the Safari stack for testing, so I'll find out where Safari is using WKTesting by mistake.
Simon Fraser (smfr)
Comment 7 2019-12-10 14:51:32 PST
Simon Fraser (smfr)
Comment 8 2019-12-10 16:23:52 PST
Tim Horton
Comment 9 2019-12-10 16:34:03 PST
Comment on attachment 385315 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=385315&action=review rs=me > Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.h:52 > +@property (nonatomic, readonly) BOOL _hasInspectorFrontend; Keep properties separate!
Radar WebKit Bug Importer
Comment 10 2019-12-10 16:41:44 PST
Simon Fraser (smfr)
Comment 11 2019-12-11 09:50:56 PST
WebKit Commit Bot
Comment 12 2019-12-11 13:27:46 PST
Re-opened since this is blocked by bug 205133
Truitt Savell
Comment 13 2019-12-11 14:11:24 PST
Reverted r253376 for reason: Broke internal builds Committed r253396: <https://trac.webkit.org/changeset/253396>
Simon Fraser (smfr)
Comment 14 2019-12-12 15:00:19 PST
Simon Fraser (smfr)
Comment 15 2019-12-15 10:00:09 PST
Re-landed in https://trac.webkit.org/r253465 with SPI headers.
Note You need to log in before you can comment on or make changes to this bug.