Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2012823003: Move IME related functions from WebFrame to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add CHECK in TextInputController::HasMarkedText() Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 if (event.windowsKeyCode == VKEY_SPACE) { 904 if (event.windowsKeyCode == VKEY_SPACE) {
905 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PR IOR : VKEY_NEXT); 905 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PR IOR : VKEY_NEXT);
906 return scrollViewWithKeyboard(keyCode, event.modifiers); 906 return scrollViewWithKeyboard(keyCode, event.modifiers);
907 } 907 }
908 break; 908 break;
909 case WebInputEvent::RawKeyDown: 909 case WebInputEvent::RawKeyDown:
910 if (event.modifiers == WebInputEvent::ControlKey) { 910 if (event.modifiers == WebInputEvent::ControlKey) {
911 switch (event.windowsKeyCode) { 911 switch (event.windowsKeyCode) {
912 #if !OS(MACOSX) 912 #if !OS(MACOSX)
913 case 'A': 913 case 'A':
914 WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebStrin g::fromUTF8("SelectAll")); 914 WebFrame::fromFrame(focusedCoreFrame())->toWebLocalFrame()->exec uteCommand(WebString::fromUTF8("SelectAll"));
915 return WebInputEventResult::HandledSystem; 915 return WebInputEventResult::HandledSystem;
916 case VKEY_INSERT: 916 case VKEY_INSERT:
917 case 'C': 917 case 'C':
918 WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebStrin g::fromUTF8("Copy")); 918 WebFrame::fromFrame(focusedCoreFrame())->toWebLocalFrame()->exec uteCommand(WebString::fromUTF8("Copy"));
919 return WebInputEventResult::HandledSystem; 919 return WebInputEventResult::HandledSystem;
920 #endif 920 #endif
921 // Match FF behavior in the sense that Ctrl+home/end are the only Ct rl 921 // Match FF behavior in the sense that Ctrl+home/end are the only Ct rl
922 // key combinations which affect scrolling. Safari is buggy in the 922 // key combinations which affect scrolling. Safari is buggy in the
923 // sense that it scrolls the page for all Ctrl+scrolling key 923 // sense that it scrolls the page for all Ctrl+scrolling key
924 // combinations. For e.g. Ctrl+pgup/pgdn/up/down, etc. 924 // combinations. For e.g. Ctrl+pgup/pgdn/up/down, etc.
925 case VKEY_HOME: 925 case VKEY_HOME:
926 case VKEY_END: 926 case VKEY_END:
927 break; 927 break;
928 default: 928 default:
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1118
1119 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) 1119 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame)
1120 { 1120 {
1121 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); 1121 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame));
1122 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1122 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1123 result.setToShadowHostIfInUserAgentShadowRoot(); 1123 result.setToShadowHostIfInUserAgentShadowRoot();
1124 return result; 1124 return result;
1125 } 1125 }
1126 1126
1127 } // namespace blink 1127 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/text_input_client_observer.cc ('k') | third_party/WebKit/Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698