Bug 43893

Summary: [Refactoring] TextEvent class has to many flags
Product: WebKit Reporter: Hajime Morrita <morrita>
Component: DOMAssignee: Hajime Morrita <morrita>
Status: RESOLVED FIXED    
Severity: Normal CC: tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 43778    
Attachments:
Description Flags
Patch
none
Patch tony: review+

Hajime Morrita
Reported 2010-08-11 20:15:48 PDT
Attachments
Patch (8.09 KB, patch)
2010-08-11 20:21 PDT, Hajime Morrita
no flags
Patch (8.44 KB, patch)
2010-08-12 04:29 PDT, Hajime Morrita
tony: review+
Hajime Morrita
Comment 1 2010-08-11 20:21:15 PDT
Ryosuke Niwa
Comment 2 2010-08-12 00:39:36 PDT
Comment on attachment 64182 [details] Patch > --- a/WebCore/dom/TextEvent.cpp > +++ b/WebCore/dom/TextEvent.cpp ... > TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, PassRefPtr<DocumentFragment> pastingFragment, > - bool isPaste, bool shouldSmartReplace, bool shouldMatchStyle) > + TextEvent::InputType inputType, bool shouldSmartReplace, bool shouldMatchStyle) > : UIEvent(eventNames().textInputEvent, true, true, view, 0) > + , m_inputType(inputType) > , m_data(data) > - , m_isLineBreak(false) > - , m_isBackTab(false) > , m_pastingFragment(pastingFragment) > - , m_isPaste(isPaste) > , m_shouldSmartReplace(shouldSmartReplace) > , m_shouldMatchStyle(shouldMatchStyle) This constructor looks too general to me. It might be better to have two constructors one for pasting and another for other input types.
Hajime Morrita
Comment 3 2010-08-12 04:29:48 PDT
Hajime Morrita
Comment 4 2010-08-12 04:30:46 PDT
Hi Ryosuke, thank you for your quick review! I updated the patch. > This constructor looks too general to me. It might be better to have two constructors one for pasting and another for other input types. Agreed and fixed to split the constructor into 2.
Tony Chang
Comment 5 2010-08-12 09:58:07 PDT
Comment on attachment 64207 [details] Patch Great! Thanks for doing this.
Hajime Morrita
Comment 6 2010-08-12 18:45:08 PDT
Note You need to log in before you can comment on or make changes to this bug.