RESOLVED FIXED93941
[Forms] Set SpinButtonElement free from HTMLInputElement
https://bugs.webkit.org/show_bug.cgi?id=93941
Summary [Forms] Set SpinButtonElement free from HTMLInputElement
yosin
Reported 2012-08-14 01:20:37 PDT
I would like to set SpinButtonElement free from HTMLInputELement, because: 1. Concept and functionality of spin button is independent from the "input" element. 2. ease of mountainous: HTMLInputElement.{cpp,h} changes don't affect to SpinButtonElement 3. faster build time when HTMLInputElement.h changed. Frequency of HTMLInputElement.h changes is more often than SpinButtonElement.h, because HTMLInputElement has lot of methods for various input types.
Attachments
Patch 1 (55.93 KB, patch)
2012-08-16 01:44 PDT, yosin
no flags
Archive of layout-test-results from gce-cr-linux-04 (313.47 KB, application/zip)
2012-08-16 02:26 PDT, WebKit Review Bot
no flags
Patch 2 (55.95 KB, patch)
2012-08-16 03:42 PDT, yosin
no flags
Patch 3 (12.90 KB, patch)
2012-08-17 02:55 PDT, yosin
no flags
Patch 4 (13.55 KB, patch)
2012-08-19 22:10 PDT, yosin
no flags
yosin
Comment 1 2012-08-14 01:25:39 PDT
I also move code of SpinButtonElement to separate file. Since multiple fields time input UI, SpinButtonElement is not only text field inner element but also inner element of multiple fields time input UI.
yosin
Comment 2 2012-08-16 01:44:50 PDT
WebKit Review Bot
Comment 3 2012-08-16 02:26:16 PDT
Comment on attachment 158749 [details] Patch 1 Attachment 158749 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13517286 New failing tests: fast/forms/number/number-change-type-on-focus.html
WebKit Review Bot
Comment 4 2012-08-16 02:26:21 PDT
Created attachment 158757 [details] Archive of layout-test-results from gce-cr-linux-04 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-04 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
yosin
Comment 5 2012-08-16 03:42:09 PDT
Kent Tamura
Comment 6 2012-08-16 18:04:35 PDT
Comment on attachment 158768 [details] Patch 2 The patch doesn't have r? flag, but I have a comment. I recommend to split the patch into three pieces. 1. Add SpinButtonElement.{cpp.h} to build files, and remove unnecessary code 2. Rename StepActionHandler to SpinButtonOwner 3. Remaining Reviewers can set r+ for 1 and 2 easily because they are mechanical changes. Reviewers need to review 3 and it should be smaller in order to concentrate on it easily. Actually, your first patch had use-after-free.
Kent Tamura
Comment 7 2012-08-16 18:05:42 PDT
(In reply to comment #6) > Reviewers need to review 3 need to review 3 carefully
yosin
Comment 8 2012-08-16 19:02:16 PDT
Comment on attachment 158768 [details] Patch 2 Could you review this patch? Thanks in advance.
Kent Tamura
Comment 9 2012-08-16 19:08:06 PDT
Comment on attachment 158768 [details] Patch 2 r- because of comment #6
yosin
Comment 10 2012-08-17 02:55:03 PDT
yosin
Comment 11 2012-08-19 19:30:05 PDT
Comment on attachment 159064 [details] Patch 3 Could you review this patch? Thanks in advance.
Kent Tamura
Comment 12 2012-08-19 20:51:51 PDT
Comment on attachment 159064 [details] Patch 3 View in context: https://bugs.webkit.org/attachment.cgi?id=159064&action=review > Source/WebCore/ChangeLog:40 > + * html/TextFieldInputType.cpp: > + (WebCore::TextFieldInputType::focusAndSelectSpinButtonOwner): > + (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents): > + (WebCore::TextFieldInputType::shouldSpinButtonRespondToWheelEvents): > + * html/TextFieldInputType.h: > + (TextFieldInputType): > + * html/TimeInputType.cpp: > + (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::focusAndSelectEditControlOwner): > + (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::isEditControlOwnerFocused): > + * html/TimeInputType.h: > + (DateTimeEditControlOwnerImpl): > + * html/shadow/DateTimeEditElement.cpp: > + (WebCore::DateTimeEditElement::focusAndSelectSpinButtonOwner): > + (WebCore::DateTimeEditElement::shouldSpinButtonRespondToMouseEvents): > + (WebCore::DateTimeEditElement::shouldSpinButtonRespondToWheelEvents): > + * html/shadow/DateTimeEditElement.h: > + (EditControlOwner): > + (DateTimeEditElement): > + * html/shadow/SpinButtonElement.cpp: > + (WebCore::SpinButtonElement::defaultEventHandler): > + (WebCore::SpinButtonElement::forwardEvent): > + (WebCore::SpinButtonElement::willRespondToMouseMoveEvents): > + (WebCore::SpinButtonElement::willRespondToMouseClickEvents): > + (WebCore::SpinButtonElement::step): > + (WebCore::SpinButtonElement::shouldRespondToMouseEvents): > + * html/shadow/SpinButtonElement.h: > + (SpinButtonOwner): > + (SpinButtonElement): You had better add per-function comments, especially to existing functions.
yosin
Comment 13 2012-08-19 22:10:02 PDT
yosin
Comment 14 2012-08-19 22:11:18 PDT
Comment on attachment 159330 [details] Patch 4 Clearing flags on attachment: 159330 Committed r125997: <http://trac.webkit.org/changeset/125997>
yosin
Comment 15 2012-08-19 22:11:29 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.