RESOLVED FIXED Bug 38150
Refactoring: webkitEditableContentChangedEvent should be handled by the owner of appropriate the renderer
https://bugs.webkit.org/show_bug.cgi?id=38150
Summary Refactoring: webkitEditableContentChangedEvent should be handled by the owner...
Hajime Morrita
Reported 2010-04-26 17:14:45 PDT
A Refactoring to tackle Bug 26526.
Attachments
v0; a small change preparing for Bug 26526 (3.58 KB, patch)
2010-04-26 18:17 PDT, Hajime Morrita
no flags
v1; took feedback (3.84 KB, patch)
2010-04-28 18:02 PDT, Hajime Morrita
no flags
v1; took feedback (3.84 KB, patch)
2010-04-28 18:02 PDT, Hajime Morrita
no flags
v1; took feedback (5.75 KB, patch)
2010-04-28 19:14 PDT, Hajime Morrita
no flags
Hajime Morrita
Comment 1 2010-04-26 18:17:06 PDT
Created attachment 54364 [details] v0; a small change preparing for Bug 26526
Darin Adler
Comment 2 2010-04-27 12:47:28 PDT
Comment on attachment 54364 [details] v0; a small change preparing for Bug 26526 WebCore/html/HTMLFormControlElement.h:160 + virtual void defaultEventHandler(Event*); This should be as private as possible. I don't see any good reason to make it public. Either protected or private should work. Similarly, I think HTMLInputElement and HTMLTextAreaElement could now have private defaultEventHandler functions since there is no longer anyone calling directly. WebCore/rendering/TextControlInnerElements.cpp:119 + if (shadowAncestor && shadowAncestor->renderer()) { + ASSERT(shadowAncestor->renderer()->isTextControl()); We should not fetch the renderer() any more or assert that it is a text control. review- because I think it's worth refining this a tiny bit more, since its entire purpose is the refactoring.
Hajime Morrita
Comment 3 2010-04-28 18:02:45 PDT
Created attachment 54651 [details] v1; took feedback
Hajime Morrita
Comment 4 2010-04-28 18:02:48 PDT
Created attachment 54652 [details] v1; took feedback
Hajime Morrita
Comment 5 2010-04-28 18:04:07 PDT
Comment on attachment 54651 [details] v1; took feedback Oops, this is wrong.
Hajime Morrita
Comment 6 2010-04-28 18:05:43 PDT
Comment on attachment 54652 [details] v1; took feedback This is also wrong. I'm sorry to bother you ...
Hajime Morrita
Comment 7 2010-04-28 19:14:28 PDT
Created attachment 54663 [details] v1; took feedback
Hajime Morrita
Comment 8 2010-04-28 19:17:38 PDT
Hi Darin, thank you for reviewing and sorry for noisy attachments. (In reply to comment #2) > (From update of attachment 54364 [details]) > WebCore/html/HTMLFormControlElement.h:160 > + virtual void defaultEventHandler(Event*); > This should be as private as possible. I don't see any good reason to make it > public. Either protected or private should work. Similarly, I think > HTMLInputElement and HTMLTextAreaElement could now have private > defaultEventHandler functions since there is no longer anyone calling directly. Fixed moving defaultEventHandler() declarations from public to protected or private (based on inheritance relation) > WebCore/rendering/TextControlInnerElements.cpp:119 > + if (shadowAncestor && shadowAncestor->renderer()) { > + ASSERT(shadowAncestor->renderer()->isTextControl()); > We should not fetch the renderer() any more or assert that it is a text > control. Fixed.
Darin Adler
Comment 9 2010-04-30 13:17:13 PDT
Comment on attachment 54663 [details] v1; took feedback > + ASSERT(!shadowAncestor->renderer() || shadowAncestor->renderer()->isTextControl()); I'm not sure this assertion is helpful or needed. This code doesn't have any reason to care about the type of the renderer. r=me regardless
Eric Seidel (no email)
Comment 10 2010-05-02 19:28:03 PDT
Attachment 54663 [details] was posted by a committer and has review+, assigning to MORITA Hajime for commit.
Hajime Morrita
Comment 11 2010-05-05 23:03:45 PDT
Note You need to log in before you can comment on or make changes to this bug.