Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
2009-03-05 Adele Peterson <adele@apple.com>
        Reviewed by Darin Adler.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
        <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
        <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field

        * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
        If WebKit does not support the command, we need to pass the selector to super.  In this case,
        we'll consider the event not to be handled.  This is not perfect because in theory, [super doCommandBySelector:]
        can do some action that would cause WebKit to need to consider the event handled.  But in practice, I've found no
        example of that happening and causing broken behavior.



Canonical link: https://commits.webkit.org/33537@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Adele Peterson committed Mar 6, 2009
1 parent 7125387 commit 0e9c1d1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
14 changes: 14 additions & 0 deletions WebKit/mac/ChangeLog
@@ -1,3 +1,17 @@
2009-03-05 Adele Peterson <adele@apple.com>

Reviewed by Darin Adler.

Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
<rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
<rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field

* WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
If WebKit does not support the command, we need to pass the selector to super. In this case,
we'll consider the event not to be handled. This is not perfect because in theory, [super doCommandBySelector:]
can do some action that would cause WebKit to need to consider the event handled. But in practice, I've found no
example of that happening and causing broken behavior.

2009-03-04 Mark Rowe <mrowe@apple.com>

Reviewed by Dan Bernstein.
Expand Down
14 changes: 6 additions & 8 deletions WebKit/mac/WebView/WebHTMLView.mm
Expand Up @@ -5375,18 +5375,16 @@ - (void)doCommandBySelector:(SEL)selector
Editor::Command command = [self coreCommandBySelector:selector];
if (command.isSupported())
eventWasHandled = command.execute(event);
else if ([self _canEdit]) {
// If the command is unsupported and the WebHTMLView is editable, then pass the
// selector to super and say that the event was handled. If the WebHTMLView is
// not editable, then do not say that the event was handled. This is important
// because of selectors like scrollPageDown:, which come as input method events
// when editing is enabled but keyboard events when it is not. These events are
// handled by the next responder in the responder chain.
else {
_private->selectorForDoCommandBySelector = selector;
// If WebKit does not support this command, we need to pass the selector to super.
[super doCommandBySelector:selector];
_private->selectorForDoCommandBySelector = 0;
} else
// In theory, [super doCommandBySelector:] can do some action that would cause WebKit
// to need to consider the event handled. But in practice, I've found no
// example of that happening and causing broken behavior.
eventWasHandled = false;
}
}

if (parameters)
Expand Down

0 comments on commit 0e9c1d1

Please sign in to comment.