[Webkit-unassigned] [Bug 73534] upstream BlackBerry porting of MIMETypeRegistry/KeyboardEvent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 7 22:10:24 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=73534





--- Comment #7 from Leo Yang <leo.yang at torchmobile.com.cn>  2011-12-07 22:10:24 PST ---
(From update of attachment 117836)
View in context: https://bugs.webkit.org/attachment.cgi?id=117836&action=review

Informal review.

> Source/WebCore/platform/blackberry/MIMETypeRegistryBlackBerry.cpp:107
> +String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
> +{
> +    String s = ext.lower();
> +

ext--> extension?
s--> lowerExtension?

> Source/WebCore/platform/blackberry/MIMETypeRegistryBlackBerry.cpp:113
> +    const ExtensionMap* e = extensionMap;
> +    while (e->extension) {
> +        if (s == e->extension)
> +            return e->mimeType;
> +        ++e;
> +    }

e --> extensionMap?

> Source/WebCore/platform/blackberry/MIMETypeRegistryBlackBerry.cpp:123
> +    String s = type.lower();

s --> lowerMIMEType?

> Source/WebCore/platform/blackberry/MIMETypeRegistryBlackBerry.cpp:130
> +    const ExtensionMap* e = extensionMap;
> +    while (e->mimeType) {
> +        if (s == e->mimeType)
> +            return e->extension;
> +        ++e;
> +    }

e --> extensionMap?

> Source/WebCore/platform/blackberry/MIMETypeRegistryBlackBerry.cpp:136
> +bool MIMETypeRegistry::isApplicationPluginMIMEType(const String& /*mimeType*/)
> +{

remove the comment

> Source/WebCore/platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:22
> +#include "BlackBerryPlatformLog.h"

Use angle brackets for BlackBerryPlatformLog.h and move it down after #include <BlackBerryPlatformKeyboardEvent.h>

> Source/WebCore/platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:427
> +static inline WebCore::PlatformKeyboardEvent::Type toWebCorePlatformKeyboardEventType(const BlackBerry::Platform::KeyboardEvent::Type type)
> +{

Is namespace WebCore necessary here?

> Source/WebCore/platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:435
> +    default:
> +        return WebCore::PlatformKeyboardEvent::Char;

Ditto.

> Source/WebCore/platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:457
> +    m_type = toWebCorePlatformKeyboardEventType(event.type());
> +    m_unmodifiedCharacter = event.character();
> +    m_keyIdentifier = keyIdentifierForBlackBerryCharacter(event.character());
> +    m_windowsVirtualKeyCode = windowsKeyCodeForBlackBerryCharacter(event.character());
> +    unsigned short character = adjustCharacterFromOS(event.character());
> +    m_text = String(&character, 1);
> +    m_unmodifiedText = m_text;
> +
> +    if (event.character() == KEYCODE_BACK_TAB)
> +        m_shiftKey = true; // BackTab should be treated as Shift + Tab.
> +

Why can't all these data members be initialised in the initialisation list of the constructor?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list