Changeset 21649 in webkit
- Timestamp:
- May 22, 2007 4:21:21 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r21648 r21649 1 2007-05-22 Adele Peterson <adele@apple.com> 2 3 Reviewed by Darin. 4 5 Test for http://bugs.webkit.org/show_bug.cgi?id=13796 6 Crash in [NSInputContext currentInputContext] when you click on this map 7 8 * fast/frames/frame-display-none-focus-expected.txt: Added. 9 * fast/frames/frame-display-none-focus.html: Added. 10 * fast/frames/resources/iframe-focus.html: Added. 11 1 12 2007-05-22 Justin Garcia <justin.garcia@apple.com> 2 13 -
trunk/WebCore/ChangeLog
r21648 r21649 1 2007-05-22 Adele Peterson <adele@apple.com> 2 3 Reviewed by Darin. 4 5 Fix for http://bugs.webkit.org/show_bug.cgi?id=13796 6 Crash in [NSInputContext currentInputContext] when you click on this map 7 8 This is another case of <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts 9 10 Test: fast/frames/frame-display-none-focus.html 11 12 * WebCore.xcodeproj/project.pbxproj: Added ChromeMac.mm 13 * page/Chrome.h: 14 * page/mac/ChromeMac.mm: Added. 15 (WebCore::Chrome::focusNSView): Moved code from Widget::setFocus so it can be used whenever we need to make a view the first responder. 16 * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView): Calls focusNSView. 17 * platform/mac/WidgetMac.mm: (WebCore::Widget::setFocus): Calls focusNSView. 18 1 19 2007-05-22 Justin Garcia <justin.garcia@apple.com> 2 20 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r21633 r21649 2282 2282 AB7170890B3118080017123E /* SearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = AB7170880B3118080017123E /* SearchPopupMenu.h */; }; 2283 2283 AB7170A00B31193B0017123E /* SearchPopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB71709F0B31193B0017123E /* SearchPopupMenuMac.mm */; }; 2284 ABAF22080C03B1C700B0BCF0 /* ChromeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABAF22070C03B1C700B0BCF0 /* ChromeMac.mm */; }; 2284 2285 ABB5419E0ACDDFE4002820EB /* RenderListBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABB5419C0ACDDFE4002820EB /* RenderListBox.cpp */; }; 2285 2286 ABB5419F0ACDDFE4002820EB /* RenderListBox.h in Headers */ = {isa = PBXBuildFile; fileRef = ABB5419D0ACDDFE4002820EB /* RenderListBox.h */; }; … … 5390 5391 AB7170880B3118080017123E /* SearchPopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SearchPopupMenu.h; sourceTree = "<group>"; }; 5391 5392 AB71709F0B31193B0017123E /* SearchPopupMenuMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SearchPopupMenuMac.mm; sourceTree = "<group>"; }; 5393 ABAF22070C03B1C700B0BCF0 /* ChromeMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ChromeMac.mm; sourceTree = "<group>"; }; 5392 5394 ABB5419C0ACDDFE4002820EB /* RenderListBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderListBox.cpp; sourceTree = "<group>"; }; 5393 5395 ABB5419D0ACDDFE4002820EB /* RenderListBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderListBox.h; sourceTree = "<group>"; }; … … 8089 8091 isa = PBXGroup; 8090 8092 children = ( 8093 ABAF22070C03B1C700B0BCF0 /* ChromeMac.mm */, 8091 8094 93C09A7E0B064EEF005ABD4D /* EventHandlerMac.mm */, 8092 8095 A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */, … … 12734 12737 BC4918C80BFEA050009D6316 /* JSHTMLIFrameElement.cpp in Sources */, 12735 12738 BC491B780C023EFD009D6316 /* JSHTMLMarqueeElement.cpp in Sources */, 12739 ABAF22080C03B1C700B0BCF0 /* ChromeMac.mm in Sources */, 12736 12740 ); 12737 12741 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/page/Chrome.h
r20856 r21649 25 25 #include <wtf/Forward.h> 26 26 #include <wtf/RefPtr.h> 27 28 #if PLATFORM(MAC) 29 #ifndef __OBJC__ 30 class NSView; 31 #endif 32 #endif 27 33 28 34 namespace WebCore { … … 98 104 void updateBackingStore(); 99 105 106 #if PLATFORM(MAC) 107 void focusNSView(NSView*); 108 #endif 100 109 private: 101 110 Page* m_page; -
trunk/WebCore/page/mac/EventHandlerMac.mm
r21555 r21649 151 151 void EventHandler::focusDocumentView() 152 152 { 153 BEGIN_BLOCK_OBJC_EXCEPTIONS; 154 if (FrameView* frameView = m_frame->view()) { 155 if (NSView *documentView = frameView->getDocumentView()) { 156 if ([m_frame->bridge() firstResponder] != documentView) 157 [m_frame->bridge() makeFirstResponder:documentView]; 158 } 159 } 160 END_BLOCK_OBJC_EXCEPTIONS; 161 if (Page* page = m_frame->page()) 162 page->focusController()->setFocusedFrame(m_frame); 153 Page* page = m_frame->page(); 154 if (!page) 155 return; 156 157 if (FrameView* frameView = m_frame->view()) 158 if (NSView *documentView = frameView->getDocumentView()) 159 page->chrome()->focusNSView(documentView); 160 161 page->focusController()->setFocusedFrame(m_frame); 163 162 } 164 163 -
trunk/WebCore/platform/mac/WidgetMac.mm
r21632 r21649 33 33 #import "Frame.h" 34 34 #import "GraphicsContext.h" 35 #import "Page.h" 35 36 #import "PlatformMouseEvent.h" 36 37 #import "WebCoreFrameBridge.h" … … 128 129 129 130 NSView *view = [getView() _webcore_effectiveFirstResponder]; 130 WebCoreFrameBridge *bridge = frame->bridge(); 131 id firstResponder = [bridge firstResponder]; 132 if (firstResponder && firstResponder == view) 133 return; 134 135 if (![view window] || ![view superview] || ![view acceptsFirstResponder]) 136 return; 137 138 NSResponder *oldFirstResponder = [bridge firstResponder]; 139 140 [bridge makeFirstResponder:view]; 141 142 // Setting focus can actually cause a style change which might 143 // remove the view from its superview while it's being made 144 // first responder. This confuses AppKit so we must restore 145 // the old first responder. 146 if (![view superview]) 147 [bridge makeFirstResponder:oldFirstResponder]; 148 131 if (Page* page = frame->page()) 132 page->chrome()->focusNSView(view); 133 149 134 END_BLOCK_OBJC_EXCEPTIONS; 150 135 }
Note: See TracChangeset
for help on using the changeset viewer.