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

Unified 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: Added new embedder API and code review comments update Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 5e21123d026f58b4ec1f0cfb3f5fde7051ac52ba..03ab093e8cbd11b76567c288a3a46e97f76a03e8 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -940,9 +940,9 @@ bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
// If there is a select popup, it should be the one processing the event,
// not the page.
if (m_selectPopup)
- return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+ return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(mainFrameImpl()->frameView(), event));
if (m_pagePopup) {
- m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+ m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(mainFrameImpl()->frameView(), event));
// We need to ignore the next Char event after this otherwise pressing
// enter when selecting an item in the popup will go to the page.
if (WebInputEvent::RawKeyDown == event.type)
@@ -962,7 +962,7 @@ bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
LocalFrame* frame = toLocalFrame(focusedFrame.get());
- PlatformKeyboardEventBuilder evt(event);
+ PlatformKeyboardEventBuilder evt(mainFrameImpl()->frameView(), event);
if (frame->eventHandler().keyEvent(evt)) {
if (WebInputEvent::RawKeyDown == event.type) {
@@ -1009,9 +1009,9 @@ bool WebViewImpl::handleCharEvent(const WebKeyboardEvent& event)
// If there is a select popup, it should be the one processing the event,
// not the page.
if (m_selectPopup)
- return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+ return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(mainFrameImpl()->frameView(), event));
if (m_pagePopup)
- return m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
+ return m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(mainFrameImpl()->frameView(), event));
LocalFrame* frame = toLocalFrame(focusedCoreFrame());
if (!frame)
@@ -1019,7 +1019,7 @@ bool WebViewImpl::handleCharEvent(const WebKeyboardEvent& event)
EventHandler& handler = frame->eventHandler();
- PlatformKeyboardEventBuilder evt(event);
+ PlatformKeyboardEventBuilder evt(mainFrameImpl()->frameView(), event);
if (!evt.isCharacterKey())
return true;

Powered by Google App Engine
This is Rietveld 408576698