Commit a9490fe9 authored by hyatt's avatar hyatt
Browse files

<optgroup> should allow <script> and text nodes inside it, just like

        <select> does.

        Reviewed by aroben

        fast/forms/stuff-on-my-optgroup.html

        * html/HTMLOptGroupElement.cpp:
        (WebCore::HTMLOptGroupElement::checkDTD):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::checkDTD):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e64a85d6
2007-05-23 David Hyatt <hyatt@apple.com>
<optgroup> should allow <script> and text nodes inside it, just like
<select> does.
Reviewed by aroben
fast/forms/stuff-on-my-optgroup.html
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::checkDTD):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::checkDTD):
2007-05-23 David Hyatt <hyatt@apple.com>
 
Framesets should allow whitespace text nodes as children.
......@@ -121,7 +121,8 @@ void HTMLOptGroupElement::setLabel(const String &value)
bool HTMLOptGroupElement::checkDTD(const Node* newChild)
{
return newChild->hasTagName(HTMLNames::optionTag) || newChild->hasTagName(HTMLNames::hrTag);
// Make sure to keep this in sync with <select> (other than not allowing an optgroup).
return newChild->isTextNode() || newChild->hasTagName(HTMLNames::optionTag) || newChild->hasTagName(HTMLNames::hrTag) || newChild->hasTagName(HTMLNames::scriptTag);
}
void HTMLOptGroupElement::attach()
......
......@@ -101,6 +101,7 @@ HTMLSelectElement::~HTMLSelectElement()
bool HTMLSelectElement::checkDTD(const Node* newChild)
{
// Make sure to keep <optgroup> in sync with this.
return newChild->isTextNode() || newChild->hasTagName(optionTag) || newChild->hasTagName(optgroupTag) || newChild->hasTagName(hrTag) ||
newChild->hasTagName(scriptTag);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment