Title: [132079] trunk/Source/WebKit2
Revision
132079
Author
[email protected]
Date
2012-10-22 09:28:24 -0700 (Mon, 22 Oct 2012)

Log Message

REGRESSION (r131686): Crash in NSToolTipManager mouseEnteredToolTip
<rdar://problem/12527528> and https://bugs.webkit.org/show_bug.cgi?id=99792

Roll out the tool tip part of r131686 since it still seems to be causing trouble.

* UIProcess/API/mac/WKView.mm:
(-[WKView view:stringForToolTip:point:userData:]): Added this method back.
(-[WKView _wk_toolTipChangedFrom:to:]): Use self as owner again, eliminating the
separate WKToolTipDelegate object.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (132078 => 132079)


--- trunk/Source/WebKit2/ChangeLog	2012-10-22 16:26:25 UTC (rev 132078)
+++ trunk/Source/WebKit2/ChangeLog	2012-10-22 16:28:24 UTC (rev 132079)
@@ -1,3 +1,15 @@
+2012-10-22  Darin Adler  <[email protected]>
+
+        REGRESSION (r131686): Crash in NSToolTipManager mouseEnteredToolTip
+        <rdar://problem/12527528> and https://bugs.webkit.org/show_bug.cgi?id=99792
+
+        Roll out the tool tip part of r131686 since it still seems to be causing trouble.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView view:stringForToolTip:point:userData:]): Added this method back.
+        (-[WKView _wk_toolTipChangedFrom:to:]): Use self as owner again, eliminating the
+        separate WKToolTipDelegate object.
+
 2012-10-22  Christophe Dumez  <[email protected]>
 
         [EFL][WK2] Memory leak in Ewk_Form_Submission_Request::fieldValue()

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (132078 => 132079)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2012-10-22 16:26:25 UTC (rev 132078)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2012-10-22 16:28:24 UTC (rev 132079)
@@ -26,11 +26,6 @@
 #import "config.h"
 #import "WKView.h"
 
-#if USE(DICTATION_ALTERNATIVES) 
-#import <AppKit/NSTextAlternatives.h> 
-#import <AppKit/NSAttributedString.h> 
-#endif
-
 #import "AttributedString.h"
 #import "ColorSpaceData.h"
 #import "DataReference.h"
@@ -90,6 +85,10 @@
 #import <wtf/RefPtr.h>
 #import <wtf/RetainPtr.h>
 
+#if USE(DICTATION_ALTERNATIVES)
+#import <AppKit/NSTextAlternatives.h>
+#endif
+
 @interface NSApplication (WKNSApplicationDetails)
 - (void)speakString:(NSString *)string;
 - (void)_setCurrentEvent:(NSEvent *)event;
@@ -139,12 +138,6 @@
 - (void)_wk_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState;
 @end
 
-@interface WKToolTipDelegate : NSObject {
-    RefPtr<WebPageProxy> _page;
-}
-- (id)initWithPage:(WebPageProxy *)page;
-@end
-
 @interface WKViewData : NSObject {
 @public
     OwnPtr<PageClientImpl> _pageClient;
@@ -217,7 +210,6 @@
     String _promisedFilename;
     String _promisedURL;
 
-    RetainPtr<WKToolTipDelegate> _toolTipDelegate;
     RetainPtr<NSMutableArray> _observers;
 }
 
@@ -2520,6 +2512,11 @@
     [_data->_trackingRectOwner mouseEntered:fakeEvent];
 }
 
+- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
+{
+    return nsStringFromWebCoreString(_page->toolTip());
+}
+
 - (void)_wk_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip
 {
     if (oldToolTip)
@@ -2529,9 +2526,7 @@
         // See radar 3500217 for why we remove all tooltips rather than just the single one we created.
         [self removeAllToolTips];
         NSRect wideOpenRect = NSMakeRect(-100000, -100000, 200000, 200000);
-        if (!_data->_toolTipDelegate)
-            _data->_toolTipDelegate = adoptNS([[WKToolTipDelegate alloc] initWithPage:_data->_page.get()]);
-        _data->_lastToolTipTag = [self addToolTipRect:wideOpenRect owner:_data->_toolTipDelegate.get() userData:NULL];
+        _data->_lastToolTipTag = [self addToolTipRect:wideOpenRect owner:self userData:NULL];
         [self _wk_sendToolTipMouseEntered];
     }
 }
@@ -3198,21 +3193,3 @@
 }
 
 @end
-
-@implementation WKToolTipDelegate
-
-- (id)initWithPage:(WebPageProxy *)page
-{
-    self = [super init];
-    if (!self)
-        return nil;
-    _page = page;
-    return self;
-}
-
-- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
-{
-    return nsStringFromWebCoreString(_page->toolTip());
-}
-
-@end
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to