Changeset 30090 in webkit
- Timestamp:
- Feb 8, 2008 2:41:58 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r30089 r30090 1 2008-02-08 Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> 2 3 Reviewed by Alp Toker. 4 5 http://bugs.webkit.org/show_bug.cgi?id=17009 6 [Gtk] Webkit strips accents from some dead-key combinations 7 8 KeyEvents have to go through the gtk input method. 9 10 Also implement the isKeypad check and make disambiguateKeyDownEvent 11 behave more like other ports. 12 13 * platform/PlatformKeyboardEvent.h: 14 * platform/gtk/KeyEventGtk.cpp: 15 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 16 (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): 17 (WebCore::PlatformKeyboardEvent::gdkEventKey): 18 1 19 2008-02-08 Darin Adler <darin@apple.com> 2 20 -
trunk/WebCore/platform/PlatformKeyboardEvent.h
r28693 r30090 1 1 /* 2 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2008 Collabora, Ltd. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 119 120 #if PLATFORM(GTK) 120 121 PlatformKeyboardEvent(GdkEventKey*); 122 GdkEventKey* gdkEventKey() const; 121 123 #endif 122 124 … … 148 150 bool m_isSystemKey; 149 151 #endif 152 #if PLATFORM(GTK) 153 GdkEventKey* m_gdkEventKey; 154 #endif 150 155 }; 151 156 -
trunk/WebCore/platform/gtk/KeyEventGtk.cpp
r29961 r30090 3 3 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 4 4 * Copyright (C) 2007 Holger Hans Peter Freyther 5 * Copyright (C) 2008 Collabora, Ltd. All rights reserved. 5 6 * All rights reserved. 6 7 * … … 485 486 } 486 487 488 // TODO: m_gdkEventKey should be refcounted 487 489 PlatformKeyboardEvent::PlatformKeyboardEvent(GdkEventKey* event) 488 490 : m_type((event->type == GDK_KEY_RELEASE) ? KeyUp : KeyDown) … … 492 494 , m_autoRepeat(false) 493 495 , m_windowsVirtualKeyCode(windowsKeyCodeForKeyEvent(event->keyval)) 494 , m_isKeypad( false)496 , m_isKeypad(event->keyval >= GDK_KP_Space && event->keyval <= GDK_KP_9) 495 497 , m_shiftKey((event->state & GDK_SHIFT_MASK) || (event->keyval == GDK_3270_BackTab)) 496 498 , m_ctrlKey(event->state & GDK_CONTROL_MASK) 497 499 , m_altKey(event->state & GDK_MOD1_MASK) 498 500 , m_metaKey(event->state & GDK_MOD2_MASK) 499 { 500 } 501 502 void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool) 501 , m_gdkEventKey(event) 502 { 503 } 504 505 void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode) 503 506 { 504 507 // Can only change type from KeyDown to RawKeyDown or Char, as we lack information for other conversions. 505 508 ASSERT(m_type == KeyDown); 506 509 m_type = type; 510 511 if (backwardCompatibilityMode) 512 return; 507 513 508 514 if (type == RawKeyDown) { … … 521 527 } 522 528 523 } 529 GdkEventKey* PlatformKeyboardEvent::gdkEventKey() const 530 { 531 return m_gdkEventKey; 532 } 533 534 } -
trunk/WebKit/gtk/ChangeLog
r30031 r30090 1 2008-02-08 Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> 2 3 Reviewed by Alp Toker. 4 5 http://bugs.webkit.org/show_bug.cgi?id=17009 6 [Gtk] Webkit strips accents from some dead-key combinations 7 8 KeyEvents have to go through the gtk input method. 9 10 * WebCoreSupport/EditorClientGtk.cpp: 11 (WebKit::imContextCommitted): 12 (WebKit::EditorClient::doTextFieldCommandFromEvent): 13 1 14 2008-02-05 Mark Rowe <mrowe@apple.com> 2 15 -
trunk/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
r29985 r30090 38 38 { 39 39 Frame* frame = core(client->m_webView)->focusController()->focusedOrMainFrame(); 40 frame->editor()->insertTextWithoutSendingTextEvent( str, false);40 frame->editor()->insertTextWithoutSendingTextEvent(String::fromUTF8(str), false); 41 41 } 42 42 … … 383 383 } 384 384 385 bool EditorClient::doTextFieldCommandFromEvent(Element* , KeyboardEvent*)386 { 387 notImplemented();388 return false;385 bool EditorClient::doTextFieldCommandFromEvent(Element* element, KeyboardEvent* event) 386 { 387 WebKitWebViewPrivate* priv = m_webView->priv; 388 return gtk_im_context_filter_keypress(priv->imContext, event->keyEvent()->gdkEventKey()); 389 389 } 390 390
Note: See TracChangeset
for help on using the changeset viewer.