WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
162369
Align HTMLLabelElement.prototype.form with the HTML specification
https://bugs.webkit.org/show_bug.cgi?id=162369
Summary
Align HTMLLabelElement.prototype.form with the HTML specification
Chris Dumez
Reported
2016-09-21 19:12:55 PDT
Align HTMLLabelElement.prototype.label with the HTML specification: -
https://html.spec.whatwg.org/#dom-label-form
Firefox and Chrome match the specification.
Attachments
Patch
(19.91 KB, patch)
2016-09-21 19:20 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2
(6.47 MB, application/zip)
2016-09-21 20:39 PDT
,
Build Bot
no flags
Details
Patch
(22.17 KB, patch)
2016-09-21 20:42 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-yosemite-wk2
(1.05 MB, application/zip)
2016-09-21 22:36 PDT
,
Build Bot
no flags
Details
Patch
(22.10 KB, patch)
2016-09-22 15:53 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-09-21 19:20:31 PDT
Created
attachment 289506
[details]
Patch
Build Bot
Comment 2
2016-09-21 20:39:31 PDT
Comment on
attachment 289506
[details]
Patch
Attachment 289506
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/2122464
New failing tests: imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/form.html
Build Bot
Comment 3
2016-09-21 20:39:34 PDT
Created
attachment 289512
[details]
Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-elcapitan-wk2 Platform: Mac OS X 10.11.6
Chris Dumez
Comment 4
2016-09-21 20:42:55 PDT
Created
attachment 289513
[details]
Patch
Build Bot
Comment 5
2016-09-21 22:36:24 PDT
Comment on
attachment 289513
[details]
Patch
Attachment 289513
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/2123128
New failing tests: fast/images/move-image-to-new-document.html
Build Bot
Comment 6
2016-09-21 22:36:27 PDT
Created
attachment 289520
[details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Chris Dumez
Comment 7
2016-09-21 22:52:42 PDT
(In reply to
comment #6
)
> Created
attachment 289520
[details]
> Archive of layout-test-results from ews104 for mac-yosemite-wk2 > > The attached test failures were seen while running run-webkit-tests on the > mac-wk2-ews. > Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
(In reply to
comment #5
)
> Comment on
attachment 289513
[details]
> Patch > >
Attachment 289513
[details]
did not pass mac-wk2-ews (mac-wk2): > Output:
http://webkit-queues.webkit.org/results/2123128
> > New failing tests: > fast/images/move-image-to-new-document.html
This test seems flaky, it also failed on my other patch.
Alexey Proskuryakov
Comment 8
2016-09-21 22:57:46 PDT
Caused by
r206244
, rolling it out.
Alexey Proskuryakov
Comment 9
2016-09-21 23:03:59 PDT
Rolled out in
r206249
.
Chris Dumez
Comment 10
2016-09-22 08:58:04 PDT
(In reply to
comment #8
)
> Caused by
r206244
, rolling it out.
Thanks Alexey!
Chris Dumez
Comment 11
2016-09-22 15:53:53 PDT
Created
attachment 289619
[details]
Patch
Chris Dumez
Comment 12
2016-09-23 09:29:10 PDT
Anyone interested in reviewing? The new implementation matches the specification exactly. Also this aligns our behavior with both Chrome and Firefox, thus improving interoperability.
Alex Christensen
Comment 13
2016-09-23 10:51:16 PDT
Comment on
attachment 289619
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=289619&action=review
> Source/WebCore/html/HTMLLabelElement.h:35 > WEBCORE_EXPORT LabelableElement* control(); > - WEBCORE_EXPORT HTMLFormElement* form() const; > + WEBCORE_EXPORT HTMLFormElement* form();
We should make control const instead of form non-const.
Chris Dumez
Comment 14
2016-09-23 11:23:00 PDT
(In reply to
comment #13
)
> Comment on
attachment 289619
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=289619&action=review
> > > Source/WebCore/html/HTMLLabelElement.h:35 > > WEBCORE_EXPORT LabelableElement* control(); > > - WEBCORE_EXPORT HTMLFormElement* form() const; > > + WEBCORE_EXPORT HTMLFormElement* form(); > > We should make control const instead of form non-const.
I don't mind either way but you do realize this means I'll have to add a const_cast inside control(), right? In the past, you have complained about those.
Ryosuke Niwa
Comment 15
2016-09-23 14:32:12 PDT
Comment on
attachment 289619
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=289619&action=review
>>> Source/WebCore/html/HTMLLabelElement.h:35 >>> + WEBCORE_EXPORT HTMLFormElement* form(); >> >> We should make control const instead of form non-const. > > I don't mind either way but you do realize this means I'll have to add a const_cast inside control(), right? In the past, you have complained about those.
I think the patch is fine as is but change const-ness if Alex feels strongly either way.
Chris Dumez
Comment 16
2016-09-23 14:47:59 PDT
(In reply to
comment #15
)
> Comment on
attachment 289619
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=289619&action=review
> > >>> Source/WebCore/html/HTMLLabelElement.h:35 > >>> + WEBCORE_EXPORT HTMLFormElement* form(); > >> > >> We should make control const instead of form non-const. > > > > I don't mind either way but you do realize this means I'll have to add a const_cast inside control(), right? In the past, you have complained about those. > > I think the patch is fine as is but change const-ness if Alex feels strongly > either way.
The issue with making form() const is that it requires control() to be const as well. However, control() uses descendantsOfType() internally which uses a const iterator if |this| is const. Therefore, to make control() const I would need to either const_cast |this| before calling descendantsOfType() or const_cast the Element pointed to by the const_iterator returned by descendantsOfType().
Chris Dumez
Comment 17
2016-09-23 14:48:44 PDT
Comment on
attachment 289619
[details]
Patch Clearing flags on attachment: 289619 Committed
r206332
: <
http://trac.webkit.org/changeset/206332
>
Chris Dumez
Comment 18
2016-09-23 14:48:52 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