OLD | NEW |
1 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
10 #include "CSSStyleSelector.h" | 10 #include "CSSStyleSelector.h" |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 } | 625 } |
626 #endif | 626 #endif |
627 | 627 |
628 // It's not clear if we should continue after detecting a capslock keypress. | 628 // It's not clear if we should continue after detecting a capslock keypress. |
629 // I'll err on the side of continuing, which is the pre-existing behaviour. | 629 // I'll err on the side of continuing, which is the pre-existing behaviour. |
630 if (event.windowsKeyCode == VKEY_CAPITAL) | 630 if (event.windowsKeyCode == VKEY_CAPITAL) |
631 handler->capsLockStateMayHaveChanged(); | 631 handler->capsLockStateMayHaveChanged(); |
632 | 632 |
633 PlatformKeyboardEventBuilder evt(event); | 633 PlatformKeyboardEventBuilder evt(event); |
634 | 634 |
635 if (WebInputEvent::RawKeyDown == event.type) { | 635 if (handler->keyEvent(evt)) { |
636 if (handler->keyEvent(evt) && !evt.isSystemKey()) { | 636 if (WebInputEvent::RawKeyDown == event.type && !evt.isSystemKey()) |
637 suppress_next_keypress_event_ = true; | 637 suppress_next_keypress_event_ = true; |
638 return true; | 638 return true; |
639 } | |
640 } else { | |
641 if (handler->keyEvent(evt)) { | |
642 return true; | |
643 } | |
644 } | 639 } |
645 | 640 |
646 return KeyEventDefault(event); | 641 return KeyEventDefault(event); |
647 } | 642 } |
648 | 643 |
649 bool WebViewImpl::AutocompleteHandleKeyEvent(const WebKeyboardEvent& event) { | 644 bool WebViewImpl::AutocompleteHandleKeyEvent(const WebKeyboardEvent& event) { |
650 if (!autocomplete_popup_showing_ || | 645 if (!autocomplete_popup_showing_ || |
651 // Home and End should be left to the text field to process. | 646 // Home and End should be left to the text field to process. |
652 event.windowsKeyCode == VKEY_HOME || | 647 event.windowsKeyCode == VKEY_HOME || |
653 event.windowsKeyCode == VKEY_END) { | 648 event.windowsKeyCode == VKEY_END) { |
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 | 1922 |
1928 return document->focusedNode(); | 1923 return document->focusedNode(); |
1929 } | 1924 } |
1930 | 1925 |
1931 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { | 1926 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { |
1932 IntPoint doc_point( | 1927 IntPoint doc_point( |
1933 page_->mainFrame()->view()->windowToContents(pos)); | 1928 page_->mainFrame()->view()->windowToContents(pos)); |
1934 return page_->mainFrame()->eventHandler()-> | 1929 return page_->mainFrame()->eventHandler()-> |
1935 hitTestResultAtPoint(doc_point, false); | 1930 hitTestResultAtPoint(doc_point, false); |
1936 } | 1931 } |
OLD | NEW |