Bug 70220 - Remove OptionGroupElement
Summary: Remove OptionGroupElement
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P3 Minor
Assignee: Kent Tamura
Depends on:
Reported: 2011-10-17 01:28 PDT by Kent Tamura
Modified: 2011-10-17 22:38 PDT (History)
3 users (show)

See Also:

Patch (21.48 KB, patch)
2011-10-17 01:35 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (22.14 KB, patch)
2011-10-17 01:45 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch for landing (22.57 KB, patch)
2011-10-17 21:05 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-10-17 01:28:40 PDT
Remove OptionGroupElement
Comment 1 Kent Tamura 2011-10-17 01:35:06 PDT
Created attachment 111224 [details]
Comment 2 Collabora GTK+ EWS bot 2011-10-17 01:38:13 PDT
Comment on attachment 111224 [details]

Attachment 111224 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/10079784
Comment 3 Kent Tamura 2011-10-17 01:45:50 PDT
Created attachment 111225 [details]
Patch 2

GTK build fix
Comment 4 Darin Adler 2011-10-17 10:16:09 PDT
Comment on attachment 111225 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=111225&action=review

> Source/WebCore/dom/OptionElement.cpp:112
> +    if (parentElement && isHTMLOptGroupElement(parentElement))

I’m not sure we should have a special function for this. Just doing hasTagName(optgroupTag) directly seems fine to me.

> Source/WebCore/html/HTMLOptGroupElement.cpp:147
> +    return node && node->isHTMLElement() && node->hasTagName(optgroupTag);

There is no need for the isHTMLElement check in this function. The hasTagName function already checks the namespace and will return false for non-HTMLElement.

> Source/WebCore/html/HTMLOptGroupElement.h:64
> +bool isHTMLOptGroupElement(const Node*);

As I said above, I am not sure we need a helper function. It’s the same thing as calling hasTagName(optgroupTag).
Comment 5 Kent Tamura 2011-10-17 21:01:17 PDT
Thank you for reviewing.

Ok, I'll remove isHTMLOptGroupElement(), and land it.
Comment 6 Kent Tamura 2011-10-17 21:05:55 PDT
Created attachment 111374 [details]
Patch for landing
Comment 7 WebKit Review Bot 2011-10-17 22:38:43 PDT
Comment on attachment 111374 [details]
Patch for landing

Clearing flags on attachment: 111374

Committed r97720: <http://trac.webkit.org/changeset/97720>
Comment 8 WebKit Review Bot 2011-10-17 22:38:48 PDT
All reviewed patches have been landed.  Closing bug.