Changeset 23813 in webkit
- Timestamp:
- Jun 27, 2007 1:19:53 AM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r23805 r23813 1 2007-06-26 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Maciej. 4 5 Hopefully fix remainder of the IME issues on Mac. 6 We now assume that the IME silently consumes any event given 7 to it during text composition, and only override this assumption 8 if the NSTextInput or NSResponder callbacks are made. 9 10 This prevents us from treating those events that the IME has 11 consumed internally (eg. candidate window navigation) as unhandled 12 events that should be bubbled. 13 14 This fixes: 15 <rdar://problem/5107538> Major problems handling key press event with non-english Input Methods 16 <rdar://problem/4196249> REGRESSION: Mail: Inputting space (U+0020) with IM deletes subsequent line breaks on Mail.app 17 <rdar://problem/5015544> REGRESSION: Reverse conversion keyboard command does not work in Safari. 18 <rdar://problem/5045121> REGRESSION: Inline is confirmed after press left/right arrow keys, happens in Mail but not in TextEdit. 19 <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC) 20 <rdar://problem/5085781> REGRESSION: Active input area lost "selected" highlight 21 <rdar://problem/5094200> space key pressed to close the associated words candidate window gets inserted as text 22 <rdar://problem/5228294> Candidate item for character matrix is sometimes skipped 23 24 * WebKit.xcodeproj/project.pbxproj: 25 * WebView/WebHTMLView.mm: 26 (-[WebHTMLView launchKeyEvent:]): 27 (-[WebHTMLView keyDown:]): 28 (-[WebHTMLView keyUp:]): 29 (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): 30 (-[WebHTMLView unmarkText]): 31 (-[WebHTMLView setMarkedText:selectedRange:]): 32 (-[WebHTMLView doCommandBySelector:]): 33 (-[WebHTMLView insertText:]): 34 1 35 2007-06-26 Jim Correia <jim.correia@pobox.com> 2 36 -
trunk/WebKit/WebKit.xcodeproj/project.pbxproj
r23754 r23813 1331 1331 productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; 1332 1332 projectDirPath = ""; 1333 projectRoot = "";1334 1333 targets = ( 1335 1334 9398100A0824BF01008DF038 /* WebKit */, -
trunk/WebKit/WebView/WebHTMLView.mm
r23774 r23813 302 302 BOOL eventWasHandled; 303 303 BOOL shouldSaveCommand; 304 // The Input Method may consume an event and not tell us, in 305 // which case we should not bubble the event up the DOM 306 BOOL consumedByIM; 304 307 }; 305 308 … … 3272 3275 - (void)keyDown:(NSEvent *)event 3273 3276 { 3277 RetainPtr<WebHTMLView> selfProtector = self; 3274 3278 BOOL eventWasSentToWebCore = (_private->keyDownEvent == event); 3275 3276 [self retain];3277 3279 3278 3280 BOOL callSuper = NO; … … 3295 3297 else 3296 3298 [NSCursor setHiddenUntilMouseMoves:YES]; 3297 3298 [self release];3299 3299 } 3300 3300 … … 5137 5137 parameters.eventWasHandled = false; 5138 5138 parameters.shouldSaveCommand = shouldSave; 5139 // If we're performing input composition assume that the IM has consumed the event, 5140 // and only change this assumption in one of the NSTextInput/Responder callbacks is used. 5141 parameters.consumedByIM = [self hasMarkedText]; 5139 5142 5140 5143 if (const PlatformKeyboardEvent* platformEvent = event->keyEvent()) { … … 5160 5163 _private->interpretKeyEventsParameters = 0; 5161 5164 } 5162 return parameters.eventWasHandled ;5165 return parameters.eventWasHandled || parameters.consumedByIM; 5163 5166 } 5164 5167 … … 5308 5311 _private->interpretKeyEventsParameters = 0; 5309 5312 5310 if (parameters) 5313 if (parameters) { 5311 5314 parameters->eventWasHandled = YES; 5312 5315 parameters->consumedByIM = NO; 5316 } 5317 5313 5318 if (Frame* coreFrame = core([self _frame])) 5314 5319 coreFrame->editor()->unmarkText(); … … 5361 5366 _private->interpretKeyEventsParameters = 0; 5362 5367 5363 if (parameters) 5368 if (parameters) { 5364 5369 parameters->eventWasHandled = YES; 5365 5370 parameters->consumedByIM = NO; 5371 } 5372 5366 5373 Frame* coreFrame = core([self _frame]); 5367 5374 if (!coreFrame) … … 5409 5416 - (void)doCommandBySelector:(SEL)selector 5410 5417 { 5411 if (selector == @selector(noop:))5412 return;5413 5414 5418 // Use pointer to get parameters passed to us by the caller of interpretKeyEvents. 5415 5419 // The same call to interpretKeyEvents can do more than one command. 5416 5420 WebHTMLViewInterpretKeyEventsParameters* parameters = _private->interpretKeyEventsParameters; 5421 if (parameters) 5422 parameters->consumedByIM = NO; 5423 5424 if (selector == @selector(noop:)) 5425 return; 5417 5426 5418 5427 KeyboardEvent* event = parameters ? parameters->event : 0; … … 5461 5470 WebHTMLViewInterpretKeyEventsParameters* parameters = _private->interpretKeyEventsParameters; 5462 5471 _private->interpretKeyEventsParameters = 0; 5472 if (parameters) 5473 parameters->consumedByIM = NO; 5463 5474 5464 5475 // We don't support inserting an attributed string but input methods don't appear to require this.
Note: See TracChangeset
for help on using the changeset viewer.