Title: [248498] trunk/Source
Revision
248498
Author
timothy_hor...@apple.com
Date
2019-08-10 01:04:37 -0700 (Sat, 10 Aug 2019)

Log Message

Remove some more unused 32-bit code
https://bugs.webkit.org/show_bug.cgi?id=200607

Reviewed by Alexey Proskuryakov.

Source/WebKit:

* Modules/OSX.modulemap:

Source/WebKitLegacy:

* PlatformMac.cmake:
* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig:
* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController initWithItems:includeEditorServices:client:style:]):
(-[WebSharingServicePickerController initWithSharingServicePicker:client:]):
(-[WebSharingServicePickerController sharingService:didShareItems:]):
* Plugins/WebNetscapePluginEventHandler.mm:
* Plugins/WebNetscapePluginEventHandlerCarbon.h: Removed.
* Plugins/WebNetscapePluginEventHandlerCarbon.mm: Removed.
* Plugins/WebNetscapePluginEventHandlerCocoa.h:
(WebNetscapePluginEventHandlerCocoa::installKeyEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler): Deleted.
* Plugins/WebNetscapePluginEventHandlerCocoa.mm:
(WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
(WebNetscapePluginEventHandlerCocoa::keyDown):
(WebNetscapePluginEventHandlerCocoa::focusChanged):
(WebNetscapePluginEventHandlerCocoa::installKeyEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::TSMEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::handleTSMEvent): Deleted.
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::contextMenuForEvent):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
(-[WebHTMLView pressureChangeWithEvent:]):
* WebView/WebView.mm:
(LayerFlushController::flushLayers):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (248497 => 248498)


--- trunk/Source/WebKit/ChangeLog	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKit/ChangeLog	2019-08-10 08:04:37 UTC (rev 248498)
@@ -1,3 +1,12 @@
+2019-08-10  Tim Horton  <timothy_hor...@apple.com>
+
+        Remove some more unused 32-bit code
+        https://bugs.webkit.org/show_bug.cgi?id=200607
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Modules/OSX.modulemap:
+
 2019-08-09  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [iOS 13] Google Docs/Slides/Sheets: paste often doesn't work and sometimes produces an error

Modified: trunk/Source/WebKit/Modules/OSX.modulemap (248497 => 248498)


--- trunk/Source/WebKit/Modules/OSX.modulemap	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKit/Modules/OSX.modulemap	2019-08-10 08:04:37 UTC (rev 248498)
@@ -15,7 +15,4 @@
     header "DOMProgressEvent.h"
     export *
   }
-
-  exclude header "HIWebView.h"
-  exclude header "CarbonUtils.h"  
 }

Modified: trunk/Source/WebKitLegacy/ChangeLog (248497 => 248498)


--- trunk/Source/WebKitLegacy/ChangeLog	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/ChangeLog	2019-08-10 08:04:37 UTC (rev 248498)
@@ -1,3 +1,13 @@
+2019-08-10  Tim Horton  <timothy_hor...@apple.com>
+
+        Remove some more unused 32-bit code
+        https://bugs.webkit.org/show_bug.cgi?id=200607
+
+        Reviewed by Alexey Proskuryakov.
+
+        * PlatformMac.cmake:
+        * WebKitLegacy.xcodeproj/project.pbxproj:
+
 2019-08-09  Keith Rollin  <krol...@apple.com>
 
         Fix WebKitLegacy's post-process-header-rule script to support paths with spaces in them

Modified: trunk/Source/WebKitLegacy/PlatformMac.cmake (248497 => 248498)


--- trunk/Source/WebKitLegacy/PlatformMac.cmake	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/PlatformMac.cmake	2019-08-10 08:04:37 UTC (rev 248498)
@@ -202,7 +202,6 @@
     mac/Plugins/WebBaseNetscapePluginView.mm
     mac/Plugins/WebBasePluginPackage.mm
     mac/Plugins/WebNetscapePluginEventHandler.mm
-    mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
     mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
     mac/Plugins/WebNetscapePluginPackage.mm
     mac/Plugins/WebNetscapePluginStream.mm
@@ -342,11 +341,6 @@
 add_definitions("-include WebKitPrefix.h")
 
 set(C99_FILES
-    ${WEBKITLEGACY_DIR}/mac/Carbon/CarbonUtils.m
-    ${WEBKITLEGACY_DIR}/mac/Carbon/CarbonWindowContentView.m
-    ${WEBKITLEGACY_DIR}/mac/Carbon/CarbonWindowFrame.m
-    ${WEBKITLEGACY_DIR}/mac/Carbon/HIViewAdapter.m
-
     mac/DefaultDelegates/WebDefaultEditingDelegate.m
     mac/DefaultDelegates/WebDefaultPolicyDelegate.m
     mac/DefaultDelegates/WebDefaultUIDelegate.m

Modified: trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj (248497 => 248498)


--- trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2019-08-10 08:04:37 UTC (rev 248498)
@@ -102,8 +102,6 @@
 		1AC7176F1A26568A002E3115 /* WebVisitedLinkStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC7176D1A26568A002E3115 /* WebVisitedLinkStore.h */; };
 		1AEA66D40DC6B1FF003D12BF /* WebNetscapePluginEventHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEA66D20DC6B1FF003D12BF /* WebNetscapePluginEventHandler.h */; };
 		1AEA66D50DC6B1FF003D12BF /* WebNetscapePluginEventHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEA66D30DC6B1FF003D12BF /* WebNetscapePluginEventHandler.mm */; };
-		1AEA66D80DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEA66D60DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.h */; };
-		1AEA66D90DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEA66D70DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.mm */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
 		1AEA6A500DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEA6A4E0DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.h */; };
 		1AEA6A510DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEA6A4F0DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.mm */; };
 		1C0D40870AC1C8F40009C113 /* WebKitVersionChecks.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C0D40850AC1C8F40009C113 /* WebKitVersionChecks.h */; };
@@ -826,8 +824,6 @@
 		1AC7176D1A26568A002E3115 /* WebVisitedLinkStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVisitedLinkStore.h; sourceTree = "<group>"; };
 		1AEA66D20DC6B1FF003D12BF /* WebNetscapePluginEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapePluginEventHandler.h; sourceTree = "<group>"; };
 		1AEA66D30DC6B1FF003D12BF /* WebNetscapePluginEventHandler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapePluginEventHandler.mm; sourceTree = "<group>"; };
-		1AEA66D60DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapePluginEventHandlerCarbon.h; sourceTree = "<group>"; };
-		1AEA66D70DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapePluginEventHandlerCarbon.mm; sourceTree = "<group>"; };
 		1AEA6A4E0DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapePluginEventHandlerCocoa.h; sourceTree = "<group>"; };
 		1AEA6A4F0DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapePluginEventHandlerCocoa.mm; sourceTree = "<group>"; };
 		1C0D40850AC1C8F40009C113 /* WebKitVersionChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitVersionChecks.h; sourceTree = "<group>"; };
@@ -1700,8 +1696,6 @@
 			children = (
 				1AEA66D20DC6B1FF003D12BF /* WebNetscapePluginEventHandler.h */,
 				1AEA66D30DC6B1FF003D12BF /* WebNetscapePluginEventHandler.mm */,
-				1AEA66D60DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.h */,
-				1AEA66D70DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.mm */,
 				1AEA6A4E0DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.h */,
 				1AEA6A4F0DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.mm */,
 			);
@@ -3050,7 +3044,6 @@
 				A10C1D721820300E0036883A /* WebMIMETypeRegistry.h in Headers */,
 				5185F62610712B80007AA393 /* WebNavigationData.h in Headers */,
 				1AEA66D40DC6B1FF003D12BF /* WebNetscapePluginEventHandler.h in Headers */,
-				1AEA66D80DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.h in Headers */,
 				1AEA6A500DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.h in Headers */,
 				939810310824BF01008DF038 /* WebNetscapePluginPackage.h in Headers */,
 				9398102B0824BF01008DF038 /* WebNetscapePluginStream.h in Headers */,
@@ -3234,11 +3227,11 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				537CF83C22EFC13D00C6EBB3 /* check-xcfilelists.sh in Resources */,
 				29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */,
 				5C9D925A22D7E8AD008E9266 /* Sources.txt in Resources */,
 				5C9D925B22D7E8AD008E9266 /* SourcesCocoa.txt in Resources */,
 				939810B70824BF01008DF038 /* url_icon.tiff in Resources */,
-				537CF83C22EFC13D00C6EBB3 /* check-xcfilelists.sh in Resources */,
 				939810B50824BF01008DF038 /* WebAuthenticationPanel.xib in Resources */,
 				5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.xib in Resources */,
 			);
@@ -3546,7 +3539,6 @@
 				A10C1D731820300E0036883A /* WebMIMETypeRegistry.mm in Sources */,
 				5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */,
 				1AEA66D50DC6B1FF003D12BF /* WebNetscapePluginEventHandler.mm in Sources */,
-				1AEA66D90DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.mm in Sources */,
 				1AEA6A510DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.mm in Sources */,
 				939810D60824BF01008DF038 /* WebNetscapePluginPackage.mm in Sources */,
 				939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */,

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2019-08-10 08:04:37 UTC (rev 248498)
@@ -1,3 +1,37 @@
+2019-08-10  Tim Horton  <timothy_hor...@apple.com>
+
+        Remove some more unused 32-bit code
+        https://bugs.webkit.org/show_bug.cgi?id=200607
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Configurations/WebKitLegacy.xcconfig:
+        * Misc/WebSharingServicePickerController.mm:
+        (-[WebSharingServicePickerController initWithItems:includeEditorServices:client:style:]):
+        (-[WebSharingServicePickerController initWithSharingServicePicker:client:]):
+        (-[WebSharingServicePickerController sharingService:didShareItems:]):
+        * Plugins/WebNetscapePluginEventHandler.mm:
+        * Plugins/WebNetscapePluginEventHandlerCarbon.h: Removed.
+        * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Removed.
+        * Plugins/WebNetscapePluginEventHandlerCocoa.h:
+        (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler): Deleted.
+        (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler): Deleted.
+        * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
+        (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
+        (WebNetscapePluginEventHandlerCocoa::keyDown):
+        (WebNetscapePluginEventHandlerCocoa::focusChanged):
+        (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler): Deleted.
+        (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler): Deleted.
+        (WebNetscapePluginEventHandlerCocoa::TSMEventHandler): Deleted.
+        (WebNetscapePluginEventHandlerCocoa::handleTSMEvent): Deleted.
+        * WebCoreSupport/WebContextMenuClient.mm:
+        (WebContextMenuClient::contextMenuForEvent):
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
+        (-[WebHTMLView pressureChangeWithEvent:]):
+        * WebView/WebView.mm:
+        (LayerFlushController::flushLayers):
+
 2019-08-08  Rob Buis  <rb...@igalia.com>
 
         Add runtime flag for lazy image loading

Modified: trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig	2019-08-10 08:04:37 UTC (rev 248498)
@@ -27,7 +27,7 @@
 #include "WebKitTargetConditionals.xcconfig"
 
 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_COCOA_TOUCH));
-EXCLUDED_SOURCE_FILE_NAMES_cocoatouch = *.defs *.xib *.pdf *.tiff CarbonUtils.* CarbonWindowAdapter.* CarbonWindowContentView.* CarbonWindowFrame.* HIViewAdapter.* HIWebView.* OutlookQuirksUserScript.js PopupMenuMac.* SearchPopupMenuMac.* WebClipView.* WebDashboardRegion.* WebDynamicScrollBarsView.* WebIconDatabase.* WebInspectorClient.* WebJavaScriptTextInputPanel.* WebNSEventExtras.* WebNSPasteboardExtras.* WebNSWindowExtras.* WebPanelAuthenticationHandler.* WebPluginsPrivate.* WebStringTruncator.* WebTextCompletionController.*;
+EXCLUDED_SOURCE_FILE_NAMES_cocoatouch = *.defs *.xib *.pdf *.tiff OutlookQuirksUserScript.js PopupMenuMac.* SearchPopupMenuMac.* WebClipView.* WebDashboardRegion.* WebDynamicScrollBarsView.* WebIconDatabase.* WebInspectorClient.* WebJavaScriptTextInputPanel.* WebNSEventExtras.* WebNSPasteboardExtras.* WebNSWindowExtras.* WebPanelAuthenticationHandler.* WebPluginsPrivate.* WebStringTruncator.* WebTextCompletionController.*;
 EXCLUDED_SOURCE_FILE_NAMES_ = *IOS.mm MemoryMeasure.h WebCaretChangeListener.h WebFixedPositionContent.h WebFrameIOS.h WebFrameIPhone.h WebGeolocationCoreLocationProvider.h WebGeolocationPrivate.h WebGeolocationProviderIOS.h WebMIMETypeRegistry.h WebNSStringExtrasIOS.h WebNSStringExtrasIPhone.h WebPDFViewIOS.h WebPDFViewIPhone.h WebPDFViewPlaceholder.h WebSelectionRect.h WebUIKitDelegate.h WebUIKitSupport.h WebVisiblePosition.h DOMHTMLTextAreaElementPrivate.h DOMUIKitExtensions.h;
 
 EXPORTED_SYMBOLS_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp;

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebSharingServicePickerController.mm (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/Misc/WebSharingServicePickerController.mm	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebSharingServicePickerController.mm	2019-08-10 08:04:37 UTC (rev 248498)
@@ -76,9 +76,6 @@
 #if ENABLE(SERVICE_CONTROLS)
 - (instancetype)initWithItems:(NSArray *)items includeEditorServices:(BOOL)includeEditorServices client:(WebSharingServicePickerClient*)pickerClient style:(NSSharingServicePickerStyle)style
 {
-#ifndef __LP64__
-    return nil;
-#else
     if (!(self = [super init]))
         return nil;
 
@@ -91,14 +88,10 @@
     _pickerClient = pickerClient;
 
     return self;
-#endif
 }
 
 - (instancetype)initWithSharingServicePicker:(NSSharingServicePicker *)sharingServicePicker client:(WebSharingServicePickerClient&)pickerClient
 {
-#ifndef __LP64__
-    return nil;
-#else
     if (!(self = [super init]))
         return nil;
 
@@ -109,7 +102,6 @@
     _pickerClient = &pickerClient;
 
     return self;
-#endif
 }
 #endif // ENABLE(SERVICE_CONTROLS)
 
@@ -202,7 +194,6 @@
 
     if ([item isKindOfClass:[NSImage class]])
         [self didShareImageData:[item TIFFRepresentation] confirmDataIsValidTIFFData:NO];
-#ifdef __LP64__
     else if ([item isKindOfClass:[NSItemProvider class]]) {
         NSItemProvider *itemProvider = (NSItemProvider *)item;
         NSString *itemUTI = itemProvider.registeredTypeIdentifiers.firstObject;
@@ -224,7 +215,6 @@
 
         }];
     }
-#endif
     else if ([item isKindOfClass:[NSAttributedString class]]) {
         Frame& frame = _pickerClient->pageForSharingServicePicker(*self)->focusController().focusedOrMainFrame();
         frame.editor().replaceSelectionWithAttributedString(item);

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandler.mm (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandler.mm	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandler.mm	2019-08-10 08:04:37 UTC (rev 248498)
@@ -29,7 +29,6 @@
 
 #import <wtf/Assertions.h>
 #import "WebNetscapePluginView.h"
-#import "WebNetscapePluginEventHandlerCarbon.h"
 #import "WebNetscapePluginEventHandlerCocoa.h"
 
 std::unique_ptr<WebNetscapePluginEventHandler> WebNetscapePluginEventHandler::create(WebNetscapePluginView *pluginView)

Deleted: trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCarbon.h	2019-08-10 08:04:37 UTC (rev 248498)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#if ENABLE(NETSCAPE_PLUGIN_API) && !defined(__LP64__)
-
-#ifndef WebNetscapePluginEventHandlerCarbon_h
-#define WebNetscapePluginEventHandlerCarbon_h
-
-#include "WebNetscapePluginEventHandler.h"
-
-#import <Carbon/Carbon.h>
-#import <wtf/RetainPtr.h>
-
-class WebNetscapePluginEventHandlerCarbon : public WebNetscapePluginEventHandler {
-public:
-    WebNetscapePluginEventHandlerCarbon(WebNetscapePluginView*); 
-
-    virtual void drawRect(CGContextRef, const NSRect&);
-
-    virtual void mouseDown(NSEvent*);
-    virtual void mouseDragged(NSEvent*);
-    virtual void mouseEntered(NSEvent*);
-    virtual void mouseExited(NSEvent*);
-    virtual void mouseMoved(NSEvent*);
-    virtual void mouseUp(NSEvent*);
-    virtual bool scrollWheel(NSEvent*);
-    
-    virtual void keyDown(NSEvent*);
-    virtual void keyUp(NSEvent*);
-    virtual void flagsChanged(NSEvent*);
-    virtual void syntheticKeyDownWithCommandModifier(int keyCode, char character);
-
-    virtual void windowFocusChanged(bool hasFocus);    
-    virtual void focusChanged(bool hasFocus);
-
-    virtual void startTimers(bool throttleTimers);
-    virtual void stopTimers();
-
-    virtual void* platformWindow(NSWindow*);
-    
-private:
-    void sendNullEvent();
-
-    void installKeyEventHandler();
-    void removeKeyEventHandler();
-    
-    static OSStatus TSMEventHandler(EventHandlerCallRef, EventRef, void *eventHandler);
-    static void nullEventTimerFired(CFRunLoopTimerRef, void *context);
-
-    bool sendEvent(EventRecord*);
-    
-    EventHandlerRef m_keyEventHandler;
-    bool m_suspendKeyUpEvents;
-    RetainPtr<CFRunLoopTimerRef> m_nullEventTimer;
-};
-
-#endif // WebNetscapePluginEventHandlerCarbon_h
-
-#endif // ENABLE(NETSCAPE_PLUGIN_API) && !defined(__LP64__)
-

Deleted: trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm	2019-08-10 08:04:37 UTC (rev 248498)
@@ -1,431 +0,0 @@
-/*
- * Copyright (C) 2008-2017 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#if ENABLE(NETSCAPE_PLUGIN_API) && !defined(__LP64__)
-
-#import "WebNetscapePluginEventHandlerCarbon.h"
-
-#import "WebNetscapePluginView.h"
-#import "WebKitLogging.h"
-#import <Carbon/Carbon.h>
-#import <pal/spi/mac/HIToolboxSPI.h>
-#import <pal/spi/mac/NSEventSPI.h>
-
-// Send null events 50 times a second when active, so plug-ins like Flash get high frame rates.
-#define NullEventIntervalActive         0.02
-#define NullEventIntervalNotActive      0.25
-
-WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon(WebNetscapePluginView* pluginView)
-    : WebNetscapePluginEventHandler(pluginView)
-    , m_keyEventHandler(0)
-    , m_suspendKeyUpEvents(false)
-{
-}
-
-static void getCarbonEvent(EventRecord* carbonEvent)
-{
-    carbonEvent->what = nullEvent;
-    carbonEvent->message = 0;
-    carbonEvent->when = TickCount();
-    
-    GetGlobalMouse(&carbonEvent->where);
-    carbonEvent->modifiers = GetCurrentKeyModifiers();
-    if (!Button())
-        carbonEvent->modifiers |= btnState;
-}
-
-static EventModifiers modifiersForEvent(NSEvent *event)
-{
-    EventModifiers modifiers;
-    unsigned int modifierFlags = [event modifierFlags];
-    NSEventType eventType = [event type];
-    
-    modifiers = 0;
-    
-    if (eventType != NSEventTypeLeftMouseDown && eventType != NSEventTypeRightMouseDown)
-        modifiers |= btnState;
-    
-    if (modifierFlags & NSEventModifierFlagCommand)
-        modifiers |= cmdKey;
-    
-    if (modifierFlags & NSEventModifierFlagShift)
-        modifiers |= shiftKey;
-
-    if (modifierFlags & NSEventModifierFlagCapsLock)
-        modifiers |= alphaLock;
-
-    if (modifierFlags & NSEventModifierFlagOption)
-        modifiers |= optionKey;
-
-    if (modifierFlags & NSEventModifierFlagControl || eventType == NSEventTypeRightMouseDown)
-        modifiers |= controlKey;
-    
-    return modifiers;
-}
-
-static void getCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent)
-{
-    if ([cocoaEvent _eventRef] && ConvertEventRefToEventRecord((EventRef)[cocoaEvent _eventRef], carbonEvent))
-        return;
-    
-    NSPoint where = [[cocoaEvent window] convertBaseToScreen:[cocoaEvent locationInWindow]];
-        
-    carbonEvent->what = nullEvent;
-    carbonEvent->message = 0;
-    carbonEvent->when = (UInt32)([cocoaEvent timestamp] * 60); // seconds to ticks
-    carbonEvent->where.h = (short)where.x;
-    carbonEvent->where.v = (short)(NSMaxY([(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame]) - where.y);
-    carbonEvent->modifiers = modifiersForEvent(cocoaEvent);
-}
-
-void WebNetscapePluginEventHandlerCarbon::sendNullEvent()
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event);
-    
-    // Plug-in should not react to cursor position when not active or when a menu is down.
-    MenuTrackingData trackingData;
-    OSStatus error = GetMenuTrackingData(NULL, &trackingData);
-    
-    // Plug-in should not react to cursor position when the actual window is not key.
-    if (![[m_pluginView window] isKeyWindow] || (error == noErr && trackingData.menu)) {
-        // FIXME: Does passing a v and h of -1 really prevent it from reacting to the cursor position?
-        event.where.v = -1;
-        event.where.h = -1;
-    }
-    
-    sendEvent(&event);
-}
-
-void WebNetscapePluginEventHandlerCarbon::drawRect(CGContextRef, const NSRect&)
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event);
-    event.what = updateEvt;
-    WindowRef windowRef = (WindowRef)[[m_pluginView window] windowRef];
-    event.message = (unsigned long)windowRef;
-    
-    BOOL acceptedEvent;
-    acceptedEvent = sendEvent(&event);
-    
-    LOG(PluginEvents, "NPP_HandleEvent(updateEvt): %d", acceptedEvent);
-}
-
-void WebNetscapePluginEventHandlerCarbon::mouseDown(NSEvent* theEvent)
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event, theEvent);
-    event.what = ::mouseDown;
-    
-    BOOL acceptedEvent;
-    acceptedEvent = sendEvent(&event);
-    
-    LOG(PluginEvents, "NPP_HandleEvent(mouseDown): %d pt.v=%d, pt.h=%d", acceptedEvent, event.where.v, event.where.h);    
-}
-
-void WebNetscapePluginEventHandlerCarbon::mouseUp(NSEvent* theEvent)
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event, theEvent);
-    event.what = ::mouseUp;
-    
-    BOOL acceptedEvent;
-    acceptedEvent = sendEvent(&event);
-    
-    LOG(PluginEvents, "NPP_HandleEvent(mouseUp): %d pt.v=%d, pt.h=%d", acceptedEvent, event.where.v, event.where.h);    
-}
-
-bool WebNetscapePluginEventHandlerCarbon::scrollWheel(NSEvent* theEvent)
-{
-    return false;
-}
-
-void WebNetscapePluginEventHandlerCarbon::mouseEntered(NSEvent* theEvent)
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event, theEvent);
-    event.what = NPEventType_AdjustCursorEvent;
-    
-    BOOL acceptedEvent;
-    acceptedEvent = sendEvent(&event);
-    
-    LOG(PluginEvents, "NPP_HandleEvent(mouseEntered): %d", acceptedEvent);    
-}
-
-void WebNetscapePluginEventHandlerCarbon::mouseExited(NSEvent* theEvent)
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event, theEvent);
-    event.what = NPEventType_AdjustCursorEvent;
-    
-    BOOL acceptedEvent;
-    acceptedEvent = sendEvent(&event);
-    
-    LOG(PluginEvents, "NPP_HandleEvent(mouseExited): %d", acceptedEvent);    
-}
-
-void WebNetscapePluginEventHandlerCarbon::mouseDragged(NSEvent*)
-{
-}
-
-void WebNetscapePluginEventHandlerCarbon::mouseMoved(NSEvent* theEvent)
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event, theEvent);
-    event.what = NPEventType_AdjustCursorEvent;
-    
-    BOOL acceptedEvent;
-    acceptedEvent = sendEvent(&event);
-    
-    LOG(PluginEvents, "NPP_HandleEvent(mouseMoved): %d", acceptedEvent);
-}
-
-void WebNetscapePluginEventHandlerCarbon::keyDown(NSEvent *theEvent)
-{
-    m_suspendKeyUpEvents = true;
-    TSMProcessRawKeyEvent((EventRef)[theEvent _eventRef]);
-}
-
-void WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier(int keyCode, char character)
-{
-    EventRecord event;
-    getCarbonEvent(&event);
-    
-    event.what = ::keyDown;
-    event.modifiers |= cmdKey;
-    event.message = keyCode << 8 | character;
-    sendEvent(&event);
-}
-
-static UInt32 keyMessageForEvent(NSEvent *event)
-{
-    NSData *data = "" characters] dataUsingEncoding:CFStringConvertEncodingToNSStringEncoding(CFStringGetSystemEncoding())];
-    if (!data)
-        return 0;
-
-    UInt8 characterCode;
-    [data getBytes:&characterCode length:1];
-    UInt16 keyCode = [event keyCode];
-    return keyCode << 8 | characterCode;
-}    
-    
-void WebNetscapePluginEventHandlerCarbon::keyUp(NSEvent* theEvent)
-{
-    TSMProcessRawKeyEvent((EventRef)[theEvent _eventRef]);
-    
-    // TSM won't send keyUp events so we have to send them ourselves.
-    // Only send keyUp events after we receive the TSM callback because this is what plug-in expect from OS 9.
-    if (!m_suspendKeyUpEvents) {
-        EventRecord event;
-        
-        getCarbonEvent(&event, theEvent);
-        event.what = ::keyUp;
-        
-        if (event.message == 0)
-            event.message = keyMessageForEvent(theEvent);
-        
-        sendEvent(&event);
-    }    
-}
-
-void WebNetscapePluginEventHandlerCarbon::flagsChanged(NSEvent*)
-{
-}
-
-void WebNetscapePluginEventHandlerCarbon::focusChanged(bool hasFocus)
-{
-    EventRecord event;
-    
-    getCarbonEvent(&event);
-    bool acceptedEvent;
-    if (hasFocus) {
-        event.what = NPEventType_GetFocusEvent;
-        acceptedEvent = sendEvent(&event);
-        LOG(PluginEvents, "NPP_HandleEvent(NPEventType_GetFocusEvent): %d", acceptedEvent);
-        installKeyEventHandler();
-    } else {
-        event.what = NPEventType_LoseFocusEvent;
-        acceptedEvent = sendEvent(&event);
-        LOG(PluginEvents, "NPP_HandleEvent(NPEventType_LoseFocusEvent): %d", acceptedEvent);
-        removeKeyEventHandler();
-    }
-}
-
-void WebNetscapePluginEventHandlerCarbon::windowFocusChanged(bool hasFocus)
-{
-    WindowRef windowRef = (WindowRef)[[m_pluginView window] windowRef];
-
-    SetUserFocusWindow(windowRef);
-    
-    EventRecord event;
-    
-    getCarbonEvent(&event);
-    event.what = activateEvt;
-    event.message = (unsigned long)windowRef;
-    if (hasFocus)
-        event.modifiers |= activeFlag;
-    
-    BOOL acceptedEvent;
-    acceptedEvent = sendEvent(&event);
-    
-    LOG(PluginEvents, "NPP_HandleEvent(activateEvent): %d  isActive: %d", acceptedEvent, hasFocus);    
-}
-
-OSStatus WebNetscapePluginEventHandlerCarbon::TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *eventHandler)
-{    
-    EventRef rawKeyEventRef;
-    OSStatus status = GetEventParameter(inEvent, kEventParamTextInputSendKeyboardEvent, typeEventRef, NULL, sizeof(EventRef), NULL, &rawKeyEventRef);
-    if (status != noErr) {
-        LOG_ERROR("GetEventParameter failed with error: %d", status);
-        return noErr;
-    }
-    
-    // Two-pass read to allocate/extract Mac charCodes
-    ByteCount numBytes;    
-    status = GetEventParameter(rawKeyEventRef, kEventParamKeyMacCharCodes, typeChar, NULL, 0, &numBytes, NULL);
-    if (status != noErr) {
-        LOG_ERROR("GetEventParameter failed with error: %d", status);
-        return noErr;
-    }
-    char *buffer = (char *)malloc(numBytes);
-    status = GetEventParameter(rawKeyEventRef, kEventParamKeyMacCharCodes, typeChar, NULL, numBytes, NULL, buffer);
-    if (status != noErr) {
-        LOG_ERROR("GetEventParameter failed with error: %d", status);
-        free(buffer);
-        return noErr;
-    }
-    
-    EventRef cloneEvent = CopyEvent(rawKeyEventRef);
-    unsigned i;
-    for (i = 0; i < numBytes; i++) {
-        status = SetEventParameter(cloneEvent, kEventParamKeyMacCharCodes, typeChar, 1 /* one char code */, &buffer[i]);
-        if (status != noErr) {
-            LOG_ERROR("SetEventParameter failed with error: %d", status);
-            free(buffer);
-            return noErr;
-        }
-        
-        EventRecord eventRec;
-        if (ConvertEventRefToEventRecord(cloneEvent, &eventRec)) {
-            BOOL acceptedEvent;
-            acceptedEvent = static_cast<WebNetscapePluginEventHandlerCarbon*>(eventHandler)->sendEvent(&eventRec);
-            
-            LOG(PluginEvents, "NPP_HandleEvent(keyDown): %d charCode:%c keyCode:%lu",
-                acceptedEvent, (char) (eventRec.message & charCodeMask), (eventRec.message & keyCodeMask));
-            
-            // We originally thought that if the plug-in didn't accept this event,
-            // we should pass it along so that keyboard scrolling, for example, will work.
-            // In practice, this is not a good idea, because plug-ins tend to eat the event but return false.
-            // MacIE handles each key event twice because of this, but we will emulate the other browsers instead.
-        }
-    }
-    ReleaseEvent(cloneEvent);
-    
-    free(buffer);
-    
-    return noErr;
-}
-
-void WebNetscapePluginEventHandlerCarbon::installKeyEventHandler()
-{
-    static const EventTypeSpec sTSMEvents[] =
-    {
-        { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }
-    };
-    
-    if (!m_keyEventHandler) {
-        InstallEventHandler(GetWindowEventTarget((WindowRef)[[m_pluginView window] windowRef]),
-                            NewEventHandlerUPP(TSMEventHandler),
-                            GetEventTypeCount(sTSMEvents),
-                            sTSMEvents,
-                            this,
-                            &m_keyEventHandler);
-    }
-}
-
-void WebNetscapePluginEventHandlerCarbon::removeKeyEventHandler()
-{
-    if (m_keyEventHandler) {
-        RemoveEventHandler(m_keyEventHandler);
-        m_keyEventHandler = 0;
-    }    
-}
-
-void WebNetscapePluginEventHandlerCarbon::nullEventTimerFired(CFRunLoopTimerRef timerRef, void *context)
-{
-    static_cast<WebNetscapePluginEventHandlerCarbon*>(context)->sendNullEvent();
-}
-
-void WebNetscapePluginEventHandlerCarbon::startTimers(bool throttleTimers)
-{
-    ASSERT(!m_nullEventTimer);
-    
-    CFTimeInterval interval = !throttleTimers ? NullEventIntervalActive : NullEventIntervalNotActive;    
-    
-    CFRunLoopTimerContext context = { 0, this, NULL, NULL, NULL };
-    m_nullEventTimer = adoptCF(CFRunLoopTimerCreate(0, CFAbsoluteTimeGetCurrent() + interval, interval,
-                                                   0, 0, nullEventTimerFired, &context));
-    CFRunLoopAddTimer(CFRunLoopGetCurrent(), m_nullEventTimer.get(), kCFRunLoopDefaultMode);
-}
-
-void WebNetscapePluginEventHandlerCarbon::stopTimers()
-{
-    if (!m_nullEventTimer)
-        return;
-    
-    CFRunLoopTimerInvalidate(m_nullEventTimer.get());
-    m_nullEventTimer = 0;
-}
-
-void* WebNetscapePluginEventHandlerCarbon::platformWindow(NSWindow* window)
-{
-    return [window windowRef];
-}
-
-bool WebNetscapePluginEventHandlerCarbon::sendEvent(EventRecord* event)
-{
-    // If at any point the user clicks or presses a key from within a plugin, set the 
-    // currentEventIsUserGesture flag to true. This is important to differentiate legitimate 
-    // window.open() calls;  we still want to allow those.  See rdar://problem/4010765
-    if (event->what == ::mouseDown || event->what == ::keyDown || event->what == ::mouseUp || event->what == ::autoKey)
-        m_currentEventIsUserGesture = true;
-    
-    m_suspendKeyUpEvents = false; 
-
-    bool result = [m_pluginView sendEvent:event isDrawRect:event->what == updateEvt];
-    
-    m_currentEventIsUserGesture = false;
-    
-    return result;
-}
-
-#endif // ENABLE(NETSCAPE_PLUGIN_API) && !defined(__LP64__)

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCocoa.h	2019-08-10 08:04:37 UTC (rev 248498)
@@ -59,19 +59,6 @@
     bool sendMouseEvent(NSEvent*, NPCocoaEventType);
     bool sendKeyEvent(NSEvent*, NPCocoaEventType);
     bool sendEvent(NPCocoaEvent*);
-    
-#ifndef __LP64__
-    void installKeyEventHandler();
-    void removeKeyEventHandler();
-    
-    static OSStatus TSMEventHandler(EventHandlerCallRef, EventRef, void *eventHandler);
-    OSStatus handleTSMEvent(EventRef);
-
-    EventHandlerRef m_keyEventHandler;
-#else
-    inline void installKeyEventHandler() { }
-    void removeKeyEventHandler() { }
-#endif
 };
 
 #endif //WebNetscapePluginEventHandlerCocoa_h

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm	2019-08-10 08:04:37 UTC (rev 248498)
@@ -34,9 +34,6 @@
 
 WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa(WebNetscapePluginView* pluginView)
     : WebNetscapePluginEventHandler(pluginView)
-#ifndef __LP64__
-    , m_keyEventHandler(0)
-#endif
 {
 }
 
@@ -125,14 +122,7 @@
 void WebNetscapePluginEventHandlerCocoa::keyDown(NSEvent *event)
 {
     bool retval = sendKeyEvent(event, NPCocoaEventKeyDown);
-    
-#ifndef __LP64__
-    // If the plug-in did not handle the event, pass it on to the Input Manager.
-    if (retval)
-        TSMProcessRawKeyEvent((EventRef)[event _eventRef]);
-#else
     UNUSED_PARAM(retval);
-#endif
 }
 
 void WebNetscapePluginEventHandlerCocoa::keyUp(NSEvent *event)
@@ -203,11 +193,6 @@
     event.data.focus.hasFocus = hasFocus;
     
     sendEvent(&event);
-    
-    if (hasFocus)
-        installKeyEventHandler();
-    else
-        removeKeyEventHandler();
 }
 
 void* WebNetscapePluginEventHandlerCocoa::platformWindow(NSWindow *window)
@@ -237,67 +222,4 @@
     return result;
 }
 
-#ifndef __LP64__
-
-void WebNetscapePluginEventHandlerCocoa::installKeyEventHandler()
-{
-    static const EventTypeSpec TSMEvents[] =
-    {
-        { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }
-    };
-    
-    if (!m_keyEventHandler)
-        InstallEventHandler(GetWindowEventTarget((WindowRef)[[m_pluginView window] windowRef]),
-                            NewEventHandlerUPP(TSMEventHandler),
-                            GetEventTypeCount(TSMEvents),
-                            TSMEvents,
-                            this,
-                            &m_keyEventHandler);
-}
-
-void WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler()
-{
-    if (m_keyEventHandler) {
-        RemoveEventHandler(m_keyEventHandler);
-        m_keyEventHandler = 0;
-    }    
-}
-
-OSStatus WebNetscapePluginEventHandlerCocoa::TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef event, void* eventHandler)
-{
-    return static_cast<WebNetscapePluginEventHandlerCocoa*>(eventHandler)->handleTSMEvent(event);
-}
-
-OSStatus WebNetscapePluginEventHandlerCocoa::handleTSMEvent(EventRef eventRef)
-{
-    ASSERT(GetEventKind(eventRef) == kEventTextInputUnicodeForKeyEvent);
-    
-    // Get the text buffer size.
-    ByteCount size;
-    OSStatus result = GetEventParameter(eventRef, kEventParamTextInputSendText, typeUnicodeText, 0, 0, &size, 0);
-    if (result != noErr)
-        return result;
-    
-    unsigned length = size / sizeof(UniChar);
-    Vector<UniChar, 16> characters(length);
-    
-    // Now get the actual text.
-    result = GetEventParameter(eventRef, kEventParamTextInputSendText, typeUnicodeText, 0, size, 0, characters.data());
-    if (result != noErr)
-        return result;
-
-    RetainPtr<CFStringRef> text = adoptCF(CFStringCreateWithCharacters(0, characters.data(), length));
-
-    NPCocoaEvent event;
-    
-    initializeEvent(&event, NPCocoaEventTextInput);
-    event.data.text.text = reinterpret_cast<NPNSString*>(const_cast<CFMutableStringRef>(text.get()));
-    
-    sendEvent(&event);
-
-    return noErr;
-}
-
-#endif // __LP64__
-
 #endif // ENABLE(NETSCAPE_PLUGIN_API)

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm	2019-08-10 08:04:37 UTC (rev 248498)
@@ -235,7 +235,7 @@
     if (!page)
         return nil;
 
-#if ENABLE(SERVICE_CONTROLS) && defined(__LP64__)
+#if ENABLE(SERVICE_CONTROLS)
     if (Image* image = page->contextMenuController().context().controlledImage()) {
         ASSERT(page->contextMenuController().context().hitTestResult().innerNode());
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2019-08-10 08:04:37 UTC (rev 248498)
@@ -2546,14 +2546,11 @@
     float newBottom;
     view->adjustPageHeightDeprecated(&newBottom, top, bottom, bottomLimit);
 
-#ifdef __LP64__
     // If the new bottom is equal to the old bottom (when both are treated as floats), we just return the original
     // bottom. This prevents rounding errors that can occur when converting newBottom to a double.
     if (WTF::areEssentiallyEqual(static_cast<float>(bottom), newBottom))
         return bottom;
-    else
-#endif
-        return newBottom;
+    return newBottom;
 }
 
 #if PLATFORM(IOS_FAMILY)
@@ -4508,7 +4505,7 @@
 
 - (void)pressureChangeWithEvent:(NSEvent *)event
 {
-#if PLATFORM(MAC) && defined(__LP64__)
+#if PLATFORM(MAC)
     NSEvent *lastPressureEvent = [[self _webView] _pressureEvent];
     if (event.phase != NSEventPhaseChanged && event.phase != NSEventPhaseBegan && event.phase != NSEventPhaseEnded)
         return;

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (248497 => 248498)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-08-10 07:02:28 UTC (rev 248497)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-08-10 08:04:37 UTC (rev 248498)
@@ -9203,15 +9203,7 @@
     // An NSWindow may not display in the next runloop cycle after dirtying due to delayed window display logic,
     // in which case this observer can fire first. So if the window is due for a display, don't commit
     // layer changes, otherwise they'll show on screen before the view drawing.
-    bool viewsNeedDisplay;
-#ifndef __LP64__
-    if (window && [window _wrapsCarbonWindow])
-        viewsNeedDisplay = HIViewGetNeedsDisplay(HIViewGetRoot(static_cast<WindowRef>([window windowRef])));
-    else
-#endif
-        viewsNeedDisplay = [window viewsNeedDisplay];
-
-    if (viewsNeedDisplay)
+    if (window.viewsNeedDisplay)
         return false;
 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 #endif // PLATFORM(MAC)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to