REGRESSION: fast/events/watchos/double-tap-to-zoom* tests crashing in com.apple.WebKi...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jul 2019 02:46:09 +0000 (02:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jul 2019 02:46:09 +0000 (02:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199840
<rdar://problem/52856531>

Patch by Antoine Quint <graouts@apple.com> on 2019-07-16
Reviewed by Wenson Hsieh.

Source/WebCore:

Fix a build error that occured when building for the watchOS Simulator in the debug configuration.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):

Source/WebKit:

We need to ensure the NSNumber used for -[WKSyntheticTapGestureRecognizer lastActiveTouchIdentifier] is retained. This innocent change required
the use of RetainPtr<>, which required the move to an Objective-C++ file, which lead to a change in the order files are unified, which lead to
build errors, which leads to a much bigger patch than just the source change necessary to fix the crash.

* SourcesCocoa.txt:
* UIProcess/ios/WKSyntheticTapGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKSyntheticTapGestureRecognizer.m.
* UIProcess/ios/forms/WKFormPeripheralBase.h:
* UIProcess/ios/forms/WKFormPeripheralBase.mm:
* WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/ChangeLog
Source/WebKit/SourcesCocoa.txt
Source/WebKit/UIProcess/ios/WKSyntheticTapGestureRecognizer.mm [moved from Source/WebKit/UIProcess/ios/WKSyntheticTapGestureRecognizer.m with 95% similarity]
Source/WebKit/UIProcess/ios/forms/WKFormPeripheralBase.h
Source/WebKit/UIProcess/ios/forms/WKFormPeripheralBase.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index c6f7e34..d3f36dd 100644 (file)
@@ -1,3 +1,16 @@
+2019-07-16  Antoine Quint  <graouts@apple.com>
+
+        REGRESSION: fast/events/watchos/double-tap-to-zoom* tests crashing in com.apple.WebKit: -[WKContentView(WKInteraction) _singleTapDidReset:]
+        https://bugs.webkit.org/show_bug.cgi?id=199840
+        <rdar://problem/52856531>
+
+        Reviewed by Wenson Hsieh.
+
+        Fix a build error that occured when building for the watchOS Simulator in the debug configuration.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):
+
 2019-07-16  Justin Fan  <justin_fan@apple.com>
 
         [WebGPU] Convert GPUComputePipeline LOG statements to generate GPUErrors
index a1130da..cad39e2 100644 (file)
@@ -4525,7 +4525,7 @@ ScrollingNodeID RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole(
             ASSERT(entry.clipData.clippingLayer);
             ASSERT(entry.clipData.clippingLayer->isComposited());
 
-            auto overflowScrollNodeID = 0;
+            ScrollingNodeID overflowScrollNodeID = 0;
             if (auto* backing = entry.clipData.clippingLayer->backing())
                 overflowScrollNodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling);
 
index 09120d5..537dedc 100644 (file)
@@ -1,3 +1,21 @@
+2019-07-16  Antoine Quint  <graouts@apple.com>
+
+        REGRESSION: fast/events/watchos/double-tap-to-zoom* tests crashing in com.apple.WebKit: -[WKContentView(WKInteraction) _singleTapDidReset:]
+        https://bugs.webkit.org/show_bug.cgi?id=199840
+        <rdar://problem/52856531>
+
+        Reviewed by Wenson Hsieh.
+
+        We need to ensure the NSNumber used for -[WKSyntheticTapGestureRecognizer lastActiveTouchIdentifier] is retained. This innocent change required
+        the use of RetainPtr<>, which required the move to an Objective-C++ file, which lead to a change in the order files are unified, which lead to
+        build errors, which leads to a much bigger patch than just the source change necessary to fix the crash.
+
+        * SourcesCocoa.txt:
+        * UIProcess/ios/WKSyntheticTapGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKSyntheticTapGestureRecognizer.m.
+        * UIProcess/ios/forms/WKFormPeripheralBase.h:
+        * UIProcess/ios/forms/WKFormPeripheralBase.mm:
+        * WebKit.xcodeproj/project.pbxproj:
+
 2019-07-16  Brent Fulgham  <bfulgham@apple.com>
 
         Update WebContent Process sandbox based on user seed data
index 7628a26..02cf65c 100644 (file)
@@ -428,7 +428,7 @@ UIProcess/ios/WKPDFPageNumberIndicator.mm
 UIProcess/ios/WKPDFView.mm
 UIProcess/ios/WKScrollView.mm
 UIProcess/ios/WKSyntheticFlagsChangedWebEvent.mm
-UIProcess/ios/WKSyntheticTapGestureRecognizer.m
+UIProcess/ios/WKSyntheticTapGestureRecognizer.mm
 UIProcess/ios/WKSystemPreviewView.mm
 UIProcess/ios/WKTouchActionGestureRecognizer.m
 UIProcess/ios/WKWebEvent.mm
@@ -29,6 +29,7 @@
 #if PLATFORM(IOS_FAMILY)
 
 #import <UIKit/UIGestureRecognizerSubclass.h>
+#import <wtf/RetainPtr.h>
 
 @implementation WKSyntheticTapGestureRecognizer {
     id _gestureIdentifiedTarget;
@@ -37,6 +38,7 @@
     SEL _gestureFailedAction;
     id _resetTarget;
     SEL _resetAction;
+    RetainPtr<NSNumber> _lastActiveTouchIdentifier;
 }
 
 - (void)setGestureIdentifiedTarget:(id)target action:(SEL)action
 #endif
 }
 
+- (NSNumber*)lastActiveTouchIdentifier
+{
+    return _lastActiveTouchIdentifier.get();
+}
+
 @end
 
 #endif
index f840776..4686073 100644 (file)
@@ -27,6 +27,7 @@
 
 #import "WKFormPeripheral.h"
 #import <wtf/Forward.h>
+#import <wtf/RetainPtr.h>
 
 @class WKContentView;
 
index 841527b..bf334d0 100644 (file)
@@ -28,9 +28,9 @@
 
 #if PLATFORM(IOS_FAMILY)
 
-#import "WKContentView.h"
+#import "UIKitSPI.h"
+#import "WKContentViewInteraction.h"
 #import <pal/spi/cocoa/IOKitSPI.h>
-#import <wtf/RetainPtr.h>
 
 @implementation WKFormPeripheralBase {
     RetainPtr<NSObject <WKFormControl>> _control;
index 00e9e46..0a2b192 100644 (file)
                2684055218B86ED60022C38B /* ViewUpdateDispatcherMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2684055018B86ED60022C38B /* ViewUpdateDispatcherMessageReceiver.cpp */; };
                2684055318B86ED60022C38B /* ViewUpdateDispatcherMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2684055118B86ED60022C38B /* ViewUpdateDispatcherMessages.h */; };
                26F10BE819187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 26F10BE619187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.h */; };
-               26F10BE919187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 26F10BE719187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.m */; };
                26F9A83B18A3468100AEB88A /* WKWebViewPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 26F9A83A18A3463F00AEB88A /* WKWebViewPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4BEEAA120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp */; };
                2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC33E0D012408E8600360F3F /* InjectedBundleRangeHandle.cpp */; };
                2684055018B86ED60022C38B /* ViewUpdateDispatcherMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewUpdateDispatcherMessageReceiver.cpp; path = DerivedSources/WebKit2/ViewUpdateDispatcherMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
                2684055118B86ED60022C38B /* ViewUpdateDispatcherMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewUpdateDispatcherMessages.h; path = DerivedSources/WebKit2/ViewUpdateDispatcherMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
                26F10BE619187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKSyntheticTapGestureRecognizer.h; path = ios/WKSyntheticTapGestureRecognizer.h; sourceTree = "<group>"; };
-               26F10BE719187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WKSyntheticTapGestureRecognizer.m; path = ios/WKSyntheticTapGestureRecognizer.m; sourceTree = "<group>"; };
+               26F10BE719187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKSyntheticTapGestureRecognizer.mm; path = ios/WKSyntheticTapGestureRecognizer.mm; sourceTree = "<group>"; };
                26F9A83A18A3463F00AEB88A /* WKWebViewPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKWebViewPrivate.h; sourceTree = "<group>"; };
                290F4271172A0C7400939FF0 /* AuxiliaryProcessSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuxiliaryProcessSupplement.h; sourceTree = "<group>"; };
                29232DF118B29D1100D0596F /* WKAccessibilityWebPageObjectMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObjectMac.mm; sourceTree = "<group>"; };
                                CE5B4C8621B73D870022E64F /* WKSyntheticFlagsChangedWebEvent.h */,
                                CE5B4C8721B73D870022E64F /* WKSyntheticFlagsChangedWebEvent.mm */,
                                26F10BE619187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.h */,
-                               26F10BE719187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.m */,
+                               26F10BE719187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.mm */,
                                316B8B622054B55800BD4A62 /* WKSystemPreviewView.h */,
                                316B8B612054B55800BD4A62 /* WKSystemPreviewView.mm */,
                                71A676A422C62318007D6295 /* WKTouchActionGestureRecognizer.h */,
                                5CA26D83217AD1B800F97A35 /* WKSafeBrowsingWarning.mm in Sources */,
                                1DB01944211CF005009FB3E8 /* WKShareSheet.mm in Sources */,
                                7A78FF332241919B0096483E /* WKStorageAccessAlert.mm in Sources */,
-                               26F10BE919187E2E001D0E68 /* WKSyntheticTapGestureRecognizer.m in Sources */,
                                71A676A722C6232F007D6295 /* WKTouchActionGestureRecognizer.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;