Bug 47698

Summary: [EFL] REGRESSION(69798) UCHAR can't be converted to String.
Product: WebKit Reporter: Ryuan Choi <ryuan.choi>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: antognolli+webkit, commit-queue, kenneth, leandro, lucas.de.marchi, tonikitoo, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch none

Description Ryuan Choi 2010-10-14 16:25:55 PDT
/workspace/webkit/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp: In function ‘void WebCore::createWindowsKeyMap()’:
/workspace/webkit/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp:136:32: error: conversion from ‘UChar’ to ‘WTF::String’ is ambiguous
/workspace/webkit/JavaScriptCore/wtf/text/WTFString.h:312:5: note: candidates are: WTF::String::String(WTF::HashTableDeletedValueType) <near match>
/workspace/webkit/JavaScriptCore/wtf/text/WTFString.h:96:5: note:                 WTF::String::String(WTF::StringImpl*) <near match>
/workspace/webkit/JavaScriptCore/wtf/text/WTFString.h:93:5: note:                 WTF::String::String(const char*) <near match>
/workspace/webkit/JavaScriptCore/wtf/text/WTFString.h:87:5: note:                 WTF::String::String(const UChar*) <near match>
Comment 1 Ryuan Choi 2010-10-14 17:04:29 PDT
Created attachment 70804 [details]
Patch
Comment 2 Nikolas Zimmermann 2010-10-15 01:42:55 PDT
Comment on attachment 70804 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=70804&action=review

Sorry, I wasn't aware EFL builds is broken. I checked the efl EWS bubble and it was green. Don't you actually build patches?

> JavaScriptCore/wtf/text/WTFString.h:139
> +    static String character(char);

This should be avoided.

> WebCore/platform/efl/PlatformKeyboardEventEfl.cpp:134
>      String alphabet = "abcdefghijklmnopqrstuvwxyz";

I suggest changing this to:
char alphabet[] = "abc...";

> WebCore/platform/efl/PlatformKeyboardEventEfl.cpp:136
> +        String key = String::character(static_cast<char>(alphabet[i]));

Then use:
String key(alphabet + i, 1); here.
Comment 3 Ryuan Choi 2010-10-15 04:46:15 PDT
Created attachment 70852 [details]
Patch
Comment 4 Nikolas Zimmermann 2010-10-15 04:51:14 PDT
Comment on attachment 70852 [details]
Patch

Thanks a lot, this is it :-)
Comment 5 WebKit Commit Bot 2010-10-15 05:11:55 PDT
The commit-queue encountered the following flaky tests while processing attachment 70852 [details]:

[u'http/tests/websocket/tests/close-on-navigate-new-location.html', u'http/tests/appcache/credential-url.html']

Please file bugs against the tests.  The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2010-10-15 05:23:45 PDT
Comment on attachment 70852 [details]
Patch

Clearing flags on attachment: 70852

Committed r69849: <http://trac.webkit.org/changeset/69849>
Comment 7 WebKit Commit Bot 2010-10-15 05:23:52 PDT
All reviewed patches have been landed.  Closing bug.