[BlackBerry]Differentiate options and group options by TypeOption and TypeOptionInGroup

https://bugs.webkit.org/show_bug.cgi?id=88342

Patch by Crystal Zhang <haizhang@rim.com> on 2012-06-05
Reviewed by Rob Buis.

RIM PR: 163141

Reviewed internally by Mike Fenton.

We set all options' type to TypeOption, which can't tell if an option belongs to a group,
introduce TypeOptionInGroup to fix it.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openSelectPopup):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bf782019
2012-06-05 Crystal Zhang <haizhang@rim.com>
[BlackBerry]Differentiate options and group options by TypeOption and TypeOptionInGroup
https://bugs.webkit.org/show_bug.cgi?id=88342
Reviewed by Rob Buis.
RIM PR: 163141
Reviewed internally by Mike Fenton.
We set all options' type to TypeOption, which can't tell if an option belongs to a group,
introduce TypeOptionInGroup to fix it.
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openSelectPopup):
2012-06-05 Adam Barth <abarth@webkit.org>
Remove support for target-densitydpi in the viewport meta tag
......
......@@ -1158,7 +1158,7 @@ bool InputHandler::openSelectPopup(HTMLSelectElement* select)
labels[i] = option->textIndentedToRespectGroupLabel();
enableds[i] = option->disabled() ? 0 : 1;
selecteds[i] = option->selected();
itemTypes[i] = TypeOption;
itemTypes[i] = option->parentNode() && option->parentNode()->hasTagName(HTMLNames::optgroupTag) ? TypeOptionInGroup : TypeOption;
} else if (listItems[i]->hasTagName(HTMLNames::optgroupTag)) {
HTMLOptGroupElement* optGroup = static_cast<HTMLOptGroupElement*>(listItems[i]);
labels[i] = optGroup->groupLabelText();
......
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