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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 663523002: Adding support for DOM3 KeyboardEvents Code in KeyboardEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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) 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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 webFrame->client()->forwardInputEvent(&event); 994 webFrame->client()->forwardInputEvent(&event);
995 return true; 995 return true;
996 } 996 }
997 997
998 if (!focusedFrame || !focusedFrame->isLocalFrame()) 998 if (!focusedFrame || !focusedFrame->isLocalFrame())
999 return false; 999 return false;
1000 1000
1001 LocalFrame* frame = toLocalFrame(focusedFrame.get()); 1001 LocalFrame* frame = toLocalFrame(focusedFrame.get());
1002 1002
1003 PlatformKeyboardEventBuilder evt(event); 1003 PlatformKeyboardEventBuilder evt(event);
1004 evt.setKeyboardEventDOMCodeValue(m_client->keyboardDOMCodeValue(evt.nativeVi rtualKeyCode()));
kpschoedel 2014/12/02 17:00:52 This uses WebKeyboardEvent.nativeKeyCode, which co
1004 1005
1005 if (frame->eventHandler().keyEvent(evt)) { 1006 if (frame->eventHandler().keyEvent(evt)) {
1006 if (WebInputEvent::RawKeyDown == event.type) { 1007 if (WebInputEvent::RawKeyDown == event.type) {
1007 // Suppress the next keypress event unless the focused node is a plu g-in node. 1008 // Suppress the next keypress event unless the focused node is a plu g-in node.
1008 // (Flash needs these keypress events to handle non-US keyboards.) 1009 // (Flash needs these keypress events to handle non-US keyboards.)
1009 Element* element = focusedElement(); 1010 Element* element = focusedElement();
1010 if (!element || !element->renderer() || !element->renderer()->isEmbe ddedObject()) 1011 if (!element || !element->renderer() || !element->renderer()->isEmbe ddedObject())
1011 m_suppressNextKeypressEvent = true; 1012 m_suppressNextKeypressEvent = true;
1012 } 1013 }
1013 return true; 1014 return true;
(...skipping 3524 matching lines...) Expand 10 before | Expand all | Expand 10 after
4538 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4539 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4539 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4540 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4540 } 4541 }
4541 4542
4542 void WebViewImpl::forceNextWebGLContextCreationToFail() 4543 void WebViewImpl::forceNextWebGLContextCreationToFail()
4543 { 4544 {
4544 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4545 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4545 } 4546 }
4546 4547
4547 } // namespace blink 4548 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698