WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 89544
Redraw slider tick marks when datalist changes.
https://bugs.webkit.org/show_bug.cgi?id=89544
Summary
Redraw slider tick marks when datalist changes.
Keishi Hattori
Reported
2012-06-19 19:11:20 PDT
We need to redraw the slider tick marks when the datalist changes.
Attachments
Patch
(32.88 KB, patch)
2012-06-19 20:37 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(40.74 KB, patch)
2012-06-21 05:03 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(40.77 KB, patch)
2012-06-21 06:48 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(42.66 KB, patch)
2012-06-22 02:48 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-01
(892.29 KB, application/zip)
2012-06-22 05:03 PDT
,
WebKit Review Bot
no flags
Details
Patch
(55.15 KB, patch)
2012-07-17 05:58 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(22.03 KB, patch)
2012-07-18 04:14 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(22.15 KB, patch)
2012-07-18 19:19 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(22.25 KB, patch)
2012-07-18 20:19 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(22.24 KB, patch)
2012-07-18 22:53 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from gce-cq-03
(398.11 KB, application/zip)
2012-07-19 00:10 PDT
,
WebKit Review Bot
no flags
Details
Patch
(22.24 KB, patch)
2012-07-19 00:56 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Keishi Hattori
Comment 1
2012-06-19 20:37:01 PDT
Created
attachment 148494
[details]
Patch
Keishi Hattori
Comment 2
2012-06-19 20:39:23 PDT
Here is the performance test results for setting id. The variance between runs is too high to tell a difference.
https://docs.google.com/spreadsheet/ccc?key=0AoaiM9jljUy8dDZfT3d6YzJ1UFFES2RmbHQ0Skw2bFE
Kent Tamura
Comment 3
2012-06-20 05:23:05 PDT
Please upload an EWS-cookable patch. Can you use dom/WebKitMutationObserver.* ?
Keishi Hattori
Comment 4
2012-06-21 05:03:39 PDT
Created
attachment 148769
[details]
Patch
Early Warning System Bot
Comment 5
2012-06-21 05:51:43 PDT
Comment on
attachment 148769
[details]
Patch
Attachment 148769
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/13025097
Early Warning System Bot
Comment 6
2012-06-21 06:12:15 PDT
Comment on
attachment 148769
[details]
Patch
Attachment 148769
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/13033084
Keishi Hattori
Comment 7
2012-06-21 06:48:34 PDT
Created
attachment 148788
[details]
Patch
Early Warning System Bot
Comment 8
2012-06-21 07:19:18 PDT
Comment on
attachment 148788
[details]
Patch
Attachment 148788
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/13028130
Early Warning System Bot
Comment 9
2012-06-21 07:31:32 PDT
Comment on
attachment 148788
[details]
Patch
Attachment 148788
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/13029120
WebKit Review Bot
Comment 10
2012-06-21 08:11:20 PDT
Comment on
attachment 148788
[details]
Patch
Attachment 148788
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13037121
Keishi Hattori
Comment 11
2012-06-22 02:48:53 PDT
Created
attachment 148986
[details]
Patch
WebKit Review Bot
Comment 12
2012-06-22 05:03:27 PDT
Comment on
attachment 148986
[details]
Patch
Attachment 148986
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13071011
New failing tests: fast/forms/datalist/update-range-with-datalist.html
WebKit Review Bot
Comment 13
2012-06-22 05:03:33 PDT
Created
attachment 149000
[details]
Archive of layout-test-results from ec2-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Keishi Hattori
Comment 14
2012-07-17 05:58:04 PDT
Created
attachment 152747
[details]
Patch
Gustavo Noronha (kov)
Comment 15
2012-07-17 06:08:10 PDT
Comment on
attachment 152747
[details]
Patch
Attachment 152747
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/13279140
Build Bot
Comment 16
2012-07-17 06:19:19 PDT
Comment on
attachment 152747
[details]
Patch
Attachment 152747
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/13276135
Gyuyoung Kim
Comment 17
2012-07-17 06:23:05 PDT
Comment on
attachment 152747
[details]
Patch
Attachment 152747
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/13284127
Build Bot
Comment 18
2012-07-17 06:26:22 PDT
Comment on
attachment 152747
[details]
Patch
Attachment 152747
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/13279141
Early Warning System Bot
Comment 19
2012-07-17 06:44:24 PDT
Comment on
attachment 152747
[details]
Patch
Attachment 152747
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/13276138
Early Warning System Bot
Comment 20
2012-07-17 06:53:58 PDT
Comment on
attachment 152747
[details]
Patch
Attachment 152747
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/13274146
Kent Tamura
Comment 21
2012-07-18 01:23:41 PDT
Comment on
attachment 152747
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152747&action=review
> Source/WebCore/html/HTMLInputElement.cpp:693 > - } > #if ENABLE(DATALIST) > - else if (attribute.name() == listAttr) > + } else if (attribute.name() == listAttr) {
I recommend not to change '}' position.
> Source/WebCore/html/HTMLInputElement.cpp:701 > #endif > #if ENABLE(INPUT_SPEECH) > - else if (attribute.name() == webkitspeechAttr) { > + } else if (attribute.name() == webkitspeechAttr) {
I recommend move '}' before #endif.
> Source/WebCore/html/HTMLInputElement.cpp:1517 > + m_listAttributeTargetObserver = ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this);
Do we need to create LIstAttributeTargetObserver when the input element is !inDocument()?
> Source/WebCore/html/HTMLInputElement.cpp:1523 > + if (isRangeControl()) > + setNeedsStyleRecalc();
Should introduce new virtual member function in InputType, or call setNeedsStyleRecalc() unconditionally.
> Source/WebCore/html/HTMLOptionElement.cpp:282 > + ContainerNode* dataList = parentNode(); > + while (dataList && !dataList->hasTagName(datalistTag)) > + dataList = dataList->parentNode(); > + > + if (!dataList) > + return 0; > + > + return static_cast<HTMLDataListElement*>(dataList);
Readability of this code isn't good. - Not following an idiom of parent traversal - static_cast<> is far from its requirement (hasTagName(datalistTag)) How about the following? for (ContainerNode parent = parentNode(); parent ; parent = parent->parentNode()) { if (parent->hasTagName(datalistTag)) return static_cast<HTMLDataListElement*>(dataList); } return 0;
> LayoutTests/ChangeLog:12 > + * fast/forms/datalist/update-range-with-datalist-expected.txt: Added. > + * fast/forms/datalist/update-range-with-datalist.html: Added. > + * platform/chromium-mac/fast/forms/datalist/update-range-with-datalist-expected.png: Added.
This can be a ref-test.
Keishi Hattori
Comment 22
2012-07-18 04:14:15 PDT
Created
attachment 152984
[details]
Patch
Keishi Hattori
Comment 23
2012-07-18 04:14:27 PDT
Comment on
attachment 152747
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152747&action=review
>> Source/WebCore/html/HTMLInputElement.cpp:693 >> + } else if (attribute.name() == listAttr) { > > I recommend not to change '}' position.
Done.
>> Source/WebCore/html/HTMLInputElement.cpp:701 >> + } else if (attribute.name() == webkitspeechAttr) { > > I recommend move '}' before #endif.
Done.
>> Source/WebCore/html/HTMLInputElement.cpp:1517 >> + m_listAttributeTargetObserver = ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this); > > Do we need to create LIstAttributeTargetObserver when the input element is !inDocument()?
No. Added check.
>> Source/WebCore/html/HTMLInputElement.cpp:1523 >> + setNeedsStyleRecalc(); > > Should introduce new virtual member function in InputType, or call setNeedsStyleRecalc() unconditionally.
We will be doing different things for input type text and color so I added a new virtual member function to InputType.
>> Source/WebCore/html/HTMLOptionElement.cpp:282 >> + return static_cast<HTMLDataListElement*>(dataList); > > Readability of this code isn't good. > - Not following an idiom of parent traversal > - static_cast<> is far from its requirement (hasTagName(datalistTag)) > > How about the following? > > for (ContainerNode parent = parentNode(); parent ; parent = parent->parentNode()) { > if (parent->hasTagName(datalistTag)) > return static_cast<HTMLDataListElement*>(dataList); > } > return 0;
Done.
>> LayoutTests/ChangeLog:12 >> + * platform/chromium-mac/fast/forms/datalist/update-range-with-datalist-expected.png: Added. > > This can be a ref-test.
Done.
Build Bot
Comment 24
2012-07-18 04:37:52 PDT
Comment on
attachment 152984
[details]
Patch
Attachment 152984
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/13278488
Build Bot
Comment 25
2012-07-18 05:20:35 PDT
Comment on
attachment 152984
[details]
Patch
Attachment 152984
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/13277512
Kent Tamura
Comment 26
2012-07-18 06:45:00 PDT
Comment on
attachment 152984
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152984&action=review
> Source/WebCore/html/HTMLInputElement.cpp:90 > +class ListAttributeTargetObserver : IdTargetObserver { > +public: > + static PassOwnPtr<ListAttributeTargetObserver> create(const AtomicString& id, HTMLInputElement*); > + virtual void idTargetChanged() OVERRIDE; > + > +private: > + ListAttributeTargetObserver(const AtomicString& id, HTMLInputElement*); > + > + HTMLInputElement* m_element; > +};
should be enclosed with #if ENABLE(DATALIST)
> Source/WebCore/html/HTMLInputElement.cpp:1522 > +{ > + if (!inDocument()) > + return; > + m_listAttributeTargetObserver = ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this); > +}
I know this works well. However this code might make a reader nervous because of possibility of leak of a wrong ListAttributeTargetObserver object. I recommend clearing m_listAttributeTargetObserver if !inDocument(), and use resetListAttributeTargetObserver() in removedFrom() too.
> Source/WebCore/html/HTMLInputElement.cpp:1811 > +PassOwnPtr<ListAttributeTargetObserver> ListAttributeTargetObserver::create(const AtomicString& id, HTMLInputElement* element) > +{ > + return adoptPtr(new ListAttributeTargetObserver(id, element)); > +} > + > +ListAttributeTargetObserver::ListAttributeTargetObserver(const AtomicString& id, HTMLInputElement* element) > + : IdTargetObserver(element->treeScope()->idTargetObserverRegistry(), id) > + , m_element(element) > +{ > +} > + > +void ListAttributeTargetObserver::idTargetChanged() > +{ > + m_element->listAttributeTargetChanged(); > +}
should be enclosed with #if ENABLE(DATALIST)
> Source/WebCore/html/HTMLInputElement.h:398 > + OwnPtr<ListAttributeTargetObserver> m_listAttributeTargetObserver;
should be enclosed with #if ENABLE(DATALIST)
Keishi Hattori
Comment 27
2012-07-18 19:19:24 PDT
Created
attachment 153160
[details]
Patch
Kent Tamura
Comment 28
2012-07-18 19:23:15 PDT
Comment on
attachment 153160
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=153160&action=review
> Source/WebCore/html/HTMLInputElement.cpp:1446 > +#if ENABLE(DATALIST) > + resetListAttributeTargetObserver(); > +#endif > HTMLTextFormControlElement::removedFrom(insertionPoint);
Node::removedFrom() clears inDocument flag. So this should be HTMLTextFormControlElement::removedFrom(insertionPoint); ASSERT(!inDocument()); #if ENABLE(DATALIST) resetListAttributeTargetObserver(); #endif
Keishi Hattori
Comment 29
2012-07-18 20:19:12 PDT
Created
attachment 153168
[details]
Patch
Kent Tamura
Comment 30
2012-07-18 21:10:57 PDT
Comment on
attachment 153168
[details]
Patch ok
Keishi Hattori
Comment 31
2012-07-18 22:53:49 PDT
Created
attachment 153181
[details]
Patch
WebKit Review Bot
Comment 32
2012-07-19 00:10:20 PDT
Comment on
attachment 153181
[details]
Patch Rejecting
attachment 153181
[details]
from commit-queue. New failing tests: fast/forms/datalist/update-range-with-datalist.html Full output:
http://queues.webkit.org/results/13273776
WebKit Review Bot
Comment 33
2012-07-19 00:10:26 PDT
Created
attachment 153192
[details]
Archive of layout-test-results from gce-cq-03 The attached test failures were seen while running run-webkit-tests on the commit-queue. Bot: gce-cq-03 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Keishi Hattori
Comment 34
2012-07-19 00:56:39 PDT
Created
attachment 153200
[details]
Patch
WebKit Review Bot
Comment 35
2012-07-19 01:55:21 PDT
Comment on
attachment 153200
[details]
Patch Clearing flags on attachment: 153200 Committed
r123081
: <
http://trac.webkit.org/changeset/123081
>
WebKit Review Bot
Comment 36
2012-07-19 01:55: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.
Top of Page
Format For Printing
XML
Clone This Bug