Bug 80239

Summary: [Forms] The "legend" element should not be a form-associated element.
Product: WebKit Reporter: yosin
Component: FormsAssignee: yosin
Status: RESOLVED FIXED    
Severity: Normal CC: tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 80381    
Attachments:
Description Flags
Patch 1
none
Patch 2
none
Patch 3 none

yosin
Reported 2012-03-04 21:29:51 PST
According the specification, the "legend" element isn't a form-associate element. http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#form-associated-element However, current implementation of HTMLLegendElement is derived from HTMLFormControlElement. We have unexpected dependency between HTMLLegendElement and HTMLFormControlElement and FormAssociatedElement. Also, We waste time in loop of HTMLFormElement::m_associatedElements. For clear understanding and better maintainability, it is better that C++ class hierarchy should be similar to specified in the specification.
Attachments
Patch 1 (6.77 KB, patch)
2012-03-05 22:55 PST, yosin
no flags
Patch 2 (6.87 KB, patch)
2012-03-06 17:52 PST, yosin
no flags
Patch 3 (6.95 KB, patch)
2012-03-06 19:42 PST, yosin
no flags
yosin
Comment 1 2012-03-05 22:55:02 PST
yosin
Comment 2 2012-03-05 22:56:20 PST
This bug is part of HTMLFormControlElement re-factoring bug https://bugs.webkit.org/show_bug.cgi?id=80381
Kent Tamura
Comment 3 2012-03-06 17:18:30 PST
Comment on attachment 130299 [details] Patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=130299&action=review The code change looks ok. > Source/WebCore/ChangeLog:9 > + This patch changes base class of HTMLLegendElement to HTMLElement from > + HTMLFormControlElement. You should mention a reason why we should change this.
yosin
Comment 4 2012-03-06 17:52:11 PST
Kent Tamura
Comment 5 2012-03-06 17:58:02 PST
Comment on attachment 130500 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=130500&action=review > Source/WebCore/ChangeLog:10 > + This patch changes base class of HTMLLegendElement to HTMLElement from > + HTMLFormControlElement to match C++ class hierarchy to the specification > + and to be out from FormAssociatedElement class tree. So, why we should follow the class hierarchy in the specification? Why HTMLLegendElement should not inherit from FormAssociatedElement? You should say the benefit of the change.
yosin
Comment 6 2012-03-06 19:42:53 PST
Kent Tamura
Comment 7 2012-03-06 19:50:41 PST
Comment on attachment 130524 [details] Patch 3 ok
WebKit Review Bot
Comment 8 2012-03-07 00:09:32 PST
Comment on attachment 130524 [details] Patch 3 Clearing flags on attachment: 130524 Committed r110029: <http://trac.webkit.org/changeset/110029>
WebKit Review Bot
Comment 9 2012-03-07 00:09:44 PST
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.