Bug 70220

Summary: Remove OptionGroupElement
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Severity: Minor CC: darin, rniwa, webkit.review.bot
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch 2
Patch for landing none

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.