Bug 49426

Summary: KeyboardEvent::keyIdentifier() should return "const String&"
Product: WebKit Reporter: Kent Tamura <tkent>
Component: DOMAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Minor CC: darin, hamaji
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: https://bugs.webkit.org/show_bug.cgi?id=48317#c2
Bug Depends on:    
Bug Blocks: 48317    
Attachments:
Description Flags
Patch none

Kent Tamura
Reported 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.
Attachments
Patch (6.28 KB, patch)
2010-11-11 22:34 PST, Kent Tamura
no flags
Kent Tamura
Comment 1 2010-11-11 22:34:22 PST
Andreas Kling
Comment 2 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();
Kent Tamura
Comment 3 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.
Note You need to log in before you can comment on or make changes to this bug.