Changeset 19790 in webkit
- Timestamp:
- Feb 22, 2007 7:45:40 AM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r19789 r19790 1 2007-02-22 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Maciej. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=12804 6 REGRESSION (r19043-r19063): suggestion popup doesn't work after pressing Option+Esc 7 8 This patch also fixes a bug where using the arrow keys while 9 the suggestion popup is open moves the caret instead of changing the 10 selection in the popup (for up/down) or accepting the selection and 11 closing the popup (for left/right). 12 13 * WebView/WebHTMLView.mm: 14 (-[WebHTMLView keyDown:]): Changed to close the popup only if it was open 15 before the current event, so that the Option-Esc that opens the popup will 16 not close it immediately. 17 (-[WebHTMLView _interceptEditingKeyEvent:]): Give the completion popup a 18 chance to intercept keydown events. 19 (-[WebTextCompleteController popupWindowIsOpen]): Added. Returns whether the 20 suggestion popup is open. 21 1 22 2007-02-22 Mitz Pettel <mitz@webkit.org> 2 23 -
trunk/WebKit/WebView/WebHTMLView.mm
r19789 r19790 270 270 - (void)doCompletion; 271 271 - (void)endRevertingChange:(BOOL)revertChange moveLeft:(BOOL)goLeft; 272 - (BOOL)popupWindowIsOpen; 272 273 - (BOOL)filterKeyDown:(NSEvent *)event; 273 274 - (void)_reflectSelection; … … 3383 3384 _private->keyDownEvent = [event retain]; 3384 3385 3386 BOOL completionPopupWasOpen = _private->compController && [_private->compController popupWindowIsOpen]; 3385 3387 if (!eventWasSentToWebCore && core([self _frame])->eventHandler()->keyEvent(event)) { 3386 // WebCore processed a key event, bail on any outstanding complete: UI3387 [_private->compController endRevertingChange:YES moveLeft:NO];3388 } else if (_private->compController && [_private->compController filterKeyDown:event]) {3389 // Consumed by complete: popup window3390 } else {3388 // WebCore processed a key event, bail on any preexisting complete: UI 3389 if (completionPopupWasOpen) 3390 [_private->compController endRevertingChange:YES moveLeft:NO]; 3391 } else if (!_private->compController || ![_private->compController filterKeyDown:event]) { 3392 // Not consumed by complete: popup window 3391 3393 [_private->compController endRevertingChange:YES moveLeft:NO]; 3392 3394 callSuper = YES; … … 5232 5234 parameters.eventWasHandled = false; 5233 5235 if (const PlatformKeyboardEvent* platformEvent = event->keyEvent()) { 5236 NSEvent *macEvent = platformEvent->macEvent(); 5237 if ([macEvent type] == NSKeyDown && [_private->compController filterKeyDown:macEvent]) 5238 return true; 5234 5239 parameters.event = event; 5235 5240 _private->interpretKeyEventsParameters = ¶meters; 5236 [self interpretKeyEvents:[NSArray arrayWithObject: platformEvent->macEvent()]];5241 [self interpretKeyEvents:[NSArray arrayWithObject:macEvent]]; 5237 5242 _private->interpretKeyEventsParameters = 0; 5238 5243 } … … 5766 5771 } 5767 5772 // else there is no state to abort if the window was not up 5773 } 5774 5775 - (BOOL)popupWindowIsOpen 5776 { 5777 return _popupWindow != nil; 5768 5778 } 5769 5779
Note: See TracChangeset
for help on using the changeset viewer.