| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 LocalFrame* frame = focusedCoreFrame(); | 455 LocalFrame* frame = focusedCoreFrame(); |
| 456 if (!frame) | 456 if (!frame) |
| 457 return suppress; | 457 return suppress; |
| 458 | 458 |
| 459 EventHandler& handler = frame->eventHandler(); | 459 EventHandler& handler = frame->eventHandler(); |
| 460 | 460 |
| 461 PlatformKeyboardEventBuilder evt(event); | 461 PlatformKeyboardEventBuilder evt(event); |
| 462 if (!evt.isCharacterKey()) | 462 if (!evt.isCharacterKey()) |
| 463 return true; | 463 return true; |
| 464 | 464 |
| 465 // Accesskeys are triggered by char events and can't be suppressed. | |
| 466 if (handler.handleAccessKey(evt)) | |
| 467 return true; | |
| 468 | |
| 469 // Safari 3.1 does not pass off windows system key messages (WM_SYSCHAR) to | 465 // Safari 3.1 does not pass off windows system key messages (WM_SYSCHAR) to |
| 470 // the eventHandler::keyEvent. We mimic this behavior on all platforms since | 466 // the eventHandler::keyEvent. We mimic this behavior on all platforms since |
| 471 // for now we are converting other platform's key events to windows key | 467 // for now we are converting other platform's key events to windows key |
| 472 // events. | 468 // events. |
| 473 if (evt.isSystemKey()) | 469 if (evt.isSystemKey()) |
| 474 return false; | 470 return false; |
| 475 | 471 |
| 476 if (!suppress && !handler.keyEvent(evt)) | 472 if (!suppress && !handler.keyEvent(evt)) |
| 477 return keyEventDefault(event); | 473 return keyEventDefault(event); |
| 478 | 474 |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 1416 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
| 1421 bool isInitialState) { | 1417 bool isInitialState) { |
| 1422 if (!page()) | 1418 if (!page()) |
| 1423 return; | 1419 return; |
| 1424 | 1420 |
| 1425 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); | 1421 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); |
| 1426 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); | 1422 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); |
| 1427 } | 1423 } |
| 1428 | 1424 |
| 1429 } // namespace blink | 1425 } // namespace blink |
| OLD | NEW |