Title: [239088] trunk/Source
Revision
239088
Author
timothy_hor...@apple.com
Date
2018-12-11 13:54:20 -0800 (Tue, 11 Dec 2018)

Log Message

WebCore shouldn't have a Objective-C class named NSCursor
https://bugs.webkit.org/show_bug.cgi?id=192602
<rdar://problem/46615532>

Reviewed by Wenson Hsieh.

Source/WebCore:

* platform/ios/wak/WAKAppKitStubs.h:
* platform/ios/wak/WAKAppKitStubs.m:
(+[NSCursor setHiddenUntilMouseMoves:]): Deleted.
Get rid of the class.
Also remove a comment that seems to have detached from wherever it's supposed to be.

Source/WebKitLegacy/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView keyDown:keyDown:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView keyDown:]):
(-[WebHTMLView performKeyEquivalent:]):
Only use NSCursor on macOS.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (239087 => 239088)


--- trunk/Source/WebCore/ChangeLog	2018-12-11 21:49:51 UTC (rev 239087)
+++ trunk/Source/WebCore/ChangeLog	2018-12-11 21:54:20 UTC (rev 239088)
@@ -1,3 +1,17 @@
+2018-12-11  Tim Horton  <timothy_hor...@apple.com>
+
+        WebCore shouldn't have a Objective-C class named NSCursor
+        https://bugs.webkit.org/show_bug.cgi?id=192602
+        <rdar://problem/46615532>
+
+        Reviewed by Wenson Hsieh.
+
+        * platform/ios/wak/WAKAppKitStubs.h:
+        * platform/ios/wak/WAKAppKitStubs.m:
+        (+[NSCursor setHiddenUntilMouseMoves:]): Deleted.
+        Get rid of the class.
+        Also remove a comment that seems to have detached from wherever it's supposed to be.
+
 2018-12-11  Chris Dumez  <cdu...@apple.com>
 
         Restrict DeviceMotion / DeviceOrientation APIs to secure contexts

Modified: trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h (239087 => 239088)


--- trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h	2018-12-11 21:49:51 UTC (rev 239087)
+++ trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.h	2018-12-11 21:54:20 UTC (rev 239088)
@@ -23,8 +23,6 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* Unicodes we reserve for function keys on the keyboard,  OpenStep reserves the range 0xF700-0xF8FF for this purpose.  The availability of various keys will be system dependent. */
-
 #ifndef WAKAppKitStubs_h
 #define WAKAppKitStubs_h
 
@@ -205,10 +203,6 @@
     NSSelectingPrevious
 } NSSelectionDirection;
 
-WEBCORE_EXPORT @interface NSCursor : NSObject
-+ (void)setHiddenUntilMouseMoves:(BOOL)flag;
-@end
-
 #endif // TARGET_OS_IPHONE
 
 #endif // WAKAppKitStubs_h

Modified: trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.m (239087 => 239088)


--- trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.m	2018-12-11 21:49:51 UTC (rev 239087)
+++ trunk/Source/WebCore/platform/ios/wak/WAKAppKitStubs.m	2018-12-11 21:54:20 UTC (rev 239088)
@@ -30,11 +30,4 @@
 
 id NSApp = nil;
 
-@implementation NSCursor
-+ (void)setHiddenUntilMouseMoves:(BOOL)flag
-{
-    UNUSED_PARAM(flag);
-}
-@end
-
 #endif // PLATFORM(IOS_FAMILY)

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (239087 => 239088)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2018-12-11 21:49:51 UTC (rev 239087)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2018-12-11 21:54:20 UTC (rev 239088)
@@ -1,3 +1,18 @@
+2018-12-11  Tim Horton  <timothy_hor...@apple.com>
+
+        WebCore shouldn't have a Objective-C class named NSCursor
+        https://bugs.webkit.org/show_bug.cgi?id=192602
+        <rdar://problem/46615532>
+
+        Reviewed by Wenson Hsieh.
+
+        * WebView/WebFrameView.mm:
+        (-[WebFrameView keyDown:keyDown:]):
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView keyDown:]):
+        (-[WebHTMLView performKeyEquivalent:]):
+        Only use NSCursor on macOS.
+
 2018-12-10  Don Olmstead  <don.olmst...@sony.com>
 
         Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm (239087 => 239088)


--- trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm	2018-12-11 21:49:51 UTC (rev 239087)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrameView.mm	2018-12-11 21:54:20 UTC (rev 239088)
@@ -1087,8 +1087,10 @@
     if (callSuper) {
         [super keyDown:event];
     } else {
-        // if we did something useful, get the cursor out of the way
+#if PLATFORM(MAC)
+        // If we did something useful, get the cursor out of the way.
         [NSCursor setHiddenUntilMouseMoves:YES];
+#endif
     }
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (239087 => 239088)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2018-12-11 21:49:51 UTC (rev 239087)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2018-12-11 21:54:20 UTC (rev 239088)
@@ -4976,8 +4976,11 @@
 
     if (callSuper)
         [super keyDown:event];
-    else
+    else {
+#if PLATFORM(MAC)
         [NSCursor setHiddenUntilMouseMoves:YES];
+#endif
+    }
 }
 
 - (void)keyUp:(WebEvent *)event
@@ -5281,9 +5284,11 @@
         if (Frame* frame = core([self _frame]))
             ret = frame->eventHandler().keyEvent(event);
 
-    if (ret)
+    if (ret) {
+#if PLATFORM(MAC)
         [NSCursor setHiddenUntilMouseMoves:YES];
-    else
+#endif
+    } else
         ret = [self _handleStyleKeyEquivalent:event] || [super performKeyEquivalent:event];
 
     [self release];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to