| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 return true; | 647 return true; |
| 648 } | 648 } |
| 649 #endif // !OS(DARWIN) | 649 #endif // !OS(DARWIN) |
| 650 | 650 |
| 651 PlatformKeyboardEventBuilder evt(event); | 651 PlatformKeyboardEventBuilder evt(event); |
| 652 | 652 |
| 653 if (handler->keyEvent(evt)) { | 653 if (handler->keyEvent(evt)) { |
| 654 if (WebInputEvent::RawKeyDown == event.type) { | 654 if (WebInputEvent::RawKeyDown == event.type) { |
| 655 // Suppress the next keypress event unless the focused node is a plu
g-in node. | 655 // Suppress the next keypress event unless the focused node is a plu
g-in node. |
| 656 // (Flash needs these keypress events to handle non-US keyboards.) | 656 // (Flash needs these keypress events to handle non-US keyboards.) |
| 657 Node* node = frame->document()->focusedNode(); | 657 Node* node = focusedWebCoreNode(); |
| 658 if (!node || !node->renderer() || !node->renderer()->isEmbeddedObjec
t()) | 658 if (!node || !node->renderer() || !node->renderer()->isEmbeddedObjec
t()) |
| 659 m_suppressNextKeypressEvent = true; | 659 m_suppressNextKeypressEvent = true; |
| 660 } | 660 } |
| 661 return true; | 661 return true; |
| 662 } | 662 } |
| 663 | 663 |
| 664 return keyEventDefault(event); | 664 return keyEventDefault(event); |
| 665 } | 665 } |
| 666 | 666 |
| 667 bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event) | 667 bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event) |
| (...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2792 Document* document = page()->mainFrame()->document(); | 2792 Document* document = page()->mainFrame()->document(); |
| 2793 Element* fullscreenElement = document->webkitCurrentFullScreenElement(); | 2793 Element* fullscreenElement = document->webkitCurrentFullScreenElement(); |
| 2794 if (!fullscreenElement) | 2794 if (!fullscreenElement) |
| 2795 return; | 2795 return; |
| 2796 document->webkitWillExitFullScreenForElement(fullscreenElement); | 2796 document->webkitWillExitFullScreenForElement(fullscreenElement); |
| 2797 document->webkitDidExitFullScreenForElement(fullscreenElement); | 2797 document->webkitDidExitFullScreenForElement(fullscreenElement); |
| 2798 #endif | 2798 #endif |
| 2799 } | 2799 } |
| 2800 | 2800 |
| 2801 } // namespace WebKit | 2801 } // namespace WebKit |
| OLD | NEW |