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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 68303004: [oilpan] Move EventHandler to the heap (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 #endif 964 #endif
965 965
966 // Give Autocomplete a chance to consume the key events it is interested in. 966 // Give Autocomplete a chance to consume the key events it is interested in.
967 if (autocompleteHandleKeyEvent(event)) 967 if (autocompleteHandleKeyEvent(event))
968 return true; 968 return true;
969 969
970 RefPtr<Frame> frame = focusedWebCoreFrame(); 970 RefPtr<Frame> frame = focusedWebCoreFrame();
971 if (!frame) 971 if (!frame)
972 return false; 972 return false;
973 973
974 EventHandler* handler = frame->eventHandler(); 974 HANDLE(EventHandler) handler = frame->eventHandler();
975 if (!handler) 975 if (!handler)
976 return keyEventDefault(event); 976 return keyEventDefault(event);
977 977
978 #if !OS(DARWIN) 978 #if !OS(DARWIN)
979 const WebInputEvent::Type contextMenuTriggeringEventType = 979 const WebInputEvent::Type contextMenuTriggeringEventType =
980 #if OS(WINDOWS) 980 #if OS(WINDOWS)
981 WebInputEvent::KeyUp; 981 WebInputEvent::KeyUp;
982 #elif OS(UNIX) 982 #elif OS(UNIX)
983 WebInputEvent::RawKeyDown; 983 WebInputEvent::RawKeyDown;
984 #endif 984 #endif
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event) ); 1076 return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event) );
1077 #if ENABLE(PAGE_POPUP) 1077 #if ENABLE(PAGE_POPUP)
1078 if (m_pagePopup) 1078 if (m_pagePopup)
1079 return m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event)); 1079 return m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
1080 #endif 1080 #endif
1081 1081
1082 Frame* frame = focusedWebCoreFrame(); 1082 Frame* frame = focusedWebCoreFrame();
1083 if (!frame) 1083 if (!frame)
1084 return suppress; 1084 return suppress;
1085 1085
1086 EventHandler* handler = frame->eventHandler(); 1086 HANDLE(EventHandler) handler = frame->eventHandler();
1087 if (!handler) 1087 if (!handler)
1088 return suppress || keyEventDefault(event); 1088 return suppress || keyEventDefault(event);
1089 1089
1090 PlatformKeyboardEventBuilder evt(event); 1090 PlatformKeyboardEventBuilder evt(event);
1091 if (!evt.isCharacterKey()) 1091 if (!evt.isCharacterKey())
1092 return true; 1092 return true;
1093 1093
1094 // Accesskeys are triggered by char events and can't be suppressed. 1094 // Accesskeys are triggered by char events and can't be suppressed.
1095 if (handler->handleAccessKey(evt)) 1095 if (handler->handleAccessKey(evt))
1096 return true; 1096 return true;
(...skipping 3136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4233 } 4233 }
4234 4234
4235 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4235 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4236 { 4236 {
4237 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4237 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4238 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4238 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4239 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4239 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4240 } 4240 }
4241 4241
4242 } // namespace WebKit 4242 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/ViewportAnchor.cpp ('k') | Source/core/inspector/InspectorInputAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698