Skip to content

Commit

Permalink
Avoid triggering image analysis when interrupting scroll deceleration…
Browse files Browse the repository at this point in the history
… by long pressing on an image

https://bugs.webkit.org/show_bug.cgi?id=258929
rdar://111506756

Reviewed by Dean Jackson.

On iOS, when long pressing over an image, the `WKImageAnalysisGestureRecognizer` activates and
begins analyzing images for Live Text and visual look up. This is not desirable for power and
performance in the case where the user is simply trying to scroll through a webpage with many
images, and frequently interrupts scroll deceleration by long pressing on images.

Mitigate this by adding an early return to `-imageAnalysisGestureDidBegin:`, to avoid incurring any
extra work in the case where the gesture is being activated while panning within a scroll view. To
do this, we add a new `lastTouchedScrollView` property on `WKImageAnalysisGestureRecognizer` that
tracks the last `UIScrollView` where touches began. This code is the same as existing logic in
`WKHighlightLongPressGestureRecognizer` and `WKSyntheticTapGestureRecognizer`, but it's somewhat
tricky to share the implementation between these three classes since their superclasses are all
different; for now, we can at least de-duplicate a bit of shared code by adding a new standalone
helper function to find a scroll view for a series of touches in the now-renamed `UIKitUtilities.h`,
and deploying that helper function in these three places.

We also add more testing infrastructure to keep track of a monotonically increasing ID representing
the number of times we trigger VisionKit APIs for image analysis by swizzling out
`VKCImageAnalyzer` methods; see below for more details.

Test: fast/images/text-recognition/ios/no-image-analysis-when-interrupting-scrolling.html

* LayoutTests/fast/images/text-recognition/ios/no-image-analysis-when-interrupting-scrolling-expected.txt: Added.
* LayoutTests/fast/images/text-recognition/ios/no-image-analysis-when-interrupting-scrolling.html: Added.

Add a layout test to verify that interrupting momentum scrolling via a long press doesn't trigger
any additional image analyzer requests in VisionKit.

* LayoutTests/resources/ui-helper.js:
(window.UIHelper.currentImageAnalysisRequestID):

Add a helper method to return the current (monotonically increasing) image analysis request ID.

* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
* Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm:
* Source/WebKit/UIProcess/Cocoa/WKStorageAccessAlert.mm:

Adjust `UIAlertControllerUtilities.h` -> `UIKitUtilities.h`; see below.

* Source/WebKit/UIProcess/ios/UIKitUtilities.h: Renamed from Source/WebKit/UIProcess/ios/UIAlertControllerUtilities.h.
* Source/WebKit/UIProcess/ios/UIKitUtilities.mm: Renamed from Source/WebKit/UIProcess/ios/UIAlertControllerUtilities.mm.

Add a new helper method to this file, to return a `UIScrollView` corresponding to a set of `UITouch`
objects; also rename `UIAlertControllerUtilities.*` to `UIKitUtilities.*`, since it now contains
helper functions related to UIKit (not just `UIAlertController`).

(WebKit::createUIAlertController):
(WebKit::scrollViewForTouches):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView imageAnalysisGestureDidBegin:]):

Implement the actual fix here by checking if the `WKImageAnalysisGestureRecognizer`'s last touched
scroll view is being panned.

* Source/WebKit/UIProcess/ios/WKHighlightLongPressGestureRecognizer.mm:
(-[WKHighlightLongPressGestureRecognizer touchesBegan:withEvent:]):

Deduplicate some code, using the new helper function in `UIKitUtilities.h`.

* Source/WebKit/UIProcess/ios/WKImageAnalysisGestureRecognizer.h:
* Source/WebKit/UIProcess/ios/WKImageAnalysisGestureRecognizer.mm:
(-[WKImageAnalysisGestureRecognizer reset]):
(-[WKImageAnalysisGestureRecognizer touchesBegan:withEvent:]):

Implement `-lastTouchedScrollView` on the image analysis gesture.

* Source/WebKit/UIProcess/ios/WKPasswordView.mm:

Rename `UIAlertControllerUtilities.h` -> `UIKitUtilities.h` (see above).

* Source/WebKit/UIProcess/ios/WKSyntheticTapGestureRecognizer.mm:
(-[WKSyntheticTapGestureRecognizer touchesBegan:withEvent:]):

Deduplicate some more code, using the new helper function in `UIKitUtilities.h`.

* Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDeciderIOS.mm:
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

Rename `UIAlertControllerUtilities.h` -> `UIKitUtilities.h` (see above).

* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:

Add a new script controller hook to return the number of times we triggered image analyzer requests.

* Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::currentImageAnalysisRequestID const):
* Tools/WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
* Tools/WebKitTestRunner/Configurations/WebKitTestRunnerLibrary.xcconfig:

Link against PAL, so that we can use extant soft-linking macros in `VisionKitCoreSoftLink.h`.

* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(swizzledProcessImageAnalysisRequest):

Swizzle out calls to `-processRequest:progressHandler:completionHandler:` to always return a
consistent result (error), and increment the global `gCurrentImageAnalysisRequestID` count returned
by the new script controller attribute.

(WTR::TestController::cocoaPlatformInitialize):
(WTR::TestController::currentImageAnalysisRequestID):
* Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
* Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
(WTR::UIScriptControllerCocoa::currentImageAnalysisRequestID const):

Canonical link: https://commits.webkit.org/265824@main
  • Loading branch information
whsieh committed Jul 6, 2023
1 parent 9ec2b57 commit 35ebce2
Show file tree
Hide file tree
Showing 26 changed files with 190 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Verifies that long pressing an image while stopping momentum scrolling does not trigger spurious image analysis requests. This test requires WebKitTestRunner.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS imageAnalysisRequestIDBefore is imageAnalysisRequestIDAfter
PASS successfullyParsed is true

TEST COMPLETE

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<script src="../../../../resources/js-test.js"></script>
<script src="../../../../resources/ui-helper.js"></script>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}

img {
width: 100%;
height: 100%;
-webkit-touch-callout: none;
}
</style>
<body onload="runTest()">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
<img src="../../resources/dice.png">
</body>
<script>
jsTestIsAsync = true;

async function runTest()
{
description("Verifies that long pressing an image while stopping momentum scrolling does not trigger spurious image analysis requests. This test requires WebKitTestRunner.");

if (!window.testRunner)
return;

await UIHelper.dragFromPointToPoint(160, 500, 160, 50, 0.2);
await UIHelper.ensureVisibleContentRectUpdate();
imageAnalysisRequestIDBefore = await UIHelper.currentImageAnalysisRequestID();

await UIHelper.longPressAtPoint(160, document.scrollingElement.scrollTop + 250);
imageAnalysisRequestIDAfter = await UIHelper.currentImageAnalysisRequestID();

shouldBe("imageAnalysisRequestIDBefore", "imageAnalysisRequestIDAfter");
finishJSTest();
}
</script>
</html>
10 changes: 10 additions & 0 deletions LayoutTests/resources/ui-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1876,6 +1876,16 @@ window.UIHelper = class UIHelper {
});
}

static currentImageAnalysisRequestID()
{
if (!this.isWebKit2())
return Promise.resolve(0);

return new Promise(resolve => {
testRunner.runUIScript("uiController.uiScriptComplete(uiController.currentImageAnalysisRequestID)", result => resolve(result));
});
}

static moveToNextByKeyboardAccessoryBar()
{
return new Promise((resolve) => {
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/SourcesCocoa.txt
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ UIProcess/ios/ProcessStateMonitor.mm
UIProcess/ios/RevealFocusedElementDeferrer.mm
UIProcess/ios/SmartMagnificationController.mm
UIProcess/ios/TextCheckerIOS.mm
UIProcess/ios/UIAlertControllerUtilities.mm
UIProcess/ios/UIKitUtilities.mm
UIProcess/ios/ViewGestureControllerIOS.mm
UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm
UIProcess/ios/WebPageProxyIOS.mm
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
#import "RemoteScrollingCoordinatorProxyIOS.h"
#import "ScrollingTreeScrollingNodeDelegateIOS.h"
#import "TapHandlingResult.h"
#import "UIAlertControllerUtilities.h"
#import "UIKitSPI.h"
#import "UIKitUtilities.h"
#import "VideoFullscreenManagerProxy.h"
#import "ViewGestureController.h"
#import "VisibleContentRectUpdateInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#import <wtf/spi/darwin/SandboxSPI.h>

#if PLATFORM(IOS_FAMILY)
#import "UIAlertControllerUtilities.h"
#import "UIKitUtilities.h"
#endif

#import "TCCSoftLink.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/Cocoa/WKStorageAccessAlert.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#import "WKStorageAccessAlert.h"

#if PLATFORM(IOS_FAMILY)
#import "UIAlertControllerUtilities.h"
#import "UIKitSPI.h"
#import "UIKitUtilities.h"
#endif

#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@
#import <wtf/RetainPtr.h>

OBJC_CLASS UIAlertController;
OBJC_CLASS UIScrollView;
OBJC_CLASS UITouch;

namespace WebKit {

RetainPtr<UIAlertController> createUIAlertController(NSString *title, NSString *message);
UIScrollView *scrollViewForTouches(NSSet<UITouch *> *);

} // namespace WebKit

#endif
#endif // PLATFORM(IOS_FAMILY)
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/

#import "config.h"
#import "UIAlertControllerUtilities.h"
#import "UIKitUtilities.h"

#if PLATFORM(IOS_FAMILY)

Expand All @@ -39,6 +39,15 @@
return alert;
}

UIScrollView *scrollViewForTouches(NSSet<UITouch *> *touches)
{
for (UITouch *touch in touches) {
if (auto scrollView = dynamic_objc_cast<UIScrollView>(touch.view))
return scrollView;
}
return nil;
}

} // namespace WebKit

#endif
#endif // PLATFORM(IOS_FAMILY)
3 changes: 3 additions & 0 deletions Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11234,6 +11234,9 @@ - (void)imageAnalysisGestureDidBegin:(WKImageAnalysisGestureRecognizer *)gesture
{
ASSERT(WebKit::isLiveTextAvailableAndEnabled());

if ([self _isPanningScrollViewOrAncestor:gestureRecognizer.lastTouchedScrollView])
return;

auto requestIdentifier = WebKit::ImageAnalysisRequestIdentifier::generate();

[_imageAnalyzer cancelAllRequests];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#if PLATFORM(IOS_FAMILY)

#import "UIKitUtilities.h"
#import <wtf/WeakObjCPtr.h>

@implementation WKHighlightLongPressGestureRecognizer {
Expand All @@ -45,12 +46,8 @@ - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];

for (UITouch *touch in touches) {
if ([touch.view isKindOfClass:UIScrollView.class]) {
_lastTouchedScrollView = (UIScrollView *)touch.view;
break;
}
}
if (auto scrollView = WebKit::scrollViewForTouches(touches))
_lastTouchedScrollView = scrollView;
}

- (UIScrollView *)lastTouchedScrollView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

- (instancetype)initWithImageAnalysisGestureDelegate:(UIView <WKImageAnalysisGestureRecognizerDelegate> *)delegate;

@property (nonatomic, readonly) UIScrollView *lastTouchedScrollView;

@end

#endif // PLATFORM(IOS_FAMILY) && ENABLE(IMAGE_ANALYSIS)
17 changes: 15 additions & 2 deletions Source/WebKit/UIProcess/ios/WKImageAnalysisGestureRecognizer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "config.h"
#include "WKImageAnalysisGestureRecognizer.h"
#import "config.h"
#import "WKImageAnalysisGestureRecognizer.h"

#if PLATFORM(IOS_FAMILY) && ENABLE(IMAGE_ANALYSIS)

#import "UIKitUtilities.h"

@implementation WKImageAnalysisGestureRecognizer {
__weak UIView <WKImageAnalysisGestureRecognizerDelegate> *_imageAnalysisGestureRecognizerDelegate;
__weak UIScrollView *_lastTouchedScrollView;
}

- (instancetype)initWithImageAnalysisGestureDelegate:(UIView <WKImageAnalysisGestureRecognizerDelegate> *)delegate
Expand All @@ -45,10 +48,20 @@ - (instancetype)initWithImageAnalysisGestureDelegate:(UIView <WKImageAnalysisGes
return self;
}

- (void)reset
{
[super reset];

_lastTouchedScrollView = nil;
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];

if (auto scrollView = WebKit::scrollViewForTouches(touches))
_lastTouchedScrollView = scrollView;

[self beginAfterExceedingForceThresholdIfNeeded:touches];
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/ios/WKPasswordView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

#if PLATFORM(IOS_FAMILY)

#import "UIAlertControllerUtilities.h"
#import "UIKitSPI.h"
#import "UIKitUtilities.h"
#import "WKContentView.h"
#import "WKWebViewContentProvider.h"
#import <WebCore/LocalizedStrings.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#if PLATFORM(IOS_FAMILY)

#import "UIKitUtilities.h"
#import <UIKit/UIGestureRecognizerSubclass.h>
#import <wtf/RetainPtr.h>

Expand Down Expand Up @@ -81,12 +82,8 @@ - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];

for (UITouch *touch in touches) {
if ([touch.view isKindOfClass:UIScrollView.class]) {
_lastTouchedScrollView = (UIScrollView *)touch.view;
break;
}
}
if (auto scrollView = WebKit::scrollViewForTouches(touches))
_lastTouchedScrollView = scrollView;
}

- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

#if PLATFORM(IOS_FAMILY)

#import "UIAlertControllerUtilities.h"
#import "UIKitSPI.h"
#import "UIKitUtilities.h"
#import "WKWebViewPrivateForTesting.h"
#import <CoreLocation/CoreLocation.h>
#import <WebCore/LocalizedStrings.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#import "FullscreenTouchSecheuristic.h"
#import "PlaybackSessionManagerProxy.h"
#import "UIAlertControllerUtilities.h"
#import "UIKitUtilities.h"
#import "VideoFullscreenManagerProxy.h"
#import "WKFullscreenStackView.h"
#import "WKWebViewIOS.h"
Expand Down
8 changes: 4 additions & 4 deletions Source/WebKit/WebKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4623,8 +4623,8 @@
41EB4D3A274CE04500A9272B /* ServiceWorkerNavigationPreloader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerNavigationPreloader.h; sourceTree = "<group>"; };
41EB4D3B274CE04500A9272B /* ServiceWorkerNavigationPreloader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerNavigationPreloader.cpp; sourceTree = "<group>"; };
41F060DD1654317500F3281C /* WebSocketChannelMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebSocketChannelMessageReceiver.cpp; sourceTree = "<group>"; };
41F2B52729DF569D004B6FB6 /* UIAlertControllerUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UIAlertControllerUtilities.h; path = ios/UIAlertControllerUtilities.h; sourceTree = "<group>"; };
41F2B52829DF569E004B6FB6 /* UIAlertControllerUtilities.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = UIAlertControllerUtilities.mm; path = ios/UIAlertControllerUtilities.mm; sourceTree = "<group>"; };
41F2B52729DF569D004B6FB6 /* UIKitUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UIKitUtilities.h; path = ios/UIKitUtilities.h; sourceTree = "<group>"; };
41F2B52829DF569E004B6FB6 /* UIKitUtilities.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = UIKitUtilities.mm; path = ios/UIKitUtilities.mm; sourceTree = "<group>"; };
41F898BB28EB195B0070549C /* RemoteVideoCodecFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteVideoCodecFactory.cpp; sourceTree = "<group>"; };
41F898BC28EB195C0070549C /* RemoteVideoCodecFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteVideoCodecFactory.h; sourceTree = "<group>"; };
41F9FD1823ED8A810099B579 /* LibWebRTCResolverIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibWebRTCResolverIdentifier.h; path = Network/webrtc/LibWebRTCResolverIdentifier.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -9622,8 +9622,8 @@
2DAF06D818BD23BA0081CEB1 /* SmartMagnificationController.messages.in */,
2DAF06D518BD1A470081CEB1 /* SmartMagnificationController.mm */,
2DA944A91884E9BA00ED86DB /* TextCheckerIOS.mm */,
41F2B52729DF569D004B6FB6 /* UIAlertControllerUtilities.h */,
41F2B52829DF569E004B6FB6 /* UIAlertControllerUtilities.mm */,
41F2B52729DF569D004B6FB6 /* UIKitUtilities.h */,
41F2B52829DF569E004B6FB6 /* UIKitUtilities.mm */,
2DF9593418A42412009785A1 /* ViewGestureControllerIOS.mm */,
E5BEF6802130C47F00F31111 /* WebDataListSuggestionsDropdownIOS.h */,
E5BEF6812130C47F00F31111 /* WebDataListSuggestionsDropdownIOS.mm */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,6 @@ interface UIScriptController {
readonly attribute DOMString firstRedoLabel;

readonly attribute unsigned long countOfUpdatesWithLayerChanges;

readonly attribute unsigned long long currentImageAnalysisRequestID;
};
4 changes: 4 additions & 0 deletions Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ class UIScriptController : public JSWrappable {
virtual void setDidEndScrollingCallback(JSValueRef);
JSValueRef didEndScrollingCallback() const;

// Image Analysis

virtual uint64_t currentImageAnalysisRequestID() const { return 0; }

protected:
explicit UIScriptController(UIScriptContext&);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.webkit.$(PRODUCT_NAME:rfc1034identifier);

GCC_ENABLE_OBJC_EXCEPTIONS = YES;

OTHER_LDFLAGS = $(inherited) -lWebKitTestRunner -lWebCoreTestSupport -framework JavaScriptCore -framework CoreGraphics -framework QuartzCore -framework ImageIO -framework IOKit -framework UIKit -framework WebKit -framework Foundation -framework GraphicsServices;
OTHER_LDFLAGS = $(inherited) -lWebKitTestRunner -lPAL -lWebCoreTestSupport -framework JavaScriptCore -framework CoreGraphics -framework QuartzCore -framework ImageIO -framework IOKit -framework UIKit -framework WebKit -framework Foundation -framework GraphicsServices;
OTHER_LDFLAGS[sdk=watch*] = $(OTHER_LDFLAGS) -framework PepperUICore

STRIP_STYLE = debugging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@
PRODUCT_NAME = WebKitTestRunner;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
SKIP_INSTALL = YES;

OTHER_LDFLAGS = $(inherited) -lPAL
7 changes: 7 additions & 0 deletions Tools/WebKitTestRunner/TestController.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,10 @@ class TestController {

void receivedServiceWorkerConsoleMessage(const String&);

#if ENABLE(IMAGE_ANALYSIS)
static uint64_t currentImageAnalysisRequestID();
#endif

private:
WKRetainPtr<WKPageConfigurationRef> generatePageConfiguration(const TestOptions&);
WKRetainPtr<WKContextConfigurationRef> generateContextConfiguration(const TestOptions&) const;
Expand Down Expand Up @@ -604,6 +608,9 @@ class TestController {
std::unique_ptr<ClassMethodSwizzler> m_calendarSwizzler;
std::pair<RetainPtr<NSString>, RetainPtr<NSString>> m_overriddenCalendarAndLocaleIdentifiers;
#endif // PLATFORM(COCOA)
#if ENABLE(IMAGE_ANALYSIS)
std::unique_ptr<InstanceMethodSwizzler> m_imageAnalysisRequestSwizzler;
#endif
bool m_verbose { false };
bool m_printSeparators { false };
bool m_usingServerMode { false };
Expand Down
Loading

0 comments on commit 35ebce2

Please sign in to comment.