Changeset 85900 in webkit
- Timestamp:
- May 5, 2011 4:56:19 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r85895 r85900 1 2011-05-05 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 WebKit2 (Mac): Background tabs/windows can force themselves to the front 6 <rdar://problem/9386346> 7 https://bugs.webkit.org/show_bug.cgi?id=60315 8 9 * platform/mac/WidgetMac.mm: 10 (WebCore::Widget::setFocus): 11 It is incorrect for us to call Chrome::focus() here, which could bring a window/tab 12 to the front. Calling focusNSView() was only necessary because in WebKit we must inform 13 the platform widget that the focus has changed. WebKit2 Mac now matches other ports. 14 1 15 2011-05-05 Justin Novosad <junov@chromium.org> 2 16 -
trunk/Source/WebCore/platform/mac/WidgetMac.mm
r85036 r85900 104 104 void Widget::setFocus(bool focused) 105 105 { 106 if (!platformWidget()) 107 return; 108 106 109 if (!focused) 107 110 return; … … 113 116 BEGIN_BLOCK_OBJC_EXCEPTIONS; 114 117 115 // If there's no platformWidget, WK2 is running. The focus() method needs to be used116 // to bring focus to the right view on the UIProcess side.117 118 NSView *view = [platformWidget() _webcore_effectiveFirstResponder]; 118 if (Page* page = frame->page()) { 119 if (!platformWidget()) 120 page->chrome()->focus(); 121 else 122 page->chrome()->focusNSView(view); 123 } 119 if (Page* page = frame->page()) 120 page->chrome()->focusNSView(view); 121 124 122 END_BLOCK_OBJC_EXCEPTIONS; 125 123 }
Note: See TracChangeset
for help on using the changeset viewer.