Changeset 167547 in webkit
- Timestamp:
- Apr 19, 2014 2:11:06 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r167528 r167547 1 2014-04-19 Darin Adler <darin@apple.com> 2 3 [Mac] WebView adjusts the cursor even when another window is in front 4 https://bugs.webkit.org/show_bug.cgi?id=131898 5 rdar://problem/14619911 6 7 Reviewed by Dan Bernstein. 8 9 * WebCoreSupport/WebChromeClient.mm: 10 (WebChromeClient::setCursor): Added a check that the window is under the cursor 11 and do nothing if it's not. 12 1 13 2014-04-18 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r165676 r167547 762 762 763 763 #if !PLATFORM(IOS) 764 764 765 void WebChromeClient::setCursor(const WebCore::Cursor& cursor) 765 766 { 767 // FIXME: Would be nice to share this code with WebKit2's PageClientImpl. 768 766 769 if ([NSApp _cursorRectCursor]) 770 return; 771 772 if (!m_webView) 773 return; 774 775 NSWindow *window = [m_webView window]; 776 if (!window) 777 return; 778 779 if ([window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]) 767 780 return; 768 781 … … 770 783 if ([NSCursor currentCursor] == platformCursor) 771 784 return; 785 772 786 [platformCursor set]; 773 787 } … … 777 791 [NSCursor setHiddenUntilMouseMoves:hiddenUntilMouseMoves]; 778 792 } 793 779 794 #endif 780 795 -
trunk/Source/WebKit2/ChangeLog
r167543 r167547 1 2014-04-19 Darin Adler <darin@apple.com> 2 3 [Mac] WebView adjusts the cursor even when another window is in front 4 https://bugs.webkit.org/show_bug.cgi?id=131898 5 rdar://problem/14619911 6 7 Reviewed by Dan Bernstein. 8 9 * UIProcess/API/mac/WKView.mm: 10 (-[WKView _setCursor:]): Deleted. Moved the code all into PageClientImpl, since none of it 11 interacts with anything special about a WKView. 12 13 * UIProcess/API/mac/WKViewInternal.h: Deleted the _setCursor: method. 14 15 * UIProcess/mac/PageClientImpl.mm: 16 (WebKit::PageClientImpl::setCursor): Added a check that the window is under the cursor 17 and do nothing if it's not. 18 1 19 2014-04-19 Dan Bernstein <mitz@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r167253 r167547 2776 2776 } 2777 2777 2778 - (void)_setCursor:(NSCursor *)cursor2779 {2780 if ([NSCursor currentCursor] == cursor)2781 return;2782 [cursor set];2783 }2784 2785 2778 - (void)_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState 2786 2779 { -
trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
r166466 r167547 72 72 - (void)_preferencesDidChange; 73 73 - (void)_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip; 74 - (void)_setCursor:(NSCursor *)cursor;75 74 - (void)_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState; 76 75 - (void)_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled; -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
r167262 r167547 316 316 void PageClientImpl::setCursor(const WebCore::Cursor& cursor) 317 317 { 318 if (![NSApp _cursorRectCursor]) 319 [m_wkView _setCursor:cursor.platformCursor()]; 318 // FIXME: Would be nice to share this code with WebKit1's WebChromeClient. 319 320 if ([NSApp _cursorRectCursor]) 321 return; 322 323 if (!m_wkView) 324 return; 325 326 NSWindow *window = [m_wkView window]; 327 if (!window) 328 return; 329 330 if ([window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]) 331 return; 332 333 NSCursor *platformCursor = cursor.platformCursor(); 334 if ([NSCursor currentCursor] == platformCursor) 335 return; 336 337 [platformCursor set]; 320 338 } 321 339
Note: See TracChangeset
for help on using the changeset viewer.