Changeset 167700 in webkit
- Timestamp:
- Apr 22, 2014 11:11:22 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r167694 r167700 1 2014-04-22 Ryosuke Niwa <rniwa@webkit.org> 2 3 Cursor doesn't change back to pointer when leaving the Safari window 4 https://bugs.webkit.org/show_bug.cgi?id=132038 5 6 Reviewed by Alexey Proskuryakov. 7 8 r147739 incorrectly added an early exit in EventHandler::selectCursor when hit test result didn't have 9 any node associated with it. Since we will hit this code when the cursor is outside of the WebView, 10 we still need to take the CURSOR_AUTO path as did the code before r147739. 11 12 No new test is added since this behavior can't be tested in DRT or WTR. 13 14 * page/EventHandler.cpp: 15 (WebCore::EventHandler::selectCursor): 16 1 17 2014-04-22 Zalan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/page/EventHandler.cpp
r167688 r167700 1312 1312 1313 1313 Node* node = result.targetNode(); 1314 if (!node) 1315 return NoCursorChange; 1316 1317 auto renderer = node->renderer(); 1314 auto renderer = node ? node->renderer() : 0; 1318 1315 RenderStyle* style = renderer ? &renderer->style() : nullptr; 1319 1316 bool horizontalText = !style || style->isHorizontalWritingMode(); … … 1387 1384 switch (style ? style->cursor() : CURSOR_AUTO) { 1388 1385 case CURSOR_AUTO: { 1389 bool editable = node ->hasEditableStyle();1386 bool editable = node && node->hasEditableStyle(); 1390 1387 1391 1388 if (useHandCursor(node, result.isOverLink(), shiftKey)) -
trunk/Source/WebKit/mac/ChangeLog
r167686 r167700 1 2014-04-22 Ryosuke Niwa <rniwa@webkit.org> 2 3 Cursor doesn't change back to pointer when leaving the Safari window 4 https://bugs.webkit.org/show_bug.cgi?id=132038 5 6 Reviewed by Alexey Proskuryakov. 7 8 Since the cursor type is now updated asynchronously after r147739, 9 [window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0] 10 evalutes to false depending on how fast cursor is moving. 11 12 Instead, check whether the NSWindow of the WebView is the key window or not since 13 key window appears to control the cursor style in Cocoa as far as I've tested: 14 https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html 15 16 * WebCoreSupport/WebChromeClient.mm: 17 (WebChromeClient::setCursor): 18 1 19 2014-04-22 Commit Queue <commit-queue@webkit.org> 2 20 -
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r167547 r167700 774 774 775 775 NSWindow *window = [m_webView window]; 776 if (!window) 777 return; 778 779 if ([window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]) 776 if (!window || ![window isKeyWindow]) 780 777 return; 781 778 -
trunk/Source/WebKit2/ChangeLog
r167699 r167700 1 2014-04-22 Ryosuke Niwa <rniwa@webkit.org> 2 3 Cursor doesn't change back to pointer when leaving the Safari window 4 https://bugs.webkit.org/show_bug.cgi?id=132038 5 6 Reviewed by Alexey Proskuryakov. 7 8 Since the cursor type is now updated asynchronously after r147739, 9 [window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0] 10 evalutes to false depending on how fast cursor is moving. 11 12 Instead, check whether the NSWindow of the WebView is the key window or not since 13 key window appears to control the cursor style in Cocoa as far as I've tested: 14 https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html 15 16 * UIProcess/mac/PageClientImpl.mm: 17 (WebKit::PageClientImpl::setCursor): 18 1 19 2014-04-22 Yongjun Zhang <yongjun_zhang@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
r167547 r167700 325 325 326 326 NSWindow *window = [m_wkView window]; 327 if (!window) 328 return; 329 330 if ([window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]) 327 if (!window || ![window isKeyWindow]) 331 328 return; 332 329
Note: See TracChangeset
for help on using the changeset viewer.