Title: [207483] trunk/Source/WebKit/mac
Revision
207483
Author
wenson_hs...@apple.com
Date
2016-10-18 13:30:53 -0700 (Tue, 18 Oct 2016)

Log Message

Showing and hiding candidates list is very distracting after selecting word
https://bugs.webkit.org/show_bug.cgi?id=163609
<rdar://problem/28747712>

Reviewed by Tim Horton.

Introduce WebView hooks for mousedown and mouseup. See radar for more details.

* WebView/WebHTMLView.mm:
(-[WebHTMLView mouseDown:mouseDown:]):
(-[WebHTMLView mouseUp:mouseUp:]):
* WebView/WebView.mm:
(-[WebView prepareForMouseDown]):
(-[WebView prepareForMouseUp]):
* WebView/WebViewInternal.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (207482 => 207483)


--- trunk/Source/WebKit/mac/ChangeLog	2016-10-18 20:22:58 UTC (rev 207482)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-10-18 20:30:53 UTC (rev 207483)
@@ -1,3 +1,21 @@
+2016-10-18  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Showing and hiding candidates list is very distracting after selecting word
+        https://bugs.webkit.org/show_bug.cgi?id=163609
+        <rdar://problem/28747712>
+
+        Reviewed by Tim Horton.
+
+        Introduce WebView hooks for mousedown and mouseup. See radar for more details.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView mouseDown:mouseDown:]):
+        (-[WebHTMLView mouseUp:mouseUp:]):
+        * WebView/WebView.mm:
+        (-[WebView prepareForMouseDown]):
+        (-[WebView prepareForMouseUp]):
+        * WebView/WebViewInternal.h:
+
 2016-10-17  Anders Carlsson  <ander...@apple.com>
 
         Move some history specific HistoryItem code to WebHistoryItem

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (207482 => 207483)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2016-10-18 20:22:58 UTC (rev 207482)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2016-10-18 20:30:53 UTC (rev 207483)
@@ -4502,6 +4502,8 @@
 - (void)mouseDown:(WebEvent *)event
 #endif
 {
+    [[self _webView] prepareForMouseDown];
+
 #if !PLATFORM(IOS)
     // There's a chance that responding to this event will run a nested event loop, and
     // fetching a new event might release the old one. Retaining and then autoreleasing
@@ -4721,6 +4723,8 @@
 - (void)mouseUp:(WebEvent *)event
 #endif
 {
+    [[self _webView] prepareForMouseUp];
+
 #if !PLATFORM(IOS)
     // There's a chance that responding to this event will run a nested event loop, and
     // fetching a new event might release the old one. Retaining and then autoreleasing

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (207482 => 207483)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2016-10-18 20:22:58 UTC (rev 207482)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2016-10-18 20:30:53 UTC (rev 207483)
@@ -6752,6 +6752,14 @@
 {
 }
 
+- (void)prepareForMouseDown
+{
+}
+
+- (void)prepareForMouseUp
+{
+}
+
 - (void)showCandidates:(NSArray *)candidates forString:(NSString *)string inRect:(NSRect)rectOfTypedString forSelectedRange:(NSRange)range view:(NSView *)view completionHandler:(void (^)(NSTextCheckingResult *acceptedCandidate))completionBlock
 {
 }

Modified: trunk/Source/WebKit/mac/WebView/WebViewInternal.h (207482 => 207483)


--- trunk/Source/WebKit/mac/WebView/WebViewInternal.h	2016-10-18 20:22:58 UTC (rev 207482)
+++ trunk/Source/WebKit/mac/WebView/WebViewInternal.h	2016-10-18 20:30:53 UTC (rev 207483)
@@ -296,6 +296,8 @@
 @end
 
 @interface WebView (WebUpdateWebViewAdditions)
+- (void)prepareForMouseUp;
+- (void)prepareForMouseDown;
 - (void)updateWebViewAdditions;
 - (void)webViewAdditionsWillDestroyView;
 - (id)candidateList;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to