Bug 49426 - KeyboardEvent::keyIdentifier() should return "const String&"
Summary: KeyboardEvent::keyIdentifier() should return "const String&"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Kent Tamura
URL: https://bugs.webkit.org/show_bug.cgi?...
Keywords:
Depends on:
Blocks: 48317
  Show dependency treegraph
 
Reported: 2010-11-11 22:30 PST by Kent Tamura
Modified: 2010-11-14 21:21 PST (History)
2 users (show)

See Also:


Attachments
Patch (6.28 KB, patch)
2010-11-11 22:34 PST, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2010-11-11 22:30:30 PST
Darin wrote:
> > WebCore/html/InputType.cpp:278
> > +    String key = static_cast<KeyboardEvent*>(event)->keyIdentifier();
> 
> It would be better if keyIdentifier returned a const String& and this local variable was also const String&. There’s no need to churn the reference count just to check string equality.
Comment 1 Kent Tamura 2010-11-11 22:34:22 PST
Created attachment 73701 [details]
Patch
Comment 2 Andreas Kling 2010-11-12 04:43:20 PST
Comment on attachment 73701 [details]
Patch

You missed this one, please fix before landing.
WebKit/mac/WebCoreSupport/WebEditorClient.mm:646:    String key = event->keyIdentifier();
Comment 3 Kent Tamura 2010-11-14 21:20:44 PST
(In reply to comment #2)
> (From update of attachment 73701 [details])
> You missed this one, please fix before landing.
> WebKit/mac/WebCoreSupport/WebEditorClient.mm:646:    String key = event->keyIdentifier();

Thank you!  I fixed it, and confirmed no other keyIndentifier() in WebKit/ directory.

Committed as r71995.