Changeset 91169 in webkit
- Timestamp:
- Jul 17, 2011 6:47:28 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r91163 r91169 1 2011-07-17 Lukasz Slachciak <l.slachciak@samsung.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] [WK2] Fix for getting editor client commands. 6 https://bugs.webkit.org/show_bug.cgi?id=63081 7 8 Editor client commands intepretation was incorrect. It was based on the NativeWebKeyboardEvent only. 9 In fact EventHandler is generating interpreted events - keypress and keydown. These event types 10 are now passed from UIProcess to WebProcess so KeyBindingTranslator can correctly find editor commands. 11 Also build break for Debug build was fixed. 12 13 * UIProcess/API/gtk/PageClientImpl.cpp: KeyboardEvent type is used for KeyBindingTranslator. 14 (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): getEditorCommandsForKeyEvent now has additional 15 parameter describing KeyboardEvent type. 16 * UIProcess/API/gtk/PageClientImpl.h: 17 * UIProcess/PageClient.h: 18 * UIProcess/WebPageProxy.h: 19 * UIProcess/WebPageProxy.messages.in: 20 * UIProcess/gtk/WebPageProxyGtk.cpp: 21 (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): KeyboardEvent type passed to PageClient. 22 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: 23 (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Sync message send with KeyboardEvent type. 24 1 25 2011-07-16 Daniel Bates <dbates@webkit.org> 2 26 -
trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp
r91097 r91169 56 56 } 57 57 58 void PageClientImpl::getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent& event, Vector<WTF::String>& commandList) 59 { 60 ASSERT(event.type == WebEvent::KeyDown || event.type == WebEvent.KeyPress); 61 KeyBindingTranslator::EventType type = WebEvent::KeyDown ? 58 void PageClientImpl::getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent& event, const AtomicString& eventType, Vector<WTF::String>& commandList) 59 { 60 ASSERT(eventType == eventNames().keydownEvent || eventType == eventNames().keypressEvent); 61 62 KeyBindingTranslator::EventType type = eventType == eventNames().keydownEvent ? 62 63 KeyBindingTranslator::KeyDown : KeyBindingTranslator::KeyPress; 63 64 m_keyBindingTranslator.getEditorCommandsForKeyEvent(const_cast<GdkEventKey*>(&event.nativeEvent()->key), type, commandList); -
trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
r91097 r91169 88 88 virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects); 89 89 virtual float userSpaceScaleFactor() const { return 1; } 90 virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, Vector<WTF::String>&);90 virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, const AtomicString&, Vector<WTF::String>&); 91 91 virtual void findStringInCustomRepresentation(const String&, FindOptions, unsigned); 92 92 virtual void countStringMatchesInCustomRepresentation(const String&, FindOptions, unsigned); -
trunk/Source/WebKit2/UIProcess/PageClient.h
r91097 r91169 131 131 #endif 132 132 #if PLATFORM(GTK) 133 virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, Vector<WTF::String>&) = 0;133 virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, const AtomicString&, Vector<WTF::String>&) = 0; 134 134 #endif 135 135 virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) = 0; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r91097 r91169 690 690 #endif 691 691 692 #if PLATFORM(GTK) || PLATFORM(EFL) 692 #if PLATFORM(GTK) 693 void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&); 694 #endif 695 #if PLATFORM(EFL) 693 696 void getEditorCommandsForKeyEvent(Vector<String>&); 694 697 #endif -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r91097 r91169 140 140 #if PLATFORM(GTK) 141 141 # Support for GTK+ platform keybindings 142 GetEditorCommandsForKeyEvent( ) -> (Vector<WTF::String> commandsList)142 GetEditorCommandsForKeyEvent(AtomicString eventType) -> (Vector<WTF::String> commandsList) 143 143 #endif 144 144 -
trunk/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp
r86612 r91169 45 45 } 46 46 47 void WebPageProxy::getEditorCommandsForKeyEvent( Vector<WTF::String>& commandsList)47 void WebPageProxy::getEditorCommandsForKeyEvent(const AtomicString& eventType, Vector<WTF::String>& commandsList) 48 48 { 49 m_pageClient->getEditorCommandsForKeyEvent(m_keyEventQueue.first(), commandsList);49 m_pageClient->getEditorCommandsForKeyEvent(m_keyEventQueue.first(), eventType, commandsList); 50 50 } 51 51 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
r82929 r91169 37 37 ASSERT(event->type() == eventNames().keydownEvent || event->type() == eventNames().keypressEvent); 38 38 39 // First try to interpret the command in the UI and get the commands. 40 WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetEditorCommandsForKeyEvent(), 39 /* First try to interpret the command in the UI and get the commands. 40 UI needs to receive event type because only knows current NativeWebKeyboardEvent.*/ 41 WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetEditorCommandsForKeyEvent(event->type()), 41 42 Messages::WebPageProxy::GetEditorCommandsForKeyEvent::Reply(pendingEditorCommands), 42 43 m_page->pageID(), CoreIPC::Connection::NoTimeout);
Note: See TracChangeset
for help on using the changeset viewer.