Changeset 211226 in webkit
- Timestamp:
- Jan 26, 2017 12:41:13 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r211225 r211226 1 2017-01-26 Matt Rajca <mrajca@apple.com> 2 3 Notify clients when the user plays media otherwise prevented from autoplaying 4 https://bugs.webkit.org/show_bug.cgi?id=167390 5 6 Reviewed by Alex Christensen. 7 8 The API is tested. 9 10 * html/HTMLMediaElement.cpp: 11 (WebCore::HTMLMediaElement::playInternal): 12 * page/ChromeClient.h: 13 1 14 2017-01-26 Enrique Ocaña González <eocanha@igalia.com> 2 15 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r211200 r211226 3168 3168 3169 3169 if (ScriptController::processingUserGestureForMedia() && m_preventedFromPlayingWithoutUserGesture) { 3170 // FIXME: notify clients a user gesture was made and started playback of an element that was otherwise prevented from playing. 3170 if (Page* page = document().page()) 3171 page->chrome().client().didPlayMediaPreventedFromPlayingWithoutUserGesture(); 3171 3172 m_preventedFromPlayingWithoutUserGesture = false; 3172 3173 } -
trunk/Source/WebCore/page/ChromeClient.h
r211200 r211226 421 421 422 422 virtual void isPlayingMediaDidChange(MediaProducer::MediaStateFlags, uint64_t) { } 423 virtual void didPlayMediaPreventedFromPlayingWithoutUserGesture() { } 423 424 424 425 #if ENABLE(MEDIA_SESSION) -
trunk/Source/WebKit2/ChangeLog
r211223 r211226 1 2017-01-26 Matt Rajca <mrajca@apple.com> 2 3 Notify clients when the user plays media otherwise prevented from autoplaying 4 https://bugs.webkit.org/show_bug.cgi?id=167390 5 6 Reviewed by Alex Christensen. 7 8 * UIProcess/API/APIUIClient.h: 9 (API::UIClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): 10 * UIProcess/API/C/WKPage.cpp: 11 (WKPageSetPageUIClient): 12 * UIProcess/API/C/WKPageUIClient.h: 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture): 15 * UIProcess/WebPageProxy.h: 16 * UIProcess/WebPageProxy.messages.in: 17 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 18 (WebKit::WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture): 19 * WebProcess/WebCoreSupport/WebChromeClient.h: 20 1 21 2017-01-26 Anders Carlsson <andersca@apple.com> 2 22 -
trunk/Source/WebKit2/UIProcess/API/APIUIClient.h
r211200 r211226 153 153 virtual void didBeginCaptureSession() { } 154 154 virtual void didEndCaptureSession() { } 155 virtual void didPlayMediaPreventedFromPlayingWithoutUserGesture(WebKit::WebPageProxy&) { } 155 156 156 157 #if ENABLE(MEDIA_SESSION) -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r211221 r211226 111 111 112 112 template<> struct ClientTraits<WKPageUIClientBase> { 113 typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3, WKPageUIClientV4, WKPageUIClientV5, WKPageUIClientV6, WKPageUIClientV7, WKPageUIClientV8 > Versions;113 typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3, WKPageUIClientV4, WKPageUIClientV5, WKPageUIClientV6, WKPageUIClientV7, WKPageUIClientV8, WKPageUIClientV9> Versions; 114 114 }; 115 115 … … 2242 2242 } 2243 2243 #endif 2244 2245 void didPlayMediaPreventedFromPlayingWithoutUserGesture(WebPageProxy& page) override 2246 { 2247 if (!m_client.didPlayMediaPreventedFromPlayingWithoutUserGesture) 2248 return; 2249 2250 m_client.didPlayMediaPreventedFromPlayingWithoutUserGesture(toAPI(&page), m_client.base.clientInfo); 2251 } 2244 2252 }; 2245 2253 -
trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h
r211200 r211226 103 103 typedef void (*WKPageDidClickAutoFillButtonCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo); 104 104 typedef void (*WKPageMediaSessionMetadataDidChangeCallback)(WKPageRef page, WKMediaSessionMetadataRef metadata, const void* clientInfo); 105 typedef void (*WKDidPlayMediaPreventedFromPlayingWithoutUserGesture)(WKPageRef page, const void* clientInfo); 105 106 typedef void (*WKFullscreenMayReturnToInlineCallback)(WKPageRef page, const void* clientInfo); 106 107 … … 727 728 WKDidLosePointerLockCallback didLosePointerLock; 728 729 } WKPageUIClientV8; 730 731 typedef struct WKPageUIClientV9 { 732 WKPageUIClientBase base; 733 734 // Version 0. 735 WKPageCreateNewPageCallback_deprecatedForUseWithV0 createNewPage_deprecatedForUseWithV0; 736 WKPageUIClientCallback showPage; 737 WKPageUIClientCallback close; 738 WKPageTakeFocusCallback takeFocus; 739 WKPageFocusCallback focus; 740 WKPageUnfocusCallback unfocus; 741 WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0; 742 WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0; 743 WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0; 744 WKPageSetStatusTextCallback setStatusText; 745 WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0; 746 WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0; 747 WKPageDidNotHandleKeyEventCallback didNotHandleKeyEvent; 748 WKPageDidNotHandleWheelEventCallback didNotHandleWheelEvent; 749 WKPageGetToolbarsAreVisibleCallback toolbarsAreVisible; 750 WKPageSetToolbarsAreVisibleCallback setToolbarsAreVisible; 751 WKPageGetMenuBarIsVisibleCallback menuBarIsVisible; 752 WKPageSetMenuBarIsVisibleCallback setMenuBarIsVisible; 753 WKPageGetStatusBarIsVisibleCallback statusBarIsVisible; 754 WKPageSetStatusBarIsVisibleCallback setStatusBarIsVisible; 755 WKPageGetIsResizableCallback isResizable; 756 WKPageSetIsResizableCallback setIsResizable; 757 WKPageGetWindowFrameCallback getWindowFrame; 758 WKPageSetWindowFrameCallback setWindowFrame; 759 WKPageRunBeforeUnloadConfirmPanelCallback_deprecatedForUseWithV6 runBeforeUnloadConfirmPanel_deprecatedForUseWithV6; 760 WKPageUIClientCallback didDraw; 761 WKPageUIClientCallback pageDidScroll; 762 WKPageExceededDatabaseQuotaCallback exceededDatabaseQuota; 763 WKPageRunOpenPanelCallback runOpenPanel; 764 WKPageDecidePolicyForGeolocationPermissionRequestCallback decidePolicyForGeolocationPermissionRequest; 765 WKPageHeaderHeightCallback headerHeight; 766 WKPageFooterHeightCallback footerHeight; 767 WKPageDrawHeaderCallback drawHeader; 768 WKPageDrawFooterCallback drawFooter; 769 WKPagePrintFrameCallback printFrame; 770 WKPageUIClientCallback runModal; 771 void* unused1; // Used to be didCompleteRubberBandForMainFrame 772 WKPageSaveDataToFileInDownloadsFolderCallback saveDataToFileInDownloadsFolder; 773 void* shouldInterruptJavaScript_unavailable; 774 775 // Version 1. 776 WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage_deprecatedForUseWithV1; 777 WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement; 778 WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest; 779 WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1; 780 781 // Version 2. 782 WKPageShowColorPickerCallback showColorPicker; 783 WKPageHideColorPickerCallback hideColorPicker; 784 WKPageUnavailablePluginButtonClickedCallback unavailablePluginButtonClicked; 785 786 // Version 3. 787 WKPagePinnedStateDidChangeCallback pinnedStateDidChange; 788 789 // Version 4. 790 void* unused2; // Used to be didBeginTrackingPotentialLongMousePress. 791 void* unused3; // Used to be didRecognizeLongMousePress. 792 void* unused4; // Used to be didCancelTrackingPotentialLongMousePress. 793 WKPageIsPlayingAudioDidChangeCallback isPlayingAudioDidChange; 794 795 // Version 5. 796 WKPageDecidePolicyForUserMediaPermissionRequestCallback decidePolicyForUserMediaPermissionRequest; 797 WKPageDidClickAutoFillButtonCallback didClickAutoFillButton; 798 WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV5 runJavaScriptAlert_deprecatedForUseWithV5; 799 WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV5 runJavaScriptConfirm_deprecatedForUseWithV5; 800 WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV5 runJavaScriptPrompt_deprecatedForUseWithV5; 801 WKPageMediaSessionMetadataDidChangeCallback mediaSessionMetadataDidChange; 802 803 // Version 6. 804 WKPageCreateNewPageCallback createNewPage; 805 WKPageRunJavaScriptAlertCallback runJavaScriptAlert; 806 WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm; 807 WKPageRunJavaScriptPromptCallback runJavaScriptPrompt; 808 WKCheckUserMediaPermissionCallback checkUserMediaPermissionForOrigin; 809 810 // Version 7. 811 WKPageRunBeforeUnloadConfirmPanelCallback runBeforeUnloadConfirmPanel; 812 WKFullscreenMayReturnToInlineCallback fullscreenMayReturnToInline; 813 814 // Version 8. 815 WKRequestPointerLockCallback requestPointerLock; 816 WKDidLosePointerLockCallback didLosePointerLock; 817 818 // Version 9. 819 WKDidPlayMediaPreventedFromPlayingWithoutUserGesture didPlayMediaPreventedFromPlayingWithoutUserGesture; 820 } WKPageUIClientV9; 729 821 730 822 #ifdef __cplusplus -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r211221 r211226 6533 6533 #endif 6534 6534 6535 void WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture() 6536 { 6537 m_uiClient->didPlayMediaPreventedFromPlayingWithoutUserGesture(*this); 6538 } 6539 6535 6540 #if PLATFORM(MAC) 6536 6541 void WebPageProxy::removeNavigationGestureSnapshot() -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r211221 r211226 1065 1065 bool hasActiveVideoStream() const { return m_mediaState & WebCore::MediaProducer::HasActiveVideoCaptureDevice; } 1066 1066 WebCore::MediaProducer::MediaStateFlags mediaStateFlags() const { return m_mediaState; } 1067 void didPlayMediaPreventedFromPlayingWithoutUserGesture(); 1067 1068 1068 1069 #if PLATFORM(MAC) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r211200 r211226 444 444 445 445 IsPlayingMediaDidChange(unsigned state, uint64_t sourceElementID) 446 DidPlayMediaPreventedFromPlayingWithoutUserGesture() 446 447 447 448 #if ENABLE(MEDIA_SESSION) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r211200 r211226 1085 1085 } 1086 1086 1087 void WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture() 1088 { 1089 m_page.send(Messages::WebPageProxy::DidPlayMediaPreventedFromPlayingWithoutUserGesture()); 1090 } 1091 1087 1092 #if ENABLE(MEDIA_SESSION) 1088 1093 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r211200 r211226 298 298 299 299 void isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags, uint64_t) final; 300 void didPlayMediaPreventedFromPlayingWithoutUserGesture() final; 300 301 301 302 #if ENABLE(MEDIA_SESSION) -
trunk/Tools/ChangeLog
r211207 r211226 1 2017-01-26 Matt Rajca <mrajca@apple.com> 2 3 Notify clients when the user plays media otherwise prevented from autoplaying 4 https://bugs.webkit.org/show_bug.cgi?id=167390 5 6 Reviewed by Alex Christensen. 7 8 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 9 * TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html: Added. 10 * TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html: Added. 11 * TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm: 12 (didPlayMediaPreventedFromPlayingWithoutUserGesture): 13 (TEST): 14 * TestWebKitAPI/cocoa/TestWKWebView.h: 15 * TestWebKitAPI/cocoa/TestWKWebView.mm: 16 (-[TestWKWebViewHostWindow _mouseUpAtPoint:]): 17 (-[TestWKWebView waitForLoad]): 18 (-[TestWKWebView mouseUpAtPoint:]): 19 * WebKitTestRunner/TestController.cpp: 20 (WTR::TestController::createOtherPage): 21 (WTR::TestController::createWebViewWithOptions): 22 1 23 2017-01-26 Per Arne Vollan <pvollan@apple.com> 2 24 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r211200 r211226 510 510 C95984F51E36BC6B002C0D45 /* autoplay-no-audio-check.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */; }; 511 511 C95984F71E36BCEF002C0D45 /* test-without-audio-track.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F61E36BCD7002C0D45 /* test-without-audio-track.mp4 */; }; 512 C99B675C1E39721A00FC6C80 /* autoplay-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */; }; 513 C99B675D1E39722000FC6C80 /* js-play-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */; }; 514 C99B675F1E39736F00FC6C80 /* no-autoplay-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */; }; 512 515 CD59F53419E9110D00CF1835 /* file-with-mse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD59F53219E910AA00CF1835 /* file-with-mse.html */; }; 513 516 CD59F53519E9110D00CF1835 /* test-mse.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD59F53319E910BC00CF1835 /* test-mse.mp4 */; }; … … 608 611 dstSubfolderSpec = 7; 609 612 files = ( 613 C99B675F1E39736F00FC6C80 /* no-autoplay-with-controls.html in Copy Resources */, 614 C99B675D1E39722000FC6C80 /* js-play-with-controls.html in Copy Resources */, 615 C99B675C1E39721A00FC6C80 /* autoplay-with-controls.html in Copy Resources */, 610 616 C95984F71E36BCEF002C0D45 /* test-without-audio-track.mp4 in Copy Resources */, 611 617 C95984F41E36BC6B002C0D45 /* autoplay-check.html in Copy Resources */, … … 1275 1281 C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "autoplay-no-audio-check.html"; sourceTree = "<group>"; }; 1276 1282 C95984F61E36BCD7002C0D45 /* test-without-audio-track.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-without-audio-track.mp4"; sourceTree = "<group>"; }; 1283 C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "autoplay-with-controls.html"; sourceTree = "<group>"; }; 1284 C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "js-play-with-controls.html"; sourceTree = "<group>"; }; 1285 C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "no-autoplay-with-controls.html"; sourceTree = "<group>"; }; 1277 1286 CD225C071C45A69200140761 /* ParsedContentRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentRange.cpp; sourceTree = "<group>"; }; 1278 1287 CD5393C71757BA9700C07123 /* MD5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MD5.cpp; sourceTree = "<group>"; }; … … 1962 1971 C95984F21E36BC55002C0D45 /* autoplay-check.html */, 1963 1972 C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */, 1973 C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */, 1964 1974 7C486BA01AA1254B003F6F9B /* bundle-file.html */, 1965 1975 9BD4239B1E04BFD000200395 /* chinese-character-with-image.html */, … … 1982 1992 BCBD372E125ABBE600D2C29F /* icon.png */, 1983 1993 CE3524F51B142BBB0028A7C5 /* input-focus-blur.html */, 1994 C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */, 1984 1995 8349D3C31DB9724F004A9F65 /* link-with-download-attribute.html */, 1985 1996 378E647816326FDF00B6C676 /* link-with-title.html */, … … 1992 2003 7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */, 1993 2004 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */, 2005 C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */, 1994 2006 CEA6CF2719CCF69D0064F5A7 /* open-and-close-window.html */, 1995 2007 F6FDDDD514241C48004F1729 /* push-state.html */, -
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm
r211200 r211226 40 40 #if WK_API_ENABLED 41 41 42 @interface WKWebView () 43 - (WKPageRef)_pageForTesting; 44 @end 45 42 46 static bool doneCompiling; 43 47 static bool receivedAlert; … … 214 218 } 215 219 216 #endif 220 #if PLATFORM(MAC) 221 static void didPlayMediaPreventedFromPlayingWithoutUserGesture(WKPageRef page, const void* clientInfo) 222 { 223 receivedAlert = true; 224 } 225 226 TEST(WebKit2, WebsitePoliciesPlayAfterPreventedAutoplay) 227 { 228 auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); 229 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 336, 276) configuration:configuration.get()]); 230 231 auto delegate = adoptNS([[AutoplayPoliciesDelegate alloc] init]); 232 [delegate setAutoplayPolicy:_WKWebsiteAutoplayPolicyDeny]; 233 [webView setNavigationDelegate:delegate.get()]; 234 235 WKPageUIClientV9 uiClient; 236 memset(&uiClient, 0, sizeof(uiClient)); 237 238 uiClient.base.version = 8; 239 uiClient.didPlayMediaPreventedFromPlayingWithoutUserGesture = didPlayMediaPreventedFromPlayingWithoutUserGesture; 240 241 WKPageSetPageUIClient([webView _pageForTesting], &uiClient.base); 242 NSPoint playButtonClickPoint = NSMakePoint(20, 256); 243 244 receivedAlert = false; 245 NSURLRequest *jsPlayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"js-play-with-controls" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; 246 [webView loadRequest:jsPlayRequest]; 247 [webView waitForMessage:@"loaded"]; 248 [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO]; 249 [webView mouseUpAtPoint:playButtonClickPoint]; 250 TestWebKitAPI::Util::run(&receivedAlert); 251 252 receivedAlert = false; 253 [webView loadHTMLString:@"" baseURL:nil]; 254 255 NSURLRequest *autoplayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"autoplay-with-controls" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; 256 [webView loadRequest:autoplayRequest]; 257 [webView waitForMessage:@"loaded"]; 258 [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO]; 259 [webView mouseUpAtPoint:playButtonClickPoint]; 260 TestWebKitAPI::Util::run(&receivedAlert); 261 262 receivedAlert = false; 263 [webView loadHTMLString:@"" baseURL:nil]; 264 265 NSURLRequest *noAutoplayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"no-autoplay-with-controls" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; 266 [webView loadRequest:noAutoplayRequest]; 267 [webView waitForMessage:@"loaded"]; 268 [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO]; 269 [webView mouseUpAtPoint:playButtonClickPoint]; 270 [webView waitForMessage:@"played"]; 271 ASSERT_FALSE(receivedAlert); 272 } 273 #endif 274 275 #endif -
trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h
r211200 r211226 45 45 // Simulates clicking with a pressure-sensitive device, if possible. 46 46 - (void)mouseDownAtPoint:(NSPoint)point simulatePressure:(BOOL)simulatePressure; 47 - (void)mouseUpAtPoint:(NSPoint)point; 47 48 - (void)typeCharacter:(char)character; 48 49 @end -
trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
r211200 r211226 121 121 #endif 122 122 } 123 124 - (void)_mouseUpAtPoint:(NSPoint)point 125 { 126 [self sendEvent:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:point modifierFlags:0 timestamp:GetCurrentEventTime() windowNumber:self.windowNumber context:[NSGraphicsContext currentContext] eventNumber:++gEventNumber clickCount:1 pressure:0]]; 127 } 123 128 #endif // PLATFORM(MAC) 124 129 … … 251 256 } 252 257 258 - (void)mouseUpAtPoint:(NSPoint)point 259 { 260 [_hostWindow _mouseUpAtPoint:point]; 261 } 262 253 263 - (void)typeCharacter:(char)character { 254 264 NSString *characterAsString = [NSString stringWithFormat:@"%c" , character];
Note: See TracChangeset
for help on using the changeset viewer.