RESOLVED FIXED 93928
[Forms] Move wheel event handler to spin button class
https://bugs.webkit.org/show_bug.cgi?id=93928
Summary [Forms] Move wheel event handler to spin button class
yosin
Reported 2012-08-13 21:10:42 PDT
In current implementation, wheel event handler is implemented in TextFieldInputType and called from NumberInputType and BaseDateTimeInputType class. To shared wheel event handler code within them and multiple field time UI, I would like to move implementation of wheel event handler into SpinButton class.
Attachments
Patch 1 (11.14 KB, patch)
2012-08-13 23:19 PDT, yosin
no flags
Patch 2 (11.18 KB, patch)
2012-08-14 00:53 PDT, yosin
no flags
yosin
Comment 1 2012-08-13 23:19:58 PDT
yosin
Comment 2 2012-08-13 23:21:03 PDT
Comment on attachment 158230 [details] Patch 1 Could you review this patch Thanks in advance.
Kent Tamura
Comment 3 2012-08-14 00:08:03 PDT
Comment on attachment 158230 [details] Patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=158230&action=review > Source/WebCore/html/shadow/TextControlInnerElements.cpp:354 > + HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost()); > + if (input->disabled() || input->readOnly() || !input->focused()) > + return; > + You wanted to remove HTMLInputElement dependency from SpinButtonElement, right?
yosin
Comment 4 2012-08-14 00:48:32 PDT
(In reply to comment #3) > (From update of attachment 158230 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=158230&action=review > > > Source/WebCore/html/shadow/TextControlInnerElements.cpp:354 > > + HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost()); > > + if (input->disabled() || input->readOnly() || !input->focused()) > > + return; > > + > > You wanted to remove HTMLInputElement dependency from SpinButtonElement, right? Yes, I really want to do so. I would like to make this patch to be handling wheel event only. I'll free SpinButtonElement ffrom HTMLInputElement dependency in other patches like: Patch 1. Do svn copy TextControllInnerElements.{cpp,h} to SpinButtonElement.{cpp,h} Patch 2. Rename SpinButtonActionHandler to SpinButtonElementOwner with willHandleStepAction()
yosin
Comment 5 2012-08-14 00:53:15 PDT
yosin
Comment 6 2012-08-14 00:54:23 PDT
Comment on attachment 158249 [details] Patch 2 Could you review this patch? Thanks in advance. = Changes since the last review = * (SpinButtonElement::forwardEvent): Check SpinButtonElement rendered(== calling renderBox() != nullptr)
Kent Tamura
Comment 7 2012-08-14 01:27:40 PDT
Comment on attachment 158249 [details] Patch 2 ok
yosin
Comment 8 2012-08-14 01:44:55 PDT
Comment on attachment 158249 [details] Patch 2 Clearing flags on attachment: 158249 Committed r125522: <http://trac.webkit.org/changeset/125522>
yosin
Comment 9 2012-08-14 01:44:59 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.