Title: [110077] trunk/Source/WebCore
Revision
110077
Author
commit-qu...@webkit.org
Date
2012-03-07 11:23:52 -0800 (Wed, 07 Mar 2012)

Log Message

[EFL] Revise PlatformKeyboardEventEfl and EflKeyboardUtilities
https://bugs.webkit.org/show_bug.cgi?id=80511

Patch by ChangSeok Oh <shivami...@gmail.com> on 2012-03-07
Reviewed by Gustavo Noronha Silva.

Added 'const' keyword in front of argument of keyIdentifiersForEvasKeyName/windowsKeyCodeForEvasKeyName.
Since they should not be changed while processing each function.
And initialized missing member variables of PlatformKeyboardEventEfl.

No new tests, since no new feature.

* platform/efl/EflKeyboardUtilities.cpp:
(WebCore::keyIdentifierForEvasKeyName): Added const keyword
(WebCore::windowsKeyCodeForEvasKeyName): Added const keyword
* platform/efl/EflKeyboardUtilities.h:
(WebCore):
* platform/efl/PlatformKeyboardEventEfl.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110076 => 110077)


--- trunk/Source/WebCore/ChangeLog	2012-03-07 19:23:44 UTC (rev 110076)
+++ trunk/Source/WebCore/ChangeLog	2012-03-07 19:23:52 UTC (rev 110077)
@@ -1,3 +1,24 @@
+2012-03-07  ChangSeok Oh  <shivami...@gmail.com>
+
+        [EFL] Revise PlatformKeyboardEventEfl and EflKeyboardUtilities
+        https://bugs.webkit.org/show_bug.cgi?id=80511
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Added 'const' keyword in front of argument of keyIdentifiersForEvasKeyName/windowsKeyCodeForEvasKeyName.
+        Since they should not be changed while processing each function.
+        And initialized missing member variables of PlatformKeyboardEventEfl.
+
+        No new tests, since no new feature.
+
+        * platform/efl/EflKeyboardUtilities.cpp:
+        (WebCore::keyIdentifierForEvasKeyName): Added const keyword
+        (WebCore::windowsKeyCodeForEvasKeyName): Added const keyword
+        * platform/efl/EflKeyboardUtilities.h:
+        (WebCore):
+        * platform/efl/PlatformKeyboardEventEfl.cpp:
+        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+
 2012-03-07  Hironori Bono  <hb...@chromium.org>
 
         [Chromium] Mirror the resizer image of an RTL element when WTF_USE_RTL_SCROLLBAR is 1

Modified: trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp (110076 => 110077)


--- trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp	2012-03-07 19:23:44 UTC (rev 110076)
+++ trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp	2012-03-07 19:23:52 UTC (rev 110077)
@@ -166,7 +166,7 @@
     }
 }
 
-String keyIdentifierForEvasKeyName(String& keyName)
+String keyIdentifierForEvasKeyName(const String& keyName)
 {
     if (keyMap().isEmpty())
         createKeyMap();
@@ -188,7 +188,7 @@
     return keyName;
 }
 
-int windowsKeyCodeForEvasKeyName(String& keyName)
+int windowsKeyCodeForEvasKeyName(const String& keyName)
 {
     if (windowsKeyMap().isEmpty())
         createWindowsKeyMap();

Modified: trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.h (110076 => 110077)


--- trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.h	2012-03-07 19:23:44 UTC (rev 110076)
+++ trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.h	2012-03-07 19:23:52 UTC (rev 110077)
@@ -34,9 +34,9 @@
 
 namespace WebCore {
 
-WTF::String keyIdentifierForEvasKeyName(WTF::String&);
+WTF::String keyIdentifierForEvasKeyName(const WTF::String&);
 WTF::String singleCharacterString(const WTF::String&);
-int windowsKeyCodeForEvasKeyName(WTF::String&);
+int windowsKeyCodeForEvasKeyName(const WTF::String&);
 
 } // namespace WebCore
 

Modified: trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp (110076 => 110077)


--- trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp	2012-03-07 19:23:44 UTC (rev 110076)
+++ trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp	2012-03-07 19:23:52 UTC (rev 110077)
@@ -44,27 +44,28 @@
     : PlatformEvent(PlatformEvent::KeyDown, evas_key_modifier_is_set(event->modifiers, "Shift"), evas_key_modifier_is_set(event->modifiers, "Control"), evas_key_modifier_is_set(event->modifiers, "Alt"), evas_key_modifier_is_set(event->modifiers, "Meta"), currentTime())
     , m_text(singleCharacterString(String::fromUTF8(event->string)))
     , m_unmodifiedText(singleCharacterString(String::fromUTF8(event->string)))
+    , m_keyIdentifier(keyIdentifierForEvasKeyName(String(event->key)))
+    , m_windowsVirtualKeyCode(windowsKeyCodeForEvasKeyName(String(event->key)))
+    , m_nativeVirtualKeyCode(0)
+    , m_macCharCode(0)
+    , m_autoRepeat(false)
+    , m_isKeypad(false)
+    , m_isSystemKey(false)
 {
-    String keyName = String(event->key);
-    m_keyIdentifier = keyIdentifierForEvasKeyName(keyName);
-    m_windowsVirtualKeyCode = windowsKeyCodeForEvasKeyName(keyName);
-
-    // FIXME:
-    m_isKeypad = false;
-    m_autoRepeat = false;
 }
 
 PlatformKeyboardEvent::PlatformKeyboardEvent(const Evas_Event_Key_Up* event)
     : PlatformEvent(PlatformEvent::KeyUp, evas_key_modifier_is_set(event->modifiers, "Shift"), evas_key_modifier_is_set(event->modifiers, "Control"), evas_key_modifier_is_set(event->modifiers, "Alt"), evas_key_modifier_is_set(event->modifiers, "Meta"), currentTime())
     , m_text(singleCharacterString(String::fromUTF8(event->string)))
+    , m_unmodifiedText(singleCharacterString(String::fromUTF8(event->string)))
+    , m_keyIdentifier(keyIdentifierForEvasKeyName(String(event->key)))
+    , m_windowsVirtualKeyCode(windowsKeyCodeForEvasKeyName(String(event->key)))
+    , m_nativeVirtualKeyCode(0)
+    , m_macCharCode(0)
+    , m_autoRepeat(false)
+    , m_isKeypad(false)
+    , m_isSystemKey(false)
 {
-    String keyName = String(event->key);
-    m_keyIdentifier = keyIdentifierForEvasKeyName(keyName);
-    m_windowsVirtualKeyCode = windowsKeyCodeForEvasKeyName(keyName);
-
-    // FIXME:
-    m_isKeypad = false;
-    m_autoRepeat = false;
 }
 
 void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to