Title: [139038] trunk
- Revision
- 139038
- Author
- [email protected]
- Date
- 2013-01-07 23:49:21 -0800 (Mon, 07 Jan 2013)
Log Message
REGRESSION(r137406): Text inside an empty optgroup prevents subsequent options from appearing
https://bugs.webkit.org/show_bug.cgi?id=106298
Reviewed by Ryosuke Niwa.
Source/WebCore:
Test: fast/forms/select/select-empty-optgroup.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::recalcListItems):
Traverse to the first element within the 'current' only if it exists.
LayoutTests:
* fast/forms/select/select-empty-optgroup-expected.html: Added.
* fast/forms/select/select-empty-optgroup.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (139037 => 139038)
--- trunk/LayoutTests/ChangeLog 2013-01-08 07:46:58 UTC (rev 139037)
+++ trunk/LayoutTests/ChangeLog 2013-01-08 07:49:21 UTC (rev 139038)
@@ -1,3 +1,13 @@
+2013-01-07 Kent Tamura <[email protected]>
+
+ REGRESSION(r137406): Text inside an empty optgroup prevents subsequent options from appearing
+ https://bugs.webkit.org/show_bug.cgi?id=106298
+
+ Reviewed by Ryosuke Niwa.
+
+ * fast/forms/select/select-empty-optgroup-expected.html: Added.
+ * fast/forms/select/select-empty-optgroup.html: Added.
+
2013-01-07 Kunihiko Sakamoto <[email protected]>
INPUT_MULTIPLE_FIELDS_UI: Step-up/-down of month/day field should respect min/max attributes
Added: trunk/LayoutTests/fast/forms/select/select-empty-optgroup-expected.html (0 => 139038)
--- trunk/LayoutTests/fast/forms/select/select-empty-optgroup-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/select/select-empty-optgroup-expected.html 2013-01-08 07:49:21 UTC (rev 139038)
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<select multiple>
+<optgroup label="group"></optgroup>
+<option>option1</option>
+</select>
Added: trunk/LayoutTests/fast/forms/select/select-empty-optgroup.html (0 => 139038)
--- trunk/LayoutTests/fast/forms/select/select-empty-optgroup.html (rev 0)
+++ trunk/LayoutTests/fast/forms/select/select-empty-optgroup.html 2013-01-08 07:49:21 UTC (rev 139038)
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<select multiple>
+<optgroup label="group"> </optgroup>
+<option>option1</option>
+</select>
Modified: trunk/Source/WebCore/ChangeLog (139037 => 139038)
--- trunk/Source/WebCore/ChangeLog 2013-01-08 07:46:58 UTC (rev 139037)
+++ trunk/Source/WebCore/ChangeLog 2013-01-08 07:49:21 UTC (rev 139038)
@@ -1,3 +1,16 @@
+2013-01-07 Kent Tamura <[email protected]>
+
+ REGRESSION(r137406): Text inside an empty optgroup prevents subsequent options from appearing
+ https://bugs.webkit.org/show_bug.cgi?id=106298
+
+ Reviewed by Ryosuke Niwa.
+
+ Test: fast/forms/select/select-empty-optgroup.html
+
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::recalcListItems):
+ Traverse to the first element within the 'current' only if it exists.
+
2013-01-07 Steve Block <[email protected]>
Use toSize() to convert from Int/FloatPoint to Int/FloatSize
Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (139037 => 139038)
--- trunk/Source/WebCore/html/HTMLSelectElement.cpp 2013-01-08 07:46:58 UTC (rev 139037)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp 2013-01-08 07:49:21 UTC (rev 139038)
@@ -747,8 +747,8 @@
// (http://www.w3.org/TR/html401/interact/forms.html#h-17.6)
if (current->hasTagName(optgroupTag)) {
m_listItems.append(current);
- if (current->firstChild()) {
- currentElement = ElementTraversal::firstWithin(current);
+ if (Element* nextElement = ElementTraversal::firstWithin(current)) {
+ currentElement = nextElement;
continue;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes