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

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

Issue 8072009: Merge 95861 - occasional crash in Chromium in dispatching keyEvent (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 return true; 647 return true;
648 } 648 }
649 #endif // !OS(DARWIN) 649 #endif // !OS(DARWIN)
650 650
651 PlatformKeyboardEventBuilder evt(event); 651 PlatformKeyboardEventBuilder evt(event);
652 652
653 if (handler->keyEvent(evt)) { 653 if (handler->keyEvent(evt)) {
654 if (WebInputEvent::RawKeyDown == event.type) { 654 if (WebInputEvent::RawKeyDown == event.type) {
655 // Suppress the next keypress event unless the focused node is a plu g-in node. 655 // Suppress the next keypress event unless the focused node is a plu g-in node.
656 // (Flash needs these keypress events to handle non-US keyboards.) 656 // (Flash needs these keypress events to handle non-US keyboards.)
657 Node* node = frame->document()->focusedNode(); 657 Node* node = focusedWebCoreNode();
658 if (!node || !node->renderer() || !node->renderer()->isEmbeddedObjec t()) 658 if (!node || !node->renderer() || !node->renderer()->isEmbeddedObjec t())
659 m_suppressNextKeypressEvent = true; 659 m_suppressNextKeypressEvent = true;
660 } 660 }
661 return true; 661 return true;
662 } 662 }
663 663
664 return keyEventDefault(event); 664 return keyEventDefault(event);
665 } 665 }
666 666
667 bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event) 667 bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event)
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 Document* document = page()->mainFrame()->document(); 2792 Document* document = page()->mainFrame()->document();
2793 Element* fullscreenElement = document->webkitCurrentFullScreenElement(); 2793 Element* fullscreenElement = document->webkitCurrentFullScreenElement();
2794 if (!fullscreenElement) 2794 if (!fullscreenElement)
2795 return; 2795 return;
2796 document->webkitWillExitFullScreenForElement(fullscreenElement); 2796 document->webkitWillExitFullScreenForElement(fullscreenElement);
2797 document->webkitDidExitFullScreenForElement(fullscreenElement); 2797 document->webkitDidExitFullScreenForElement(fullscreenElement);
2798 #endif 2798 #endif
2799 } 2799 }
2800 2800
2801 } // namespace WebKit 2801 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698