Changeset 221415 in webkit
- Timestamp:
- Aug 30, 2017 9:07:34 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r221412 r221415 1 2017-08-30 Dan Bernstein <mitz@apple.com> 2 3 [iOS] REGRESSION (r218144) -[WKContentView targetForAction:withSender:] returns the content view for actions implemented only by the WKWebView, causing a crash 4 https://bugs.webkit.org/show_bug.cgi?id=176077 5 <rdar://problem/34145200> 6 7 Reviewed by Sam Weinig. 8 9 Test: TestWebKitAPI/Tests/WebKitCocoa/WKContentViewTargetForAction.mm 10 11 * UIProcess/API/Cocoa/WKWebView.mm: 12 (-[WKWebView targetForAction:withSender:]): Override and forward WKContentView actions to 13 -[WKContentView targetForActionForWebView:withSender:]. 14 * UIProcess/ios/WKContentViewInteraction.h: Declare -targetForActionForWebView:withSender:. 15 * UIProcess/ios/WKContentViewInteraction.mm: 16 (-[WKContentView targetForAction:withSender:]): Forward to the WKWebView. 17 (-[WKContentView targetForActionForWebView:withSender:]): Call super’s 18 -targetForAction:withSender:. 19 1 20 2017-08-30 Brent Fulgham <bfulgham@apple.com> 2 21 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r221233 r221415 1252 1252 1253 1253 return [super canPerformAction:action withSender:sender]; 1254 } 1255 1256 - (id)targetForAction:(SEL)action withSender:(id)sender 1257 { 1258 #define FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW(_action) \ 1259 if (action == @selector(_action:) && self.usesStandardContentView) \ 1260 return [_contentView targetForActionForWebView:action withSender:sender]; 1261 1262 FOR_EACH_WKCONTENTVIEW_ACTION(FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW) 1263 1264 #undef FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW 1265 1266 return [super targetForAction:action withSender:sender]; 1254 1267 } 1255 1268 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r221233 r221415 289 289 - (BOOL)resignFirstResponderForWebView; 290 290 - (BOOL)canPerformActionForWebView:(SEL)action withSender:(id)sender; 291 - (id)targetForActionForWebView:(SEL)action withSender:(id)sender; 291 292 292 293 #define DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW(_action) \ -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r221233 r221415 2164 2164 2165 2165 return [super canPerformAction:action withSender:sender]; 2166 } 2167 2168 - (id)targetForAction:(SEL)action withSender:(id)sender 2169 { 2170 return [_webView targetForAction:action withSender:sender]; 2171 } 2172 2173 - (id)targetForActionForWebView:(SEL)action withSender:(id)sender 2174 { 2175 return [super targetForAction:action withSender:sender]; 2166 2176 } 2167 2177 -
trunk/Tools/ChangeLog
r221413 r221415 1 2017-08-30 Dan Bernstein <mitz@apple.com> 2 3 [iOS] REGRESSION (r218144) -[WKContentView targetForAction:withSender:] returns the content view for actions implemented only by the WKWebView, causing a crash 4 https://bugs.webkit.org/show_bug.cgi?id=176077 5 <rdar://problem/34145200> 6 7 Reviewed by Sam Weinig. 8 9 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 10 * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewTargetForAction.mm: Added. 11 (-[TestWKContentViewTargetForActionView testAction:]): 12 (TEST): 13 * TestWebKitAPI/ios/UIKitSPI.h: 14 1 15 2017-08-30 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 16 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r221233 r221415 115 115 33DC89141419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */; }; 116 116 33E79E06137B5FD900E32D99 /* mouse-move-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */; }; 117 370CE22A1F57343400E7410B /* WKContentViewTargetForAction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 370CE2291F57343400E7410B /* WKContentViewTargetForAction.mm */; }; 117 118 374B7A601DF36EEE00ACCB6C /* BundleEditingDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 374B7A5E1DF36EEE00ACCB6C /* BundleEditingDelegate.mm */; }; 118 119 374B7A611DF371CF00ACCB6C /* BundleEditingDelegatePlugIn.mm in Sources */ = {isa = PBXBuildFile; fileRef = 374B7A5F1DF36EEE00ACCB6C /* BundleEditingDelegatePlugIn.mm */; }; … … 1145 1146 33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadCanceledNoServerRedirectCallback_Bundle.cpp; sourceTree = "<group>"; }; 1146 1147 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "mouse-move-listener.html"; sourceTree = "<group>"; }; 1148 370CE2291F57343400E7410B /* WKContentViewTargetForAction.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContentViewTargetForAction.mm; sourceTree = "<group>"; }; 1147 1149 3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderedImageFromDOMRange.mm; sourceTree = "<group>"; }; 1148 1150 374B7A5E1DF36EEE00ACCB6C /* BundleEditingDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BundleEditingDelegate.mm; sourceTree = "<group>"; }; … … 1972 1974 5CE354D81E70D9C300BEFE3B /* WKContentExtensionStore.mm */, 1973 1975 2D838B1E1EEF3A5B009B980E /* WKContentViewEditingActions.mm */, 1976 370CE2291F57343400E7410B /* WKContentViewTargetForAction.mm */, 1974 1977 51D124971E763AF8002B2820 /* WKHTTPCookieStore.mm */, 1975 1978 375E0E151D66674400EFEC2C /* WKNSNumber.mm */, … … 2611 2614 C08587F913FEC39B001EF4E5 /* TestWebKitAPI */, 2612 2615 440A1D3614A01000008A66F2 /* WebCore */, 2613 CDC8E4981BC728AE00594FEC /* WebKitLegacy */,2614 2616 BC9096411255616000083756 /* WebKit */, 2615 2617 1ABC3DEC1899BE55004F0626 /* WebKit Cocoa */, 2616 2618 BC3C4C6F14575B1D0025FB62 /* WebKit Objective-C */, 2619 CDC8E4981BC728AE00594FEC /* WebKitLegacy */, 2617 2620 BC9096461255618900083756 /* WTF */, 2618 2621 ); … … 3376 3379 5CE354D91E70DA5C00BEFE3B /* WKContentExtensionStore.mm in Sources */, 3377 3380 2D838B1F1EEF3A5C009B980E /* WKContentViewEditingActions.mm in Sources */, 3381 370CE22A1F57343400E7410B /* WKContentViewTargetForAction.mm in Sources */, 3378 3382 51D124981E763B02002B2820 /* WKHTTPCookieStore.mm in Sources */, 3379 3383 7CCE7F1D1A411AE600447C4C /* WKImageCreateCGImageCrash.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.