RESOLVED FIXED Bug 38713
Support the labels attribute in labelable form controls
https://bugs.webkit.org/show_bug.cgi?id=38713
Summary Support the labels attribute in labelable form controls
Yael
Reported 2010-05-06 18:51:01 PDT
The elements specified http://dev.w3.org/html5/spec/Overview.html#category-label should support the labels attribute.
Attachments
Patch. (34.77 KB, patch)
2010-05-18 20:45 PDT, Yael
tkent: review-
Patch addressing issues found in comment #2. (50.38 KB, patch)
2010-05-21 14:13 PDT, Yael
no flags
Remove tabs. (50.38 KB, patch)
2010-05-21 14:27 PDT, Yael
tkent: review-
Patch, remove "htmlFor" from parseMappedAttribute. (Comment #6) (50.33 KB, patch)
2010-05-22 11:59 PDT, Yael
no flags
Update Visual Studio project file. (50.85 KB, patch)
2010-05-22 19:20 PDT, Yael
no flags
Patch, try again on the windows bot (50.88 KB, patch)
2010-05-23 05:30 PDT, Yael
tkent: review-
Remove un-needed argument (50.82 KB, patch)
2010-05-25 16:59 PDT, Yael
tkent: review+
Yael
Comment 1 2010-05-18 20:45:20 PDT
Created attachment 56449 [details] Patch. This patch adds a new cache type to NodeRareData. The cache is used for the labels list for each form control and is created on demand.
Kent Tamura
Comment 2 2010-05-20 01:23:48 PDT
Comment on attachment 56449 [details] Patch. WebCore/dom/Node.cpp:900 + void Node::notifyLocalNodeListsLabelChanged() The content of this function is identical to notifyLocalNodeListsChildrenChanged(). Don't you want to invalidate just NodeListsNodeData::m_labelsNodeListCache? WebCore/dom/Node.cpp:2532 + markDOMObjectWrapper(markStack, globalData, nodeLists->m_labelsNodeListCache.get()); No tests for this behavior. WebCore/html/HTMLLabelElement.cpp:177 + document()->notifyLocalNodeListsLabelChanged(); This part should be moved to parseMappedAttribute(). because we need to call it for "for" HTML attribute change too. We need to have tests for label.setAttribute("for", ...) and label.removeAttribute("for"). LayoutTests/ChangeLog:8 + * fast/form-controls: Added. Why you need to have new directory? Isn't fast/forms enough? LayoutTests/ChangeLog:20 + * fast/form-controls/labels-remove-parent-label.html: Added. It seems we can write these tests in script-tests format.
Yael
Comment 3 2010-05-21 14:13:37 PDT
Created attachment 56745 [details] Patch addressing issues found in comment #2.
WebKit Review Bot
Comment 4 2010-05-21 14:17:45 PDT
Attachment 56745 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebCore/dom/Node.cpp:903: Tab found; better to use spaces [whitespace/tab] [1] WebCore/dom/Node.cpp:904: Tab found; better to use spaces [whitespace/tab] [1] Total errors found: 2 in 48 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yael
Comment 5 2010-05-21 14:27:51 PDT
Created attachment 56747 [details] Remove tabs.
Kent Tamura
Comment 6 2010-05-22 09:57:06 PDT
Comment on attachment 56747 [details] Remove tabs. WebCore/html/HTMLLabelElement.cpp:178 + if (attribute->name() == forAttr || attribute->name() == "htmlFor") { You don't need to handle "htmlFor". HTML5 doesn't define such HTML attribute. Other parts look ok.
Yael
Comment 7 2010-05-22 11:59:56 PDT
Created attachment 56783 [details] Patch, remove "htmlFor" from parseMappedAttribute. (Comment #6)
WebKit Review Bot
Comment 8 2010-05-22 14:26:59 PDT
Yael
Comment 9 2010-05-22 19:20:49 PDT
Created attachment 56805 [details] Update Visual Studio project file.
Yael
Comment 10 2010-05-23 05:28:01 PDT
I have no idea why WebCore.vcproj did not apply cleanly. Is applied and the patch did build on my windows machine. Is it possible to get the rej file from that machine? In the meantime, I am just going to try again :-)
Yael
Comment 11 2010-05-23 05:30:45 PDT
Created attachment 56819 [details] Patch, try again on the windows bot No changes from previous patch, other than updaing my environment.
Yael
Comment 12 2010-05-23 17:11:33 PDT
This might be already known, but the windows bot is rejecting every patch that modifies WebCore.vcproj, not only this patch. For example these have the same problem: https://bugs.webkit.org/show_bug.cgi?id=39574 https://bugs.webkit.org/show_bug.cgi?id=39557
Eric Seidel (no email)
Comment 13 2010-05-23 17:51:02 PDT
Sounds like a bug in the EWS bot. Or possibly svn-apply, but probably something is just funny about our win-ews configuration if "webkit-patch apply-attachment 56819 [details]" works fine off the bot (I have not tested).
Chris Jerdonek
Comment 14 2010-05-23 20:14:35 PDT
(In reply to comment #13) > Sounds like a bug in the EWS bot. Or possibly svn-apply, but probably something is just funny about our win-ews configuration if "webkit-patch apply-attachment 56819 [details]" works fine off the bot (I have not tested). Might this have something to do with .vcproj files using carriage returns? See this report, for instance: https://bugs.webkit.org/show_bug.cgi?id=38149 Maybe carriage returns are getting deleted somewhere along the line, causing the patch not to apply.
Yael
Comment 15 2010-05-24 04:30:01 PDT
(In reply to comment #14) > (In reply to comment #13) > > Sounds like a bug in the EWS bot. Or possibly svn-apply, but probably something is just funny about our win-ews configuration if "webkit-patch apply-attachment 56819 [details] [details]" works fine off the bot (I have not tested). > > Might this have something to do with .vcproj files using carriage returns? > > See this report, for instance: > > https://bugs.webkit.org/show_bug.cgi?id=38149 > > Maybe carriage returns are getting deleted somewhere along the line, causing the patch not to apply. It probably is a carriage return issue. But there is probably also a SVN configuration issue on that machine. I am saying that because the patch did apply on my windows machine (inside a cygwin shell).
Eric Seidel (no email)
Comment 16 2010-05-24 10:42:59 PDT
The EWS machines use Git, they apply patches via svn-apply. If we believe this is an SVN or EWS bug we should get a bug on file.
Yael
Comment 17 2010-05-24 11:28:54 PDT
(In reply to comment #16) > The EWS machines use Git, they apply patches via svn-apply. If we believe this is an SVN or EWS bug we should get a bug on file. Filed https://bugs.webkit.org/show_bug.cgi?id=39607
Kent Tamura
Comment 18 2010-05-25 02:41:23 PDT
Comment on attachment 56819 [details] Patch, try again on the windows bot WebCore/dom/Node.cpp:940 + void Node::removeCachedLabelsNodeList(DynamicNodeList* list, Node* /*node*/) The Node* parameter is not used. We have no reason to keep it.
Yael
Comment 19 2010-05-25 16:59:25 PDT
Created attachment 57054 [details] Remove un-needed argument
Kent Tamura
Comment 20 2010-05-26 03:24:57 PDT
Comment on attachment 57054 [details] Remove un-needed argument OK.
Yael
Comment 21 2010-05-26 06:15:12 PDT
Note You need to log in before you can comment on or make changes to this bug.