Changeset 21346 in webkit


Ignore:
Timestamp:
May 9, 2007 7:28:52 PM (17 years ago)
Author:
oliver
Message:

2007-05-09 Adele Peterson <adele@apple.com>

Reviewed by Oliver.


Re-applying fix for <rdar://problem/5107538> REGRESSION: Page scroll when selecting characters from inline input candidate window by arrow buttons
http://bugs.webkit.org/show_bug.cgi?id=13263


We don't need to call interpretKeyEvents for cmd-key events as
they events will be interpreted by performKeyEquivalent.

  • WebView/WebHTMLView.mm: (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): (-[WebHTMLView doCommandBySelector:]):
Location:
trunk/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r21323 r21346  
     12007-05-09  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Oliver.
     4       
     5        Re-applying fix for <rdar://problem/5107538> REGRESSION: Page scroll when selecting characters from inline input candidate window by arrow buttons
     6        http://bugs.webkit.org/show_bug.cgi?id=13263
     7       
     8        We don't need to call interpretKeyEvents for cmd-key events as
     9        they events will be interpreted by performKeyEquivalent.
     10
     11        * WebView/WebHTMLView.mm:
     12        (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]):
     13        (-[WebHTMLView doCommandBySelector:]):
     14
    1152007-05-09  Mark Rowe  <mrowe@apple.com>
    216
  • trunk/WebKit/WebView/WebHTMLView.mm

    r21306 r21346  
    52805280        _private->interpretKeyEventsParameters = &parameters;
    52815281        KeypressCommand command = event->keypressCommand();
    5282         bool hasKeypressCommand = !command.commandNames.isEmpty() || !command.text.isEmpty();
    5283 
    5284         if (parameters.shouldSaveCommand || !hasKeypressCommand)
    5285             [self interpretKeyEvents:[NSArray arrayWithObject:macEvent]];
    5286         else {
     5282
     5283        if (parameters.shouldSaveCommand || command.isEmpty()) {
     5284            // We don't need to call interpretKeyEvents for cmd-key events.  These events will be interpreted by performKeyEquivalent
     5285            if (!event->metaKey()) {
     5286                [self interpretKeyEvents:[NSArray arrayWithObject:macEvent]];
     5287                // If we have no command after calling interpretKeyEvents, we assume the input method handled the key.
     5288                if (event->keypressCommand().isEmpty())
     5289                    parameters.eventWasHandled = true;
     5290            }
     5291        } else {
    52875292            if (!command.text.isEmpty())
    52885293                [self insertText:command.text];
     
    55085513- (void)doCommandBySelector:(SEL)selector
    55095514{
    5510     if (selector == @selector(noop:))
    5511         return;
    5512 
    55135515    // Use pointer to get parameters passed to us by the caller of interpretKeyEvents.
    55145516    // The same call to interpretKeyEvents can do more than one command.
     
    55225524        command.commandNames.append(NSStringFromSelector(selector));
    55235525        event->setKeypressCommand(command);
    5524     } else {
     5526    } else if (selector != @selector(noop:)) {
    55255527        // Make sure that only direct calls to doCommandBySelector: see the parameters by setting to 0.
    55265528        _private->interpretKeyEventsParameters = 0;
Note: See TracChangeset for help on using the changeset viewer.