Changeset 18331 in webkit
- Timestamp:
- Dec 19, 2006, 5:07:15 PM (18 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r18324 r18331 1 2006-12-19 John Sullivan <sullivan@apple.com> 2 3 Reviewed by Darin 4 5 - fix for unrepro infinite recursion bug: 6 <rdar://problem/4448181> CrashTracer: 154 crashes in Safari at com.apple.AppKit: 7 -[NSView isDescendantOf:] + 24; infinite recursion in makeFirstResponder logic 8 9 * WebView/WebView.mm: 10 added becomingFirstResponder BOOL to private struct 11 (-[WebView becomeFirstResponder]): 12 use _private->becomingFirstResponder to guard against infinite recursion; complain on 13 debug builds if we run into this problem 14 1 15 2006-12-19 Timothy Hatcher <timothy@apple.com> 2 16 -
trunk/WebKit/WebView/WebView.mm
r18231 r18331 295 295 BOOL tabKeyCyclesThroughElements; 296 296 BOOL tabKeyCyclesThroughElementsChanged; 297 BOOL becomingFirstResponder; 297 298 298 299 NSColor *backgroundColor; … … 2483 2484 - (BOOL)becomeFirstResponder 2484 2485 { 2486 if (_private->becomingFirstResponder) { 2487 // Fix for unrepro infinite recursion reported in radar 4448181. If we hit this assert on 2488 // a debug build, we should figure out what causes the problem and do a better fix. 2489 ASSERT_NOT_REACHED(); 2490 return NO; 2491 } 2492 2485 2493 // This works together with setNextKeyView to splice the WebView into 2486 2494 // the key loop similar to the way NSScrollView does this. Note that … … 2492 2500 NSView *previousValidKeyView = [self previousValidKeyView]; 2493 2501 if ((previousValidKeyView != self) && (previousValidKeyView != mainFrameView)) { 2502 _private->becomingFirstResponder = YES; 2494 2503 [window makeFirstResponder:previousValidKeyView]; 2504 _private->becomingFirstResponder = NO; 2495 2505 return YES; 2496 2506 } else { … … 2500 2510 2501 2511 if ([mainFrameView acceptsFirstResponder]) { 2512 _private->becomingFirstResponder = YES; 2502 2513 [window makeFirstResponder:mainFrameView]; 2514 _private->becomingFirstResponder = NO; 2503 2515 return YES; 2504 2516 }
Note:
See TracChangeset
for help on using the changeset viewer.