Reviewed by Darin.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2007 01:07:36 +0000 (01:07 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2007 01:07:36 +0000 (01:07 +0000)
        Remove HIWebView in 64-bit.

        Also disable a few calls that are now gone in 64-bit and filed these bugs:

        <rdar://problem/5311653> WebKit needs to adopt HIGetMousePosition where we used GetGlobalMouse before
        <rdar://problem/5311648> WebKit needs to move off of CopyEvent in WebBaseNetscapePluginView
        <rdar://problem/5311640> WebKit needs a new solution for HISearchWindowShow on 64-bit

        * Carbon/CarbonUtils.m:
        * Carbon/CarbonWindowAdapter.m:
        * Carbon/CarbonWindowContentView.m:
        * Carbon/CarbonWindowFrame.m:
        * Carbon/HIViewAdapter.m:
        (SetViewNeedsDisplay):
        * Carbon/HIWebView.m:
        (Draw):
        (SyncFrame):
        * Configurations/WebKit.xcconfig:
        * Plugins/WebBaseNetscapePluginView.mm:
        (+[WebBaseNetscapePluginView getCarbonEvent:]):
        (TSMEventHandler):
        * WebKit.LP64.exp: Added.
        * WebView/WebView.mm:
        (-[WebView _searchWithSpotlightFromMenu:]):

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

WebKit/Carbon/CarbonUtils.m
WebKit/Carbon/CarbonWindowAdapter.m
WebKit/Carbon/CarbonWindowContentView.m
WebKit/Carbon/CarbonWindowFrame.m
WebKit/Carbon/HIViewAdapter.m
WebKit/Carbon/HIWebView.m
WebKit/ChangeLog
WebKit/Configurations/WebKit.xcconfig
WebKit/Plugins/WebBaseNetscapePluginView.mm
WebKit/WebKit.LP64.exp [new file with mode: 0644]
WebKit/WebView/WebView.mm

index 5bcbbeea7ffc46fa8d3c2a9f142846c966bc0b16..be749c9de31cbb68a36e032980abfdd728aabce4 100644 (file)
@@ -26,6 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef __LP64__
+
 #include "CarbonUtils.h"
 #import <WebKitSystemInterface.h>
 
@@ -127,3 +129,4 @@ WebConvertNSImageToCGImageRef(
        return image;
 }
 
+#endif
index ee23d47799b9e6d0884586a1c0384470a6c755f2..5bcafc5b11b7e93c629284f0b42dad4d5eddacb1 100644 (file)
@@ -55,6 +55,8 @@
 
 // Some things would have to be made public if someone wanted to subclass this so as to support more menu item commands.  M.P. Warning - 9/19/00
 
+#ifndef __LP64__
+
 #import "CarbonWindowAdapter.h"
 
 #import "CarbonWindowFrame.h"
@@ -1040,3 +1042,5 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
 }
 
 @end // implementation CarbonWindowAdapter
+
+#endif
index c491c1a6a99ef98cb39e8da63329cb904e2ab945..d49a6ac149e9c2729d261370e10c44630ab91374 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef __LP64__
+
 #import "CarbonWindowContentView.h"
 
 @implementation CarbonWindowContentView
 
 @end
+
+#endif
index 41ba9d5afc7df256c7cc04e07dbd22cd131523fd..6594793eab735541b84f3572b18ca6af71ce6058 100644 (file)
@@ -26,6 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef __LP64__
+
 #import "CarbonWindowFrame.h"
 #import "CarbonWindowAdapter.h"
 #import "CarbonWindowContentView.h"
 
 
 @end // implementation NSCarbonWindowFrame
+
+#endif
index 10861735cd12dc74921350f3ca980ee722c97eba..d53bcdcaed07b107b94102860fda87a3a8946f28 100644 (file)
@@ -26,6 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef __LP64__
+
 #import "HIViewAdapter.h"
 
 #import <objc/objc.h>
@@ -219,7 +221,6 @@ static void SetViewNeedsDisplay(HIViewRef inHIView, RgnHandle inRegion, Boolean
 #endif
         HIViewSetNeedsDisplayInRegion(inHIView, inRegion, inNeedsDisplay);
     } else {
-#ifndef __LP64__
         Rect bounds, cntlBounds;
         GrafPtr port, savePort;
         Rect portBounds;
@@ -258,6 +259,7 @@ static void SetViewNeedsDisplay(HIViewRef inHIView, RgnHandle inRegion, Boolean
         
         SetOrigin(portBounds.left, portBounds.top);
         SetPort(savePort);
-#endif
     }
 }
+
+#endif
index 2478a14e3cb4910e89685a87a3e4289daa054614..79b283fab2166af5cba58b539295498a9a1c6ccf 100644 (file)
@@ -26,6 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef __LP64__
+
 #include "HIWebView.h"
 
 #include "CarbonWindowAdapter.h"
@@ -333,7 +335,6 @@ Draw( HIWebView* inView, RgnHandle limitRgn, CGContextRef inContext )
        HIRect                          hiRect;
        bool                            createdContext = false;
 
-#ifndef __LP64__
     if (!inView->fIsComposited)
     {
         GrafPtr port;
@@ -347,7 +348,6 @@ Draw( HIWebView* inView, RgnHandle limitRgn, CGContextRef inContext )
         CGContextScaleCTM( inContext, 1, -1 );
         createdContext = true;
     }
-#endif
 
        HIViewGetBounds( inView->fViewRef, &bounds );
 
@@ -812,7 +812,6 @@ SyncFrame( HIWebView* inView )
             [inView->fWebView setFrameOrigin: origin];
             [inView->fWebView setFrameSize: *(NSSize*)&frame.size];
         }
-#ifndef __LP64__
         else
         {
             GrafPtr                    port = GetWindowPort( GetControlOwner( inView->fViewRef ) );
@@ -845,7 +844,6 @@ SyncFrame( HIWebView* inView )
             [inView->fWebView setFrameOrigin: *(NSPoint*)&frame.origin];
             [inView->fWebView setFrameSize: *(NSSize*)&frame.size];
         }
-#endif
     }
 }
 
@@ -1499,10 +1497,6 @@ MissingParameter:
 }
 
 
-#ifdef __LP64__
-static void StartUpdateObserver(HIWebView* view) {};
-static void StopUpdateObserver(HIWebView* view) {};
-#else
 static void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info);
 
 static void
@@ -1628,4 +1622,5 @@ UpdateObserver( CFRunLoopObserverRef observer, CFRunLoopActivity activity, void
         DisposeRgn( region );
     }
 }
+
 #endif
index f03e4657f182dbe4c5f4b6af2c75ac1f6d0aee75..3e5563ce7e0966a29cf198ae5f4ca2a8ac82ecb4 100644 (file)
@@ -1,3 +1,32 @@
+2007-07-03  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Darin.
+
+        Remove HIWebView in 64-bit.
+
+        Also disable a few calls that are now gone in 64-bit and filed these bugs:
+
+        <rdar://problem/5311653> WebKit needs to adopt HIGetMousePosition where we used GetGlobalMouse before
+        <rdar://problem/5311648> WebKit needs to move off of CopyEvent in WebBaseNetscapePluginView
+        <rdar://problem/5311640> WebKit needs a new solution for HISearchWindowShow on 64-bit
+
+        * Carbon/CarbonUtils.m:
+        * Carbon/CarbonWindowAdapter.m:
+        * Carbon/CarbonWindowContentView.m:
+        * Carbon/CarbonWindowFrame.m:
+        * Carbon/HIViewAdapter.m:
+        (SetViewNeedsDisplay):
+        * Carbon/HIWebView.m:
+        (Draw):
+        (SyncFrame):
+        * Configurations/WebKit.xcconfig:
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (+[WebBaseNetscapePluginView getCarbonEvent:]):
+        (TSMEventHandler):
+        * WebKit.LP64.exp: Added.
+        * WebView/WebView.mm:
+        (-[WebView _searchWithSpotlightFromMenu:]):
+
 2007-07-03  Adam Roben  <aroben@apple.com>
 
         Merge the Windows and Mac localized strings and exceptions files
index 789c552fa845bf2523dda856fe2a56ee1e5230ad..6a1b5541548eeb3c8e89d8c1d2c3639ecad1fa22 100644 (file)
@@ -1,5 +1,10 @@
 #include "Version.xcconfig"
-EXPORTED_SYMBOLS_FILE = WebKit.exp;
+EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(CURRENT_ARCH));
+EXPORTED_SYMBOLS_FILE_ = WebKit.exp;
+EXPORTED_SYMBOLS_FILE_i386 = WebKit.exp;
+EXPORTED_SYMBOLS_FILE_ppc = WebKit.exp;
+EXPORTED_SYMBOLS_FILE_ppc64 = WebKit.LP64.exp;
+EXPORTED_SYMBOLS_FILE_x86_64 = WebKit.LP64.exp;
 FEATURE_DEFINES = ENABLE_SVG ENABLE_XPATH ENABLE_XSLT;
 FRAMEWORK_SEARCH_PATHS = $(UMBRELLA_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(FRAMEWORK_SEARCH_PATHS);
 GCC_PREFIX_HEADER = WebKitPrefix.h;
index 2d16b6b6519676c1ea126ba1d4ddda871ee6c66a..f2c7469ec9c49a49188c7ccf325282272c63d19d 100644 (file)
@@ -165,9 +165,15 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     carbonEvent->what = nullEvent;
     carbonEvent->message = 0;
     carbonEvent->when = TickCount();
+#ifdef __LP64__
+    // FIXME: we need to adopt the new HIGetMousePosition() here and remove GetGlobalMouse <rdar://problem/5311653>
+    carbonEvent->where.h = 0;
+    carbonEvent->where.v = 0;
+#else
     GetGlobalMouse(&carbonEvent->where);
     carbonEvent->where.h = static_cast<short>(carbonEvent->where.h * HIGetScaleFactor());
     carbonEvent->where.v = static_cast<short>(carbonEvent->where.v * HIGetScaleFactor());
+#endif
     carbonEvent->modifiers = GetCurrentKeyModifiers();
     if (!Button())
         carbonEvent->modifiers |= btnState;
@@ -1022,6 +1028,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 
 static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *pluginView)
 {    
+#ifndef __LP64__
+    // FIXME: CopyEvent is gone in 64-bit, this function needs to not use it <rdar://problem/5311648>
+
     EventRef rawKeyEventRef;
     OSStatus status = GetEventParameter(inEvent, kEventParamTextInputSendKeyboardEvent, typeEventRef, NULL, sizeof(EventRef), NULL, &rawKeyEventRef);
     if (status != noErr) {
@@ -1071,6 +1080,8 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     ReleaseEvent(cloneEvent);
     
     free(buffer);
+#endif
+
     return noErr;
 }
 
diff --git a/WebKit/WebKit.LP64.exp b/WebKit/WebKit.LP64.exp
new file mode 100644 (file)
index 0000000..7932b87
--- /dev/null
@@ -0,0 +1,101 @@
+.objc_class_name_WebArchive
+.objc_class_name_WebBackForwardList
+.objc_class_name_WebBaseNetscapePluginView
+.objc_class_name_WebCache
+.objc_class_name_WebCoreScrollView
+.objc_class_name_WebCoreStatistics
+.objc_class_name_WebDataSource
+.objc_class_name_WebDefaultPolicyDelegate
+.objc_class_name_WebDownload
+.objc_class_name_WebDynamicScrollBarsView
+.objc_class_name_WebFormDelegate
+.objc_class_name_WebFrame
+.objc_class_name_WebFrameView
+.objc_class_name_WebHTMLRepresentation
+.objc_class_name_WebHTMLView
+.objc_class_name_WebHistory
+.objc_class_name_WebHistoryItem
+.objc_class_name_WebIconDatabase
+.objc_class_name_WebInspector
+.objc_class_name_WebJavaScriptTextInputPanel
+.objc_class_name_WebKeyGenerator
+.objc_class_name_WebKitStatistics
+.objc_class_name_WebPanelAuthenticationHandler
+.objc_class_name_WebPluginDatabase
+.objc_class_name_WebPreferences
+.objc_class_name_WebRenderNode
+.objc_class_name_WebResource
+.objc_class_name_WebScriptCallFrame
+.objc_class_name_WebStringTruncator
+.objc_class_name_WebURLsWithTitles
+.objc_class_name_WebView
+_WebActionButtonKey
+_WebActionElementKey
+_WebActionModifierFlagsKey
+_WebActionNavigationTypeKey
+_WebActionOriginalURLKey
+_WebArchivePboardType
+_WebElementDOMNodeKey
+_WebElementFrameKey
+_WebElementImageAltStringKey
+_WebElementImageKey
+_WebElementImageRectKey
+_WebElementImageURLKey
+_WebElementIsSelectedKey
+_WebElementLinkIsLiveKey
+_WebElementLinkLabelKey
+_WebElementLinkTargetFrameKey
+_WebElementLinkTitleKey
+_WebElementLinkURLKey
+_WebHistoryAllItemsRemovedNotification
+_WebHistoryItemChangedNotification
+_WebHistoryItemsAddedNotification
+_WebHistoryItemsDiscardedWhileLoadingNotification
+_WebHistoryItemsKey
+_WebHistoryItemsRemovedNotification
+_WebHistoryLoadedNotification
+_WebHistorySavedNotification
+_WebIconDatabaseDidAddIconNotification
+_WebIconDatabaseDidRemoveAllIconsNotification
+_WebIconDatabaseDirectoryDefaultsKey
+_WebIconDatabaseImportDirectoryDefaultsKey
+_WebIconLargeSize
+_WebIconMediumSize
+_WebIconNotificationUserInfoURLKey
+_WebIconSmallSize
+_WebKitErrorDomain
+_WebKitErrorMIMETypeKey
+_WebKitErrorPlugInNameKey
+_WebKitErrorPlugInPageURLStringKey
+_WebLocalizedString
+_WebMainResourceKey
+_WebPlugInAttributesKey
+_WebPlugInBaseURLKey
+_WebPlugInContainerKey
+_WebPlugInContainingElementKey
+_WebPlugInModeKey
+_WebPlugInShouldLoadMainResourceKey
+_WebPluginWillPresentNativeUserInterfaceNotification
+_WebPreferencesChangedNotification
+_WebReportAssertionFailure
+_WebReportError
+_WebScriptDebugServerDidLoadNotification
+_WebScriptDebugServerProcessBundleIdentifierKey
+_WebScriptDebugServerProcessIdentifierKey
+_WebScriptDebugServerProcessNameKey
+_WebScriptDebugServerQueryNotification
+_WebScriptDebugServerQueryReplyNotification
+_WebScriptDebugServerWillUnloadNotification
+_WebScriptErrorDescriptionKey
+_WebScriptErrorDomain
+_WebScriptErrorLineNumberKey
+_WebURLNamePboardType
+_WebURLPboardType
+_WebViewDidBeginEditingNotification
+_WebViewDidChangeNotification
+_WebViewDidChangeSelectionNotification
+_WebViewDidChangeTypingStyleNotification
+_WebViewDidEndEditingNotification
+_WebViewProgressEstimateChangedNotification
+_WebViewProgressFinishedNotification
+_WebViewProgressStartedNotification
index a7a6c509af8d2d7633fb5ac707ae00b9bd0a2c86..187bfc84b10c35d8b4e6aaba9db575002e41c25d 100644 (file)
@@ -3667,7 +3667,10 @@ static WebFrameView *containingFrameView(NSView *view)
         return;
     }
 
+#ifndef __LP64__
+    // FIXME: we need a new function that works in 64-bit <rdar://problem/5311640>
     (void)HISearchWindowShow((CFStringRef)selectedString, kNilOptions);
+#endif
 }
 
 // Slightly funky method that lets us have one copy of the logic for finding docViews that can do