| Index: webkit/api/src/mac/WebInputEventFactory.mm
|
| diff --git a/webkit/api/src/mac/WebInputEventFactory.mm b/webkit/api/src/mac/WebInputEventFactory.mm
|
| index 74a7a8713a9c89b4a654b2539cc020ecea375260..d618228adee39d8b0ede4f20524b43db2f8dd851 100644
|
| --- a/webkit/api/src/mac/WebInputEventFactory.mm
|
| +++ b/webkit/api/src/mac/WebInputEventFactory.mm
|
| @@ -919,6 +919,14 @@ WebKeyboardEvent WebInputEventFactory::keyboardEvent(NSEvent* event)
|
|
|
| result.timeStampSeconds = [event timestamp];
|
|
|
| + // Windows and Linux set |isSystemKey| if alt is down. WebKit looks at this
|
| + // flag to decide if it should handle a key or not. E.g. alt-left/right
|
| + // shouldn't be used by WebKit to scroll the current page, because we want
|
| + // to get that key back for it to do history navigation. Hence, the
|
| + // corresponding situation on OS X is to set this for cmd key presses.
|
| + if (result.modifiers & WebInputEvent::MetaKey)
|
| + result.isSystemKey = true;
|
| +
|
| return result;
|
| }
|
|
|
| @@ -938,6 +946,15 @@ WebKeyboardEvent WebInputEventFactory::keyboardEvent(wchar_t character,
|
| result.nativeKeyCode = character;
|
| result.text[0] = character;
|
| result.unmodifiedText[0] = character;
|
| +
|
| + // Windows and Linux set |isSystemKey| if alt is down. WebKit looks at this
|
| + // flag to decide if it should handle a key or not. E.g. alt-left/right
|
| + // shouldn't be used by WebKit to scroll the current page, because we want
|
| + // to get that key back for it to do history navigation. Hence, the
|
| + // corresponding situation on OS X is to set this for cmd key presses.
|
| + if (result.modifiers & WebInputEvent::MetaKey)
|
| + result.isSystemKey = true;
|
| +
|
| return result;
|
| }
|
|
|
|
|