WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
52608
Refactoring: EventHandler::handleTextInputEvent should accept an enum instead of three bools
https://bugs.webkit.org/show_bug.cgi?id=52608
Summary
Refactoring: EventHandler::handleTextInputEvent should accept an enum instea...
Hajime Morrita
Reported
2011-01-17 21:14:06 PST
Coined at
Bug 5241
. Refactoring three bool parameters into one enum.
Attachments
Patch
(18.97 KB, patch)
2011-01-18 18:35 PST
,
Hajime Morrita
rniwa
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Hajime Morrita
Comment 1
2011-01-18 18:35:14 PST
Created
attachment 79380
[details]
Patch
Ryosuke Niwa
Comment 2
2011-01-18 18:47:37 PST
Comment on
attachment 79380
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=79380&action=review
> Source/WebCore/page/EventHandler.cpp:2670 > - RefPtr<TextEvent> event = TextEvent::create(m_frame->domWindow(), text, TextEvent::selectInputType(isLineBreak, isBackTab)); > + RefPtr<TextEvent> event = TextEvent::create(m_frame->domWindow(), text, inputType);
Only concern I have with this change is that we may permit inputType to be TextEventInputPaste or TextEventInputDrop here. Can we add an assertion that this can only be Keyboard, LineBreak, or BackTab?
Ryosuke Niwa
Comment 3
2011-01-18 18:47:48 PST
Thanks for making this change!
Ryosuke Niwa
Comment 4
2011-01-18 18:51:59 PST
Comment on
attachment 79380
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=79380&action=review
> Source/WebCore/dom/TextEventInputType.h:9 > +/* > + * Copyright (C) 2010 Google, Inc. 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
Oops, we shouldn't be claiming to be the author if we're just moving it here.
Ryosuke Niwa
Comment 5
2011-01-18 18:55:16 PST
Comment on
attachment 79380
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=79380&action=review
> Source/WebCore/WebCore.xcodeproj/project.pbxproj:22369 > F3D4C47912E07663003DA150 /* InspectorBrowserDebuggerAgent.h in Headers */, > + A77B41A012E675A90054343D /* TextEventInputType.h in Headers */,
You probably want to put this in the right place as well.
Ryosuke Niwa
Comment 6
2011-01-18 18:59:53 PST
Comment on
attachment 79380
[details]
Patch (In reply to
comment #4
)
> Oops, we shouldn't be claiming to be the author if we're just moving it here.
I just realized you're the original author of this enum in
http://trac.webkit.org/changeset/65287
. I put my r+ back. Please still correct the location of TextEventInputType.h in WebCore.xcodeproj/project.pbxproj as noted above.
Hajime Morrita
Comment 7
2011-01-18 19:52:35 PST
> I just realized you're the original author of this enum in
http://trac.webkit.org/changeset/65287
. I put my r+ back. > > Please still correct the location of TextEventInputType.h in WebCore.xcodeproj/project.pbxproj as noted above.
Thanks! I'll land this after fixing project.pbxproj.
Hajime Morrita
Comment 8
2011-01-18 20:12:29 PST
Committed
r76098
: <
http://trac.webkit.org/changeset/76098
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug