Bug 23296 - add Android platform-specific files to WebCore/platform
: add Android platform-specific files to WebCore/platform
Status: RESOLVED FIXED
: WebKit
WebCore Misc.
: 528+ (Nightly build)
: Other Linux
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-01-13 10:30 PST by
Modified: 2009-06-10 12:16 PST (History)


Attachments
patch v1 (137.74 KB, patch)
2009-01-13 10:36 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
patch v2 (134.28 KB, patch)
2009-01-15 17:17 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
ClipboardAndroid.h/.cpp & ChangeLog (7.74 KB, patch)
2009-01-23 14:10 PST, Feng Qian
darin: review+
Review Patch | Details | Formatted Diff | Diff
patch part 2 (10.55 KB, patch)
2009-01-26 17:03 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
patch part 2 (9.71 KB, patch)
2009-01-27 10:42 PST, Feng Qian
darin: review+
Review Patch | Details | Formatted Diff | Diff
patch part 3 (6.07 KB, patch)
2009-02-06 16:59 PST, Feng Qian
darin: review+
Review Patch | Details | Formatted Diff | Diff
patch part 4 (21.67 KB, patch)
2009-02-06 16:59 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
patch part 5 (4.01 KB, patch)
2009-02-06 17:00 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
patch part 6 (16.82 KB, patch)
2009-02-06 17:00 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
patch part 7 (10.83 KB, patch)
2009-02-06 17:01 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
patch part 8 (10.62 KB, patch)
2009-02-06 17:01 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
patch part 9 (20.28 KB, patch)
2009-02-06 17:02 PST, Feng Qian
no flags Review Patch | Details | Formatted Diff | Diff
new patch part 2 with ChangeLog (10.33 KB, patch)
2009-05-04 16:16 PST, Feng Qian
eric: review+
Review Patch | Details | Formatted Diff | Diff
new patch part 3 with ChangeLog (6.65 KB, patch)
2009-05-04 16:21 PST, Feng Qian
eric: review-
Review Patch | Details | Formatted Diff | Diff
new patch part 4 with ChangeLog (22.24 KB, patch)
2009-05-04 16:25 PST, Feng Qian
eric: review-
Review Patch | Details | Formatted Diff | Diff
new patch part 5 with ChangeLog (4.59 KB, patch)
2009-05-04 16:27 PST, Feng Qian
eric: review-
Review Patch | Details | Formatted Diff | Diff
new patch part 6 with ChangeLog (17.39 KB, patch)
2009-05-04 16:29 PST, Feng Qian
eric: review-
Review Patch | Details | Formatted Diff | Diff
new patch part 7 with ChangeLog (11.46 KB, patch)
2009-05-04 16:32 PST, Feng Qian
eric: review+
Review Patch | Details | Formatted Diff | Diff
new patch part 8 with ChangeLog (11.31 KB, patch)
2009-05-04 16:35 PST, Feng Qian
eric: review-
Review Patch | Details | Formatted Diff | Diff
new patch part 9 with ChangeLog (20.80 KB, patch)
2009-05-04 16:38 PST, Feng Qian
eric: review-
Review Patch | Details | Formatted Diff | Diff
new patch part 3 with ChangeLog (7.69 KB, patch)
2009-06-08 13:44 PST, Feng Qian
eric: review-
Review Patch | Details | Formatted Diff | Diff
new patch part 5 with ChangeLog (4.57 KB, patch)
2009-06-08 13:55 PST, Feng Qian
eric: review+
Review Patch | Details | Formatted Diff | Diff
new patch part 4 with ChangeLog (22.47 KB, patch)
2009-06-08 14:11 PST, Feng Qian
eric: review+
Review Patch | Details | Formatted Diff | Diff
new patch part 3 with ChangeLog (7.62 KB, patch)
2009-06-08 16:42 PST, Feng Qian
eric: review+
Review Patch | Details | Formatted Diff | Diff
new patch part 4 with ChangeLog (22.49 KB, patch)
2009-06-08 17:20 PST, Feng Qian
eric: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-01-13 10:30:34 PST
Part of upstreaming Android port to WebKit, this bug includes Android-specific files added to WebCore/platform/android directory.
------- Comment #1 From 2009-01-13 10:36:21 PST -------
Created an attachment (id=26674) [details]
patch v1

Patch v1.
------- Comment #2 From 2009-01-15 17:17:36 PST -------
Created an attachment (id=26778) [details]
patch v2

This patch includes Android-specific files under WebCore/platform.

SharedTimerAndroid.cpp currently depends on JavaSharedClient.cpp, which lives in WebKit directory. I can separate this file into a different change list and wait until we find a solution for it.

Apologize for the big patch, lot of files.
------- Comment #3 From 2009-01-16 10:48:44 PST -------
(From update of attachment 26778 [details])
> +        * platform/android/ClipboardAndroid.cpp: Added.
> +        (WebCore::):
> +        (WebCore::clipboardTypeFromMIMEType):
> +        (WebCore::ClipboardAndroid::ClipboardAndroid):
> +        (WebCore::ClipboardAndroid::~ClipboardAndroid):
> +        (WebCore::ClipboardAndroid::clearData):
> +        (WebCore::ClipboardAndroid::clearAllData):
> +        (WebCore::ClipboardAndroid::getData):
> +        (WebCore::ClipboardAndroid::setData):
> +        (WebCore::ClipboardAndroid::types):
> +        (WebCore::ClipboardAndroid::setDragImage):
> +        (WebCore::ClipboardAndroid::setDragImageElement):
> +        (WebCore::ClipboardAndroid::createDragImage):
> +        (WebCore::ClipboardAndroid::declareAndWriteDragImage):
> +        (WebCore::ClipboardAndroid::writeURL):
> +        (WebCore::ClipboardAndroid::writeRange):
> +        (WebCore::ClipboardAndroid::hasData):

Remember that prepare-ChangeLog is just a script to help you write a ChangeLog entry. Its output is not sacred.

As I said in another patch, I don't think it's useful to have a list of all functions for a new file, despite the fact that's what prepare-ChangeLog generates, if you're not going to comment on those individual functions. The reason the function names are there are so someone can search for a change that affected a particular function, and to encourage you to write more detailed comments. So it's better to omit them. And there's absolutely no reason to leave in a line like this:

> +        (WebCore::):

This is generated by a buggy script, the human being working on the patch should just remove it!

> +// format string for
> +static const char szShellDotUrlTemplate[] = "[InternetShortcut]\r\nURL=%s\r\n";

Not a good comment here.

> +    //FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>

Doesn't make sense to have a Radar number in an Android-specific source file.

> +    if (dataType == ClipboardDataTypeURL) {
> +           }
> +    if (dataType == ClipboardDataTypeText) {
> +       
> +    }
> +
> +}

Strange code here. This whole file seems to be an unmaintained shell, copy of an old version of a Mac file perhaps? I think a little housecleaning would be good.

This is huge, I'm not going to be able to get through this quickly. I might not be able to review until next week.
------- Comment #4 From 2009-01-23 09:58:54 PST -------
Darin, I am going to split the patch into several smaller ones so it is easier for you to review.

(In reply to comment #3)
> (From update of attachment 26778 [details] [review])
> > +        * platform/android/ClipboardAndroid.cpp: Added.
> > +        (WebCore::):
> > +        (WebCore::clipboardTypeFromMIMEType):
> > +        (WebCore::ClipboardAndroid::ClipboardAndroid):
> > +        (WebCore::ClipboardAndroid::~ClipboardAndroid):
> > +        (WebCore::ClipboardAndroid::clearData):
> > +        (WebCore::ClipboardAndroid::clearAllData):
> > +        (WebCore::ClipboardAndroid::getData):
> > +        (WebCore::ClipboardAndroid::setData):
> > +        (WebCore::ClipboardAndroid::types):
> > +        (WebCore::ClipboardAndroid::setDragImage):
> > +        (WebCore::ClipboardAndroid::setDragImageElement):
> > +        (WebCore::ClipboardAndroid::createDragImage):
> > +        (WebCore::ClipboardAndroid::declareAndWriteDragImage):
> > +        (WebCore::ClipboardAndroid::writeURL):
> > +        (WebCore::ClipboardAndroid::writeRange):
> > +        (WebCore::ClipboardAndroid::hasData):
> 
> Remember that prepare-ChangeLog is just a script to help you write a ChangeLog
> entry. Its output is not sacred.
> 
> As I said in another patch, I don't think it's useful to have a list of all
> functions for a new file, despite the fact that's what prepare-ChangeLog
> generates, if you're not going to comment on those individual functions. The
> reason the function names are there are so someone can search for a change that
> affected a particular function, and to encourage you to write more detailed
> comments. So it's better to omit them. And there's absolutely no reason to
> leave in a line like this:
> 
> > +        (WebCore::):
> 
> This is generated by a buggy script, the human being working on the patch
> should just remove it!
> 
> > +// format string for
> > +static const char szShellDotUrlTemplate[] = "[InternetShortcut]\r\nURL=%s\r\n";
> 
> Not a good comment here.
> 
> > +    //FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
> 
> Doesn't make sense to have a Radar number in an Android-specific source file.
> 
> > +    if (dataType == ClipboardDataTypeURL) {
> > +           }
> > +    if (dataType == ClipboardDataTypeText) {
> > +       
> > +    }
> > +
> > +}
> 
> Strange code here. This whole file seems to be an unmaintained shell, copy of
> an old version of a Mac file perhaps? I think a little housecleaning would be
> good.
> 
> This is huge, I'm not going to be able to get through this quickly. I might not
> be able to review until next week.
> 
------- Comment #5 From 2009-01-23 13:52:14 PST -------
(From update of attachment 26778 [details])
Clearing the review flag based on that most-recent comment saying that smaller patches were coming.
------- Comment #6 From 2009-01-23 14:10:46 PST -------
Created an attachment (id=26982) [details]
ClipboardAndroid.h/.cpp & ChangeLog

Most functions of ClipboardAndroid.cpp are empty stubs to satisfy the linker.
------- Comment #7 From 2009-01-24 13:25:34 PST -------
(From update of attachment 26982 [details])
I don't understand why the ChangeLog lists files that aren't in this patch. But the ClipboardAndroid files look fine. r=me
------- Comment #8 From 2009-01-26 11:12:19 PST -------
(In reply to comment #7)
> (From update of attachment 26982 [details] [review])
> I don't understand why the ChangeLog lists files that aren't in this patch. But
> the ClipboardAndroid files look fine. r=me
> 

I am going to split other added files into small patches, but use the same bug id as this one.
------- Comment #9 From 2009-01-26 17:03:50 PST -------
Created an attachment (id=27055) [details]
patch part 2

Second part of the patch with three more files.
------- Comment #10 From 2009-01-27 10:42:32 PST -------
Created an attachment (id=27076) [details]
patch part 2

A new version of part 2 with more cleanups.
------- Comment #11 From 2009-02-06 16:59:18 PST -------
Created an attachment (id=27434) [details]
patch part 3
------- Comment #12 From 2009-02-06 16:59:47 PST -------
Created an attachment (id=27435) [details]
patch part 4
------- Comment #13 From 2009-02-06 17:00:13 PST -------
Created an attachment (id=27436) [details]
patch part 5
------- Comment #14 From 2009-02-06 17:00:38 PST -------
Created an attachment (id=27437) [details]
patch part 6
------- Comment #15 From 2009-02-06 17:01:05 PST -------
Created an attachment (id=27438) [details]
patch part 7
------- Comment #16 From 2009-02-06 17:01:39 PST -------
Created an attachment (id=27439) [details]
patch part 8
------- Comment #17 From 2009-02-06 17:02:27 PST -------
Created an attachment (id=27440) [details]
patch part 9
------- Comment #18 From 2009-03-05 09:34:13 PST -------
(From update of attachment 26982 [details])
Removed r+ flag so this shows up in Darin's review queue.
------- Comment #19 From 2009-03-30 11:56:52 PST -------
(From update of attachment 26982 [details])
Darin, can you review patches in this bug when you get chance? Thanks.
------- Comment #20 From 2009-03-30 12:13:38 PST -------
(From update of attachment 26982 [details])
The ChangeLog here doesn't match the files. The files look fine.

r=me
------- Comment #21 From 2009-04-19 14:44:37 PST -------
(From update of attachment 27434 [details])
Some of the comments in the file are strange, like the one that has Subversion change number of the version that added the new function. And it's strange to have unloadModule in this file, but none of the other module functions. But this won’t do any harm to any other platforms, so on that basis, r=me
------- Comment #22 From 2009-04-19 14:48:41 PST -------
(From update of attachment 27076 [details])
There must be a better way to handle platforms with no cursors than this.

Is this #define LOG_TAG really needed?
------- Comment #23 From 2009-04-20 07:28:16 PST -------
(In reply to comment #22)
> (From update of attachment 27076 [details] [review])
> There must be a better way to handle platforms with no cursors than this.
> 
> Is this #define LOG_TAG really needed?
> 

Yes, it is the logging facility provided by Android utils/log.h.
------- Comment #24 From 2009-04-29 14:26:21 PST -------
(From update of attachment 26982 [details])
I landed this as:
Committing to http://svn.webkit.org/repository/webkit/trunk ...
    M    WebCore/ChangeLog
    A    WebCore/platform/android/ClipboardAndroid.cpp
    A    WebCore/platform/android/ClipboardAndroid.h
Committed r43012


The ChangeLog was wrong, and there were Tabs in the header file, but otherwise it was fine.
------- Comment #25 From 2009-04-29 14:27:16 PST -------
These should have individual ChangeLogs so they can be landed separately.  Unless you plan to land them yourself (which would be fine too).
------- Comment #26 From 2009-04-30 09:08:23 PST -------
(In reply to comment #25)
> These should have individual ChangeLogs so they can be landed separately. 
> Unless you plan to land them yourself (which would be fine too).
> 

Eric, I take your suggestion and will make ChangeLog for each patch.
------- Comment #27 From 2009-05-04 16:16:25 PST -------
Created an attachment (id=29997) [details]
new patch part 2 with ChangeLog

Exact the same patch as reviewed part two with ChagneLog so it is easier to land.
------- Comment #28 From 2009-05-04 16:21:41 PST -------
Created an attachment (id=29998) [details]
new patch part 3 with ChangeLog

new patch part 3 with ChangeLog, reviewed by darin@apple.com already.
------- Comment #29 From 2009-05-04 16:25:17 PST -------
Created an attachment (id=29999) [details]
new patch part 4 with ChangeLog
------- Comment #30 From 2009-05-04 16:27:34 PST -------
Created an attachment (id=30000) [details]
new patch part 5 with ChangeLog
------- Comment #31 From 2009-05-04 16:29:53 PST -------
Created an attachment (id=30002) [details]
new patch part 6 with ChangeLog
------- Comment #32 From 2009-05-04 16:32:18 PST -------
Created an attachment (id=30003) [details]
new patch part 7 with ChangeLog
------- Comment #33 From 2009-05-04 16:35:19 PST -------
Created an attachment (id=30004) [details]
new patch part 8 with ChangeLog
------- Comment #34 From 2009-05-04 16:38:12 PST -------
Created an attachment (id=30005) [details]
new patch part 9 with ChangeLog
------- Comment #35 From 2009-05-21 19:23:19 PST -------
(From update of attachment 29997 [details])
Seems fine.  I guess Andriod doesn't have cursors or drag/drop.
------- Comment #36 From 2009-05-21 19:27:17 PST -------
(From update of attachment 29998 [details])
Style violation:
     if (handle != -1) {
 63         return filename;
 64     }

No need to have filename outside of the while block.  Just put the if inside the while block. :)

I suggest breaking the filename generation stuff out into its own function.

temporaryFileName(name, number)

Doesn't write deal with size_t instead of int?

Sorry this took so long. I don't get any notification when you set a requestee.  I suggest not setting a requestee on patches you post.
------- Comment #37 From 2009-05-22 06:32:15 PST -------
(From update of attachment 30000 [details])
I don't think you want to return a new string every time.  You should use function-local statics instead.  You also don't need to use fromUTF8 since those are just ascii strings. :)  Oh, and you should put a simple implementation of image title, since it's not that hard, and will fix viewing stand-alone image files.
------- Comment #38 From 2009-05-22 06:37:13 PST -------
(From update of attachment 29999 [details])
Does the Andriod project have a legal entity to assign copyright to?

case: statements should be alingned with switch statement per the WK style guidelines.

{ on it's own line:
 36 static int windowsKeyCodeForKeyEvent(unsigned int keyCode) {

It's sad that more of this logic can't be shared between platforms.

WK Style has no != 0
 218     , m_shiftKey((mods & ShiftKey) != 0)

Otherwise looks fine.
If you had commit-bit I would just r+ this and you could fix them when landing.  Since you don't yet, please post a new patch for someone else to land.
------- Comment #39 From 2009-05-22 06:43:04 PST -------
(From update of attachment 30002 [details])
WK style is to prefer constants over preprocessor #defines:
 39 #define MAX_COMBO_HEIGHT 20

Sad this can't share more with Chromium.  I guess eventually maybe it can.  Especially if a RenderThemeSkia is made (talk to Albert Wong)

It's nice to use longer variable names:
 62 static bool paintBrush(RenderSkinAndroid* rSkin, RenderObject* o, const RenderObject::PaintInfo& i,  const IntRect& ir)

Please use C++ style constructor initialization and OwnPtrs so you don't ahve to do manual memory management:
 83     m_radio = new RenderSkinRadio(false);
 90     delete m_radio;

Style:
     if (!element->isEnabled()) {
 203         RenderSkinButton::Draw(getCanvasFromInfo(i), ir, RenderSkinAndroid::kDisabled);
 204     } else {

Style:
46     if (o->isMenuList()) {
 247         return paintCombo(o, i, ir);
 248     }

Style:
 38     ThemeData() :m_part(0), m_state(0) {}

We don't name arguments in headers unless the names add clarity:
 51     virtual bool supportsFocusRing(const RenderStyle* style) const;

As noted above, these should be OwnPtrs:
 101     RenderSkinRadio*    m_radio;
------- Comment #40 From 2009-05-22 06:44:54 PST -------
(From update of attachment 30003 [details])
Seems sane enough.
------- Comment #41 From 2009-05-22 06:48:28 PST -------
(From update of attachment 30004 [details])
I'm surprised we have any time code in WebCore?  Isn't that all down in WTF?

Why does andriod need its own different ICU code?  TextBoundaries.cpp?

IntRect() is the same as  54         return IntRect(0, 0, 0, 0);

Isn't there an easier way to get the FrameView than your manual crawl?

r- for the nits and questions.
------- Comment #42 From 2009-05-22 06:52:06 PST -------
(From update of attachment 30005 [details])
We don't generally commit commented out code:
 97 //void FrameView::updateBorder() { verifiedOk(); }

I'm surprised there are all these localized strings here when I just reviewed another patch with unimplemented localized strings.  Seems these shoudl be mvoed, no?

ASSERT(0);
we use ASSERT_NOT_REACHED()

In general this is fine.  Again if you were a commiter you could just fix it as you landed, but as is, you should re-post this for someone else to land.

Please remove all the commetned out ones:
 718 //void Frame::clearPlatformScriptObjects() { notImplemented(); }

I think you could make all these 1-line definitions to make them more readable.  Up to you.  But we generally found them more readable that way.  WK does not have an 80 col limit like google does.

r- for the nit above.
------- Comment #43 From 2009-06-08 13:28:31 PST -------
Eric, thanks for reviewing the patch.

(In reply to comment #36)
> (From update of attachment 29998 [details] [review])
> Style violation:
>      if (handle != -1) {
>  63         return filename;
>  64     }
> 
> No need to have filename outside of the while block.  Just put the if inside
> the while block. :)
> 

cute, thanks, fix it.

> I suggest breaking the filename generation stuff out into its own function.
> 
> temporaryFileName(name, number)
> 

Since the code is only used by openTemporaryFile, and the code is not long (16 lines), I don't feel it is worth to make it into a separate function. But if you insist, I can make such a change, please let me know your opinion.

> Doesn't write deal with size_t instead of int?
> 

Should I add a cast like, (size_t)(length - totalBytesWritten) ?

> Sorry this took so long. I don't get any notification when you set a requestee.
>  I suggest not setting a requestee on patches you post.
> 
------- Comment #44 From 2009-06-08 13:36:07 PST -------
(In reply to comment #37)
> (From update of attachment 30000 [details] [review])
> I don't think you want to return a new string every time.  You should use
> function-local statics instead.  You also don't need to use fromUTF8 since
> those are just ascii strings. :)  Oh, and you should put a simple
> implementation of image title, since it's not that hard, and will fix viewing
> stand-alone image files.
> 

The code is mostly a copy-paste from gtk port. I am going to remove fromUTF8 part, but will image title as it is, and mostly this file is just used as a link stub.
------- Comment #45 From 2009-06-08 13:44:22 PST -------
Created an attachment (id=31059) [details]
new patch part 3 with ChangeLog
------- Comment #46 From 2009-06-08 13:55:47 PST -------
Created an attachment (id=31060) [details]
new patch part 5 with ChangeLog
------- Comment #47 From 2009-06-08 14:06:57 PST -------
(In reply to comment #38)
> (From update of attachment 29999 [details] [review])
> Does the Andriod project have a legal entity to assign copyright to?

I am not the original author of this file :-), but from comments, this file looks like a copy and modification of the one from gtk port, so I added copyrights info of GTK into it.
Is it all you mean here?

> 
> case: statements should be alingned with switch statement per the WK style
> guidelines.
> 

The counterpart in other ports are using the same style, really do I need to make this one different from others?

> { on it's own line:
>  36 static int windowsKeyCodeForKeyEvent(unsigned int keyCode) {
> 

Fixed, thanks!

> It's sad that more of this logic can't be shared between platforms.
> 
> WK Style has no != 0
>  218     , m_shiftKey((mods & ShiftKey) != 0)
> 

Fixed!

> Otherwise looks fine.
> If you had commit-bit I would just r+ this and you could fix them when landing.
>  Since you don't yet, please post a new patch for someone else to land.
> 

A new patch is created.
------- Comment #48 From 2009-06-08 14:11:25 PST -------
Created an attachment (id=31061) [details]
new patch part 4 with ChangeLog
------- Comment #49 From 2009-06-08 14:33:34 PST -------
(From update of attachment 31059 [details])
Various style violations:

35     if (m_filenames.size() == 0) {
 36         return String();
 37     }
isEmpty() no?  Also no extra {}

Don't we have methods to do ellipses already?
40     String output = m_filenames[0].copy();
 41     while (font.width(TextRun(output.impl())) > width && output.length() > 4) {
 42         output = output.replace(output.length() - 4, 4, String("..."));
 43     }

String has a printf method if you like:
54         String path = sPluginPath;
 55         path.append("/");
 56         path.append(prefix);
 57         path.append(String::number(number));

Style:
CString fileSystemRepresentation(const String& path) {
 46     return path.utf8();
 47 }

Style:
 59         const char *fstr = filename.data();

Style:
         if (handle != -1) {
 64             return filename;
 65         }

Why the date comment here?
98 // new as of SVN change 36269, Sept 8, 2008
 99 String homeDirectoryPath() 

Or here?
 // new as of webkit4, Feb 28, 2009
 105 Vector<String> listDirectory(const String& path, const String& filter)
 106 {

Why the extra space?
112         struct dirent * dp;

Single line if style:
115             if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) {
 116                 continue;
 117             }
 118             if (fnmatch(cfilter.data(), name, 0) != 0) {
 119                 continue;
 120             }

WebKit uses ! instead of == NULL:
13         while ((dp = readdir(dir)) != NULL) {

Otherwise this seems sane enough.  Doing so many patches on one bug makes it really hard to read the comments after a while.
------- Comment #50 From 2009-06-08 14:34:07 PST -------
(From update of attachment 31060 [details])
Looks fine.
------- Comment #51 From 2009-06-08 14:36:24 PST -------
(From update of attachment 31061 [details])
It seems:
 199 static inline String singleCharacterString(int c) 

shoudl take a UChar32 instead of an "int"

So sad more of this code can't be shared between platforms.

Looks sane enough though.  When landing, please fix the one nit above.
------- Comment #52 From 2009-06-08 16:42:18 PST -------
Created an attachment (id=31070) [details]
new patch part 3 with ChangeLog
------- Comment #53 From 2009-06-08 17:16:50 PST -------
(From update of attachment 31061 [details])
><html><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Index: WebCore/ChangeLog
>===================================================================
>--- WebCore/ChangeLog	(revision 44504)
>+++ WebCore/ChangeLog	(working copy)
>@@ -1,3 +1,14 @@
>+
>+2009-06-08  Feng Qian  <feng@chromium.org>
>+
>+        Reviewed by NOBODY (OOPS!).
>+
>+        Add Android port files to WebCore/platform (part 4).
>+        https://bugs.webkit.org/show_bug.cgi?id=23296
>+
>+        * platform/android/KeyEventAndroid.cpp: Added.
>+        * platform/android/KeyboardCodes.h: Added.
>+
> 2009-06-08  Adam Langley  <agl@google.com>
> 
>         Reviewed by Eric Siedel.
>Index: WebCore/platform/android/KeyEventAndroid.cpp
>===================================================================
>--- WebCore/platform/android/KeyEventAndroid.cpp	(revision 0)
>+++ WebCore/platform/android/KeyEventAndroid.cpp	(revision 0)
>@@ -0,0 +1,273 @@
>+/*
>+ * Copyright 2007, The Android Open Source Project
>+ * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
>+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
>+ * Copyright (C) 2007 Holger Hans Peter Freyther
>+ * Copyright (C) 2008 Collabora, Ltd.  All rights reserved.
>+ * All rights reserved.
>+ *
>+ * Redistribution and use in source and binary forms, with or without
>+ * modification, are permitted provided that the following conditions
>+ * are met:
>+ *  * Redistributions of source code must retain the above copyright
>+ *    notice, this list of conditions and the following disclaimer.
>+ *  * Redistributions in binary form must reproduce the above copyright
>+ *    notice, this list of conditions and the following disclaimer in the
>+ *    documentation and/or other materials provided with the distribution.
>+ *
>+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
>+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
>+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
>+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
>+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
>+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
>+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>+ */
>+
>+#include "config.h"
>+#include "PlatformKeyboardEvent.h"
>+
>+#include "KeyboardCodes.h"
>+#include "NotImplemented.h"
>+#include <ui/KeycodeLabels.h>
>+
>+namespace WebCore {
>+
>+// compare to same function in gdk/KeyEventGdk.cpp
>+static int windowsKeyCodeForKeyEvent(unsigned int keyCode)
>+{
>+    // Does not provide all key codes, and does not handle all keys.
>+    switch(keyCode) {
>+        case kKeyCodeDel:
>+            return VK_BACK;
>+        case kKeyCodeTab:
>+            return VK_TAB;
>+        case kKeyCodeClear:
>+            return VK_CLEAR;
>+        case kKeyCodeDpadCenter:
>+        case kKeyCodeNewline:
>+            return VK_RETURN;
>+        case kKeyCodeShiftLeft:
>+        case kKeyCodeShiftRight:
>+            return VK_SHIFT;
>+        // back will serve as escape, although we probably do not have access to it
>+        case kKeyCodeBack:
>+            return VK_ESCAPE;
>+        case kKeyCodeSpace:
>+            return VK_SPACE;
>+        case kKeyCodeHome:
>+            return VK_HOME;
>+        case kKeyCodeDpadLeft:
>+            return VK_LEFT;
>+        case kKeyCodeDpadUp:
>+            return VK_UP;
>+        case kKeyCodeDpadRight:
>+            return VK_RIGHT;
>+        case kKeyCodeDpadDown:
>+            return VK_DOWN;
>+        case kKeyCode0:
>+            return VK_0;
>+        case kKeyCode1:
>+            return VK_1;
>+        case kKeyCode2:
>+            return VK_2;
>+        case kKeyCode3:
>+            return VK_3;
>+        case kKeyCode4:
>+            return VK_4;
>+        case kKeyCode5:
>+            return VK_5;
>+        case kKeyCode6:
>+            return VK_6;
>+        case kKeyCode7:
>+            return VK_7;
>+        case kKeyCode8:
>+            return VK_8;
>+        case kKeyCode9:
>+            return VK_9;
>+        case kKeyCodeA:
>+            return VK_A;
>+        case kKeyCodeB:
>+            return VK_B;
>+        case kKeyCodeC:
>+            return VK_C;
>+        case kKeyCodeD:
>+            return VK_D;
>+        case kKeyCodeE:
>+            return VK_E;
>+        case kKeyCodeF:
>+            return VK_F;
>+        case kKeyCodeG:
>+            return VK_G;
>+        case kKeyCodeH:
>+            return VK_H;
>+        case kKeyCodeI:
>+            return VK_I;
>+        case kKeyCodeJ:
>+            return VK_J;
>+        case kKeyCodeK:
>+            return VK_K;
>+        case kKeyCodeL:
>+            return VK_L;
>+        case kKeyCodeM:
>+            return VK_M;
>+        case kKeyCodeN:
>+            return VK_N;
>+        case kKeyCodeO:
>+            return VK_O;
>+        case kKeyCodeP:
>+            return VK_P;
>+        case kKeyCodeQ:
>+            return VK_Q;
>+        case kKeyCodeR:
>+            return VK_R;
>+        case kKeyCodeS:
>+            return VK_S;
>+        case kKeyCodeT:
>+            return VK_T;
>+        case kKeyCodeU:
>+            return VK_U;
>+        case kKeyCodeV:
>+            return VK_V;
>+        case kKeyCodeW:
>+            return VK_W;
>+        case kKeyCodeX:
>+            return VK_X;
>+        case kKeyCodeY:
>+            return VK_Y;
>+        case kKeyCodeZ:
>+            return VK_Z;
>+        // colon
>+        case kKeyCodeSemicolon:
>+            return VK_OEM_1;
>+        case kKeyCodeComma:
>+            return VK_OEM_COMMA;
>+        case kKeyCodeMinus:
>+            return VK_OEM_MINUS;
>+        case kKeyCodeEquals:
>+            return VK_OEM_PLUS;
>+        case kKeyCodePeriod:
>+            return VK_OEM_PERIOD;
>+        case kKeyCodeSlash:
>+            return VK_OEM_2;
>+        // maybe not the right choice
>+        case kKeyCodeLeftBracket:
>+            return VK_OEM_4;
>+        case kKeyCodeBackslash:
>+            return VK_OEM_5;
>+        case kKeyCodeRightBracket:
>+            return VK_OEM_6;
>+        default:
>+            return 0;
>+    }
>+}
>+
>+static String keyIdentifierForAndroidKeyCode(int keyCode)
>+{
>+    // Does not return all of the same key identifiers, and
>+    // does not handle all the keys.
>+    switch (keyCode) {
>+        case kKeyCodeClear:
>+            return "Clear";
>+        case kKeyCodeNewline:
>+        case kKeyCodeDpadCenter:
>+            return "Enter";
>+        case kKeyCodeHome:
>+            return "Home";
>+        case kKeyCodeDpadDown:
>+            return "Down";
>+        case kKeyCodeDpadLeft:
>+            return "Left";
>+        case kKeyCodeDpadRight:
>+            return "Right";
>+        case kKeyCodeDpadUp:
>+            return "Up";
>+        // Standard says that DEL becomes U+00007F.
>+        case kKeyCodeDel:
>+            return "U+00007F";
>+        default:
>+            char upper[16];
>+            sprintf(upper, "U+%06X", windowsKeyCodeForKeyEvent(keyCode));
>+            return String(upper);
>+    }
>+}
>+
>+static inline String singleCharacterString(UChar32 c) 
>+{
>+    if (!c)
>+        return String();
>+    if (c > 0xffff) {
>+        UChar lead = U16_LEAD(c);
>+        UChar trail = U16_TRAIL(c);
>+        UChar utf16[2] = {lead, trail};
>+        return String(utf16, 2);
>+    }
>+    UChar n = (UChar)c;
>+    return String(&n, 1);
>+}
>+
>+PlatformKeyboardEvent::PlatformKeyboardEvent(int keyCode, UChar32 unichar,
>+                                             Type type, int repeatCount,
>+                                             ModifierKey mods)
>+    : m_type(type)
>+    , m_text(singleCharacterString(unichar))
>+    , m_unmodifiedText(singleCharacterString(unichar))
>+    , m_keyIdentifier(keyIdentifierForAndroidKeyCode(keyCode))
>+    , m_autoRepeat(repeatCount > 0)
>+    , m_windowsVirtualKeyCode(windowsKeyCodeForKeyEvent(keyCode))
>+    , m_nativeVirtualKeyCode(keyCode)
>+    , m_isKeypad(false)
>+    , m_shiftKey((mods & ShiftKey))
>+    , m_ctrlKey((mods & CtrlKey))
>+    , m_altKey((mods & AltKey))
>+    , m_metaKey((mods & MetaKey))
>+    // added for android
>+    , m_repeatCount(repeatCount)
>+    , m_unichar(unichar)
>+{
>+    // Copied from the mac port
>+    if (m_windowsVirtualKeyCode == '\r') {
>+        m_text = "\r";
>+        m_unmodifiedText = "\r";
>+    }
>+
>+    if (m_text == "\x7F")
>+        m_text = "\x8";
>+    if (m_unmodifiedText == "\x7F")
>+        m_unmodifiedText = "\x8";
>+
>+    if (m_windowsVirtualKeyCode == 9) {
>+        m_text = "\x9";
>+        m_unmodifiedText = "\x9";
>+    }
>+}
>+
>+bool PlatformKeyboardEvent::currentCapsLockState()
>+{
>+    notImplemented();
>+    return false;
>+}
>+
>+void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode)
>+{
>+    // Copied with modification from the mac port.
>+    ASSERT(m_type == KeyDown);
>+    ASSERT(type == RawKeyDown || type == Char);
>+    m_type = type;
>+    if (backwardCompatibilityMode)
>+        return;
>+
>+    if (type == RawKeyDown) {
>+        m_text = String();
>+        m_unmodifiedText = String();
>+    } else {
>+        m_keyIdentifier = String();
>+        m_windowsVirtualKeyCode = 0;
>+    }
>+}
>+
>+} // namespace WebCore
>Index: WebCore/platform/android/KeyboardCodes.h
>===================================================================
>--- WebCore/platform/android/KeyboardCodes.h	(revision 0)
>+++ WebCore/platform/android/KeyboardCodes.h	(revision 0)
>@@ -0,0 +1,545 @@
>+/*
>+ * Copyright 2009, The Android Open Source Project
>+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 
>+ *
>+ * All rights reserved.
>+ *
>+ * Redistribution and use in source and binary forms, with or without
>+ * modification, are permitted provided that the following conditions
>+ * are met:
>+ * 1. Redistributions of source code must retain the above copyright
>+ *    notice, this list of conditions and the following disclaimer.
>+ * 2. Redistributions in binary form must reproduce the above copyright
>+ *    notice, this list of conditions and the following disclaimer in the
>+ *    documentation and/or other materials provided with the distribution.
>+ *
>+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
>+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
>+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
>+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
>+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
>+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
>+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
>+ */
>+
>+#ifndef KeyboardCodes_H
>+#define KeyboardCodes_H
>+
>+namespace WebCore {
>+
>+// VK_LBUTTON (01) Left mouse button
>+// VK_RBUTTON (02) Right mouse button
>+// VK_CANCEL (03) Control-break processing
>+// VK_MBUTTON (04) Middle mouse button (three-button mouse)
>+// VK_XBUTTON1 (05)
>+// VK_XBUTTON2 (06)
>+
>+// VK_BACK (08) BACKSPACE key
>+const int VK_BACK = 0x08;
>+
>+// VK_TAB (09) TAB key
>+const int VK_TAB = 0x09;
>+
>+// VK_CLEAR (0C) CLEAR key
>+const int VK_CLEAR = 0x0C;
>+
>+// VK_RETURN (0D)
>+const int VK_RETURN = 0x0D;
>+
>+// VK_SHIFT (10) SHIFT key
>+const int VK_SHIFT = 0x10;
>+
>+// VK_CONTROL (11) CTRL key
>+const int VK_CONTROL = 0x11;
>+
>+// VK_MENU (12) ALT key
>+const int VK_MENU = 0x12;
>+
>+// VK_PAUSE (13) PAUSE key
>+const int VK_PAUSE = 0x13;
>+
>+// VK_CAPITAL (14) CAPS LOCK key
>+const int VK_CAPITAL = 0x14;
>+
>+// VK_KANA (15) Input Method Editor (IME) Kana mode
>+const int VK_KANA = 0x15;
>+
>+// VK_HANGUEL (15) IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
>+// VK_HANGUL (15) IME Hangul mode
>+const int VK_HANGUL = 0x15;
>+
>+// VK_JUNJA (17) IME Junja mode
>+const int VK_JUNJA = 0x17;
>+
>+// VK_FINAL (18) IME final mode
>+const int VK_FINAL = 0x18;
>+
>+// VK_HANJA (19) IME Hanja mode
>+const int VK_HANJA = 0x19;
>+
>+// VK_KANJI (19) IME Kanji mode
>+const int VK_KANJI = 0x19;
>+
>+// VK_ESCAPE (1B) ESC key
>+const int VK_ESCAPE = 0x1B;
>+
>+// VK_CONVERT (1C) IME convert
>+const int VK_CONVERT = 0x1C;
>+
>+// VK_NONCONVERT (1D) IME nonconvert
>+const int VK_NONCONVERT = 0x1D;
>+
>+// VK_ACCEPT (1E) IME accept
>+const int VK_ACCEPT = 0x1E;
>+
>+// VK_MODECHANGE (1F) IME mode change request
>+const int VK_MODECHANGE = 0x1F;
>+
>+// VK_SPACE (20) SPACEBAR
>+const int VK_SPACE = 0x20;
>+
>+// VK_PRIOR (21) PAGE UP key
>+const int VK_PRIOR = 0x21;
>+
>+// VK_NEXT (22) PAGE DOWN key
>+const int VK_NEXT = 0x22;
>+
>+// VK_END (23) END key
>+const int VK_END = 0x23;
>+
>+// VK_HOME (24) HOME key
>+const int VK_HOME = 0x24;
>+
>+// VK_LEFT (25) LEFT ARROW key
>+const int VK_LEFT = 0x25;
>+
>+// VK_UP (26) UP ARROW key
>+const int VK_UP = 0x26;
>+
>+// VK_RIGHT (27) RIGHT ARROW key
>+const int VK_RIGHT = 0x27;
>+
>+// VK_DOWN (28) DOWN ARROW key
>+const int VK_DOWN = 0x28;
>+
>+// VK_SELECT (29) SELECT key
>+const int VK_SELECT = 0x29;
>+
>+// VK_PRINT (2A) PRINT key
>+const int VK_PRINT = 0x2A;
>+
>+// VK_EXECUTE (2B) EXECUTE key
>+const int VK_EXECUTE = 0x2B;
>+
>+// VK_SNAPSHOT (2C) PRINT SCREEN key
>+const int VK_SNAPSHOT = 0x2C;
>+
>+// VK_INSERT (2D) INS key
>+const int VK_INSERT = 0x2D;
>+
>+// VK_DELETE (2E) DEL key
>+const int VK_DELETE = 0x2E;
>+
>+// VK_HELP (2F) HELP key
>+const int VK_HELP = 0x2F;
>+
>+// (30) 0 key
>+const int VK_0 = 0x30;
>+
>+// (31) 1 key
>+const int VK_1 = 0x31;
>+
>+// (32) 2 key
>+const int VK_2 = 0x32;
>+
>+// (33) 3 key
>+const int VK_3 = 0x33;
>+
>+// (34) 4 key
>+const int VK_4 = 0x34;
>+
>+// (35) 5 key;
>+
>+const int VK_5 = 0x35;
>+
>+// (36) 6 key
>+const int VK_6 = 0x36;
>+
>+// (37) 7 key
>+const int VK_7 = 0x37;
>+
>+// (38) 8 key
>+const int VK_8 = 0x38;
>+
>+// (39) 9 key
>+const int VK_9 = 0x39;
>+
>+// (41) A key
>+const int VK_A = 0x41;
>+
>+// (42) B key
>+const int VK_B = 0x42;
>+
>+// (43) C key
>+const int VK_C = 0x43;
>+
>+// (44) D key
>+const int VK_D = 0x44;
>+
>+// (45) E key
>+const int VK_E = 0x45;
>+
>+// (46) F key
>+const int VK_F = 0x46;
>+
>+// (47) G key
>+const int VK_G = 0x47;
>+
>+// (48) H key
>+const int VK_H = 0x48;
>+
>+// (49) I key
>+const int VK_I = 0x49;
>+
>+// (4A) J key
>+const int VK_J = 0x4A;
>+
>+// (4B) K key
>+const int VK_K = 0x4B;
>+
>+// (4C) L key
>+const int VK_L = 0x4C;
>+
>+// (4D) M key
>+const int VK_M = 0x4D;
>+
>+// (4E) N key
>+const int VK_N = 0x4E;
>+
>+// (4F) O key
>+const int VK_O = 0x4F;
>+
>+// (50) P key
>+const int VK_P = 0x50;
>+
>+// (51) Q key
>+const int VK_Q = 0x51;
>+
>+// (52) R key
>+const int VK_R = 0x52;
>+
>+// (53) S key
>+const int VK_S = 0x53;
>+
>+// (54) T key
>+const int VK_T = 0x54;
>+
>+// (55) U key
>+const int VK_U = 0x55;
>+
>+// (56) V key
>+const int VK_V = 0x56;
>+
>+// (57) W key
>+const int VK_W = 0x57;
>+
>+// (58) X key
>+const int VK_X = 0x58;
>+
>+// (59) Y key
>+const int VK_Y = 0x59;
>+
>+// (5A) Z key
>+const int VK_Z = 0x5A;
>+
>+// VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
>+const int VK_LWIN = 0x5B;
>+
>+// VK_RWIN (5C) Right Windows key (Natural keyboard)
>+const int VK_RWIN = 0x5C;
>+
>+// VK_APPS (5D) Applications key (Natural keyboard)
>+const int VK_APPS = 0x5D;
>+
>+// VK_SLEEP (5F) Computer Sleep key
>+const int VK_SLEEP = 0x5F;
>+
>+// VK_NUMPAD0 (60) Numeric keypad 0 key
>+const int VK_NUMPAD0 = 0x60;
>+
>+// VK_NUMPAD1 (61) Numeric keypad 1 key
>+const int VK_NUMPAD1 = 0x61;
>+
>+// VK_NUMPAD2 (62) Numeric keypad 2 key
>+const int VK_NUMPAD2 = 0x62;
>+
>+// VK_NUMPAD3 (63) Numeric keypad 3 key
>+const int VK_NUMPAD3 = 0x63;
>+
>+// VK_NUMPAD4 (64) Numeric keypad 4 key
>+const int VK_NUMPAD4 = 0x64;
>+
>+// VK_NUMPAD5 (65) Numeric keypad 5 key
>+const int VK_NUMPAD5 = 0x65;
>+
>+// VK_NUMPAD6 (66) Numeric keypad 6 key
>+const int VK_NUMPAD6 = 0x66;
>+
>+// VK_NUMPAD7 (67) Numeric keypad 7 key
>+const int VK_NUMPAD7 = 0x67;
>+
>+// VK_NUMPAD8 (68) Numeric keypad 8 key
>+const int VK_NUMPAD8 = 0x68;
>+
>+// VK_NUMPAD9 (69) Numeric keypad 9 key
>+const int VK_NUMPAD9 = 0x69;
>+
>+// VK_MULTIPLY (6A) Multiply key
>+const int VK_MULTIPLY = 0x6A;
>+
>+// VK_ADD (6B) Add key
>+const int VK_ADD = 0x6B;
>+
>+// VK_SEPARATOR (6C) Separator key
>+const int VK_SEPARATOR = 0x6C;
>+
>+// VK_SUBTRACT (6D) Subtract key
>+const int VK_SUBTRACT = 0x6D;
>+
>+// VK_DECIMAL (6E) Decimal key
>+const int VK_DECIMAL = 0x6E;
>+
>+// VK_DIVIDE (6F) Divide key
>+const int VK_DIVIDE = 0x6F;
>+
>+// VK_F1 (70) F1 key
>+const int VK_F1 = 0x70;
>+
>+// VK_F2 (71) F2 key
>+const int VK_F2 = 0x71;
>+
>+// VK_F3 (72) F3 key
>+const int VK_F3 = 0x72;
>+
>+// VK_F4 (73) F4 key
>+const int VK_F4 = 0x73;
>+
>+// VK_F5 (74) F5 key
>+const int VK_F5 = 0x74;
>+
>+// VK_F6 (75) F6 key
>+const int VK_F6 = 0x75;
>+
>+// VK_F7 (76) F7 key
>+const int VK_F7 = 0x76;
>+
>+// VK_F8 (77) F8 key
>+const int VK_F8 = 0x77;
>+
>+// VK_F9 (78) F9 key
>+const int VK_F9 = 0x78;
>+
>+// VK_F10 (79) F10 key
>+const int VK_F10 = 0x79;
>+
>+// VK_F11 (7A) F11 key
>+const int VK_F11 = 0x7A;
>+
>+// VK_F12 (7B) F12 key
>+const int VK_F12 = 0x7B;
>+
>+// VK_F13 (7C) F13 key
>+const int VK_F13 = 0x7C;
>+
>+// VK_F14 (7D) F14 key
>+const int VK_F14 = 0x7D;
>+
>+// VK_F15 (7E) F15 key
>+const int VK_F15 = 0x7E;
>+
>+// VK_F16 (7F) F16 key
>+const int VK_F16 = 0x7F;
>+
>+// VK_F17 (80H) F17 key
>+const int VK_F17 = 0x80;
>+
>+// VK_F18 (81H) F18 key
>+const int VK_F18 = 0x81;
>+
>+// VK_F19 (82H) F19 key
>+const int VK_F19 = 0x82;
>+
>+// VK_F20 (83H) F20 key
>+const int VK_F20 = 0x83;
>+
>+// VK_F21 (84H) F21 key
>+const int VK_F21 = 0x84;
>+
>+// VK_F22 (85H) F22 key
>+const int VK_F22 = 0x85;
>+
>+// VK_F23 (86H) F23 key
>+const int VK_F23 = 0x86;
>+
>+// VK_F24 (87H) F24 key
>+const int VK_F24 = 0x87;
>+
>+// VK_NUMLOCK (90) NUM LOCK key
>+const int VK_NUMLOCK = 0x90;
>+
>+// VK_SCROLL (91) SCROLL LOCK key
>+const int VK_SCROLL = 0x91;
>+
>+// VK_LSHIFT (A0) Left SHIFT key
>+const int VK_LSHIFT = 0xA0;
>+
>+// VK_RSHIFT (A1) Right SHIFT key
>+const int VK_RSHIFT = 0xA1;
>+
>+// VK_LCONTROL (A2) Left CONTROL key
>+const int VK_LCONTROL = 0xA2;
>+
>+// VK_RCONTROL (A3) Right CONTROL key
>+const int VK_RCONTROL = 0xA3;
>+
>+// VK_LMENU (A4) Left MENU key
>+const int VK_LMENU = 0xA4;
>+
>+// VK_RMENU (A5) Right MENU key
>+const int VK_RMENU = 0xA5;
>+
>+// VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
>+const int VK_BROWSER_BACK = 0xA6;
>+
>+// VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
>+const int VK_BROWSER_FORWARD = 0xA7;
>+
>+// VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
>+const int VK_BROWSER_REFRESH = 0xA8;
>+
>+// VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
>+const int VK_BROWSER_STOP = 0xA9;
>+
>+// VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
>+const int VK_BROWSER_SEARCH = 0xAA;
>+
>+// VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
>+const int VK_BROWSER_FAVORITES = 0xAB;
>+
>+// VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
>+const int VK_BROWSER_HOME = 0xAC;
>+
>+// VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
>+const int VK_VOLUME_MUTE = 0xAD;
>+
>+// VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
>+const int VK_VOLUME_DOWN = 0xAE;
>+
>+// VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
>+const int VK_VOLUME_UP = 0xAF;
>+
>+// VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
>+const int VK_MEDIA_NEXT_TRACK = 0xB0;
>+
>+// VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
>+const int VK_MEDIA_PREV_TRACK = 0xB1;
>+
>+// VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
>+const int VK_MEDIA_STOP = 0xB2;
>+
>+// VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
>+const int VK_MEDIA_PLAY_PAUSE = 0xB3;
>+
>+// VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
>+const int VK_MEDIA_LAUNCH_MAIL = 0xB4;
>+
>+// VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
>+const int VK_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5;
>+
>+// VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
>+const int VK_MEDIA_LAUNCH_APP1 = 0xB6;
>+
>+// VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
>+const int VK_MEDIA_LAUNCH_APP2 = 0xB7;
>+
>+// VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
>+const int VK_OEM_1 = 0xBA;
>+
>+// VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
>+const int VK_OEM_PLUS = 0xBB;
>+
>+// VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
>+const int VK_OEM_COMMA = 0xBC;
>+
>+// VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
>+const int VK_OEM_MINUS = 0xBD;
>+
>+// VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
>+const int VK_OEM_PERIOD = 0xBE;
>+
>+// VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
>+const int VK_OEM_2 = 0xBF;
>+
>+// VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
>+const int VK_OEM_3 = 0xC0;
>+
>+// VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
>+const int VK_OEM_4 = 0xDB;
>+
>+// VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
>+const int VK_OEM_5 = 0xDC;
>+
>+// VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
>+const int VK_OEM_6 = 0xDD;
>+
>+// VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
>+const int VK_OEM_7 = 0xDE;
>+
>+// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
>+const int VK_OEM_8 = 0xDF;
>+
>+// VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
>+const int VK_OEM_102 = 0xE2;
>+
>+// VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
>+const int VK_PROCESSKEY = 0xE5;
>+
>+// VK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
>+const int VK_PACKET = 0xE7;
>+
>+// VK_ATTN (F6) Attn key
>+const int VK_ATTN = 0xF6;
>+
>+// VK_CRSEL (F7) CrSel key
>+const int VK_CRSEL = 0xF7;
>+
>+// VK_EXSEL (F8) ExSel key
>+const int VK_EXSEL = 0xF8;
>+
>+// VK_EREOF (F9) Erase EOF key
>+const int VK_EREOF = 0xF9;
>+
>+// VK_PLAY (FA) Play key
>+const int VK_PLAY = 0xFA;
>+
>+// VK_ZOOM (FB) Zoom key
>+const int VK_ZOOM = 0xFB;
>+
>+// VK_NONAME (FC) Reserved for future use
>+const int VK_NONAME = 0xFC;
>+
>+// VK_PA1 (FD) PA1 key
>+const int VK_PA1 = 0xFD;
>+
>+// VK_OEM_CLEAR (FE) Clear key
>+const int VK_OEM_CLEAR = 0xFE;
>+
>+const int VK_UNKNOWN = 0;
>+
>+}
>+
>+#endif // KeyboardCodes_h
------- Comment #54 From 2009-06-08 17:20:59 PST -------
Created an attachment (id=31074) [details]
new patch part 4 with ChangeLog

The same reviewed and approved patch as the previous one, except change the signature from singleCharacterString(int c) to singleCharacterString(UChar32 c)
------- Comment #55 From 2009-06-08 17:56:43 PST -------
(From update of attachment 30004 [details])
spin off
------- Comment #56 From 2009-06-08 17:57:01 PST -------
(From update of attachment 30005 [details])
spin off
------- Comment #57 From 2009-06-08 18:14:47 PST -------
(From update of attachment 31070 [details])
lgtm.
------- Comment #58 From 2009-06-08 18:15:14 PST -------
(From update of attachment 31074 [details])
lgtm.
------- Comment #59 From 2009-06-10 11:53:43 PST -------
Patch #1 was landed in http://trac.webkit.org/changeset/43012.
------- Comment #60 From 2009-06-10 12:01:50 PST -------
Patch #2 landed in @r44580.
------- Comment #61 From 2009-06-10 12:05:21 PST -------
Part 3 landed in @r44581.
------- Comment #62 From 2009-06-10 12:07:22 PST -------
Patch #4 landed in @r44582.
------- Comment #63 From 2009-06-10 12:09:16 PST -------
Patch #5 landed in @r44583.
------- Comment #64 From 2009-06-10 12:12:23 PST -------
Patch #7 landed in @r44584.

Patches 6, 8, and 9 appear to have been disabled and I assume are not needed.
------- Comment #65 From 2009-06-10 12:16:32 PST -------
I see:

Patch #6 was moved to https://bugs.webkit.org/show_bug.cgi?id=26264.
Patch #8 was moved to https://bugs.webkit.org/show_bug.cgi?id=26265.
Patch #9 was moved to https://bugs.webkit.org/show_bug.cgi?id=26266.