Title: [95467] trunk/Source/WebKit/mac
Revision
95467
Author
ander...@apple.com
Date
2011-09-19 13:39:15 -0700 (Mon, 19 Sep 2011)

Log Message

Remove -[WebView _selectionChanged] and -[WebView _setTooltip:]
https://bugs.webkit.org/show_bug.cgi?id=68385

Reviewed by Adam Roben.

Move these functions back into the respective clients and remove usesDocumentViews checks.

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::setToolTip):
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::respondToChangedSelection):
* WebView/WebView.mm:
* WebView/WebViewEventHandling.mm:
* WebView/WebViewInternal.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (95466 => 95467)


--- trunk/Source/WebKit/mac/ChangeLog	2011-09-19 20:32:52 UTC (rev 95466)
+++ trunk/Source/WebKit/mac/ChangeLog	2011-09-19 20:39:15 UTC (rev 95467)
@@ -1,5 +1,22 @@
 2011-09-19  Anders Carlsson  <ander...@apple.com>
 
+        Remove -[WebView _selectionChanged] and -[WebView _setTooltip:]
+        https://bugs.webkit.org/show_bug.cgi?id=68385
+
+        Reviewed by Adam Roben.
+
+        Move these functions back into the respective clients and remove usesDocumentViews checks.
+
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::setToolTip):
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::respondToChangedSelection):
+        * WebView/WebView.mm:
+        * WebView/WebViewEventHandling.mm:
+        * WebView/WebViewInternal.h:
+
+2011-09-19  Anders Carlsson  <ander...@apple.com>
+
         Begin removing -[WebView _usesDocumentCalls] from WebView.mm
         https://bugs.webkit.org/show_bug.cgi?id=68383
 

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (95466 => 95467)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm	2011-09-19 20:32:52 UTC (rev 95466)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm	2011-09-19 20:39:15 UTC (rev 95467)
@@ -622,7 +622,9 @@
 
 void WebChromeClient::setToolTip(const String& toolTip, TextDirection)
 {
-    [m_webView _setToolTip:toolTip];
+    NSView<WebDocumentView> *documentView = [[[m_webView _selectedOrMainFrame] frameView] documentView];
+    if ([documentView isKindOfClass:[WebHTMLView class]])
+        [(WebHTMLView *)documentView _setToolTip:toolTip];
 }
 
 void WebChromeClient::print(Frame* frame)

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (95466 => 95467)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2011-09-19 20:32:52 UTC (rev 95466)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2011-09-19 20:39:15 UTC (rev 95467)
@@ -292,7 +292,9 @@
 
 void WebEditorClient::respondToChangedSelection()
 {
-    [m_webView _selectionChanged];
+    NSView<WebDocumentView> *documentView = [[[m_webView _selectedOrMainFrame] frameView] documentView];
+    if ([documentView isKindOfClass:[WebHTMLView class]])
+        [(WebHTMLView *)documentView _selectionChanged];
 
     // FIXME: This quirk is needed due to <rdar://problem/5009625> - We can phase it out once Aperture can adopt the new behavior on their end
     if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_APERTURE_QUIRK) && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Aperture"])

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (95466 => 95467)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2011-09-19 20:32:52 UTC (rev 95466)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2011-09-19 20:39:15 UTC (rev 95467)
@@ -6028,18 +6028,6 @@
     _private->insertionPasteboard = pasteboard;
 }
 
-- (void)_selectionChanged
-{
-    if (_private->usesDocumentViews) {
-        id documentView = [[[self _selectedOrMainFrame] frameView] documentView];
-        if ([documentView isKindOfClass:[WebHTMLView class]])
-            [documentView _selectionChanged];
-        return;
-    }
-
-    // FIXME (Viewless): We'll need code here.
-}
-
 - (Frame*)_mainCoreFrame
 {
     return (_private && _private->page) ? _private->page->mainFrame() : 0;

Modified: trunk/Source/WebKit/mac/WebView/WebViewEventHandling.mm (95466 => 95467)


--- trunk/Source/WebKit/mac/WebView/WebViewEventHandling.mm	2011-09-19 20:32:52 UTC (rev 95466)
+++ trunk/Source/WebKit/mac/WebView/WebViewEventHandling.mm	2011-09-19 20:39:15 UTC (rev 95467)
@@ -225,16 +225,4 @@
     [timer release];
 }
 
-- (void)_setToolTip:(NSString *)toolTip
-{
-    if (_private->usesDocumentViews) {
-        id documentView = [[[self _selectedOrMainFrame] frameView] documentView];
-        if ([documentView isKindOfClass:[WebHTMLView class]])
-            [documentView _setToolTip:toolTip];
-        return;
-    }
-
-    // FIXME (Viewless): Code to handle tooltips needs to move into WebView.
-}
-
 @end

Modified: trunk/Source/WebKit/mac/WebView/WebViewInternal.h (95466 => 95467)


--- trunk/Source/WebKit/mac/WebView/WebViewInternal.h	2011-09-19 20:32:52 UTC (rev 95466)
+++ trunk/Source/WebKit/mac/WebView/WebViewInternal.h	2011-09-19 20:39:15 UTC (rev 95467)
@@ -85,8 +85,6 @@
 - (void)_dispatchDidReceiveIconFromWebFrame:(WebFrame *)webFrame;
 #endif
 
-- (void)_selectionChanged;
-
 #if USE(ACCELERATED_COMPOSITING)
 - (BOOL)_needsOneShotDrawingSynchronization;
 - (void)_setNeedsOneShotDrawingSynchronization:(BOOL)needsSynchronization;
@@ -106,7 +104,6 @@
 - (void)_updateMouseoverWithFakeEvent;
 - (void)_cancelUpdateMouseoverTimer;
 - (void)_stopAutoscrollTimer;
-- (void)_setToolTip:(NSString *)toolTip;
 @end
 
 // FIXME: Temporary way to expose methods that are in the wrong category inside WebView.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to