Title: [139721] branches/chromium/1364
- Revision
- 139721
- Author
- [email protected]
- Date
- 2013-01-14 23:55:47 -0800 (Mon, 14 Jan 2013)
Log Message
Merge 139038
> 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.
>
[email protected]
Review URL: https://codereview.chromium.org/11881046
Modified Paths
Added Paths
Diff
Copied: branches/chromium/1364/LayoutTests/fast/forms/select/select-empty-optgroup-expected.html (from rev 139038, trunk/LayoutTests/fast/forms/select/select-empty-optgroup-expected.html) (0 => 139721)
--- branches/chromium/1364/LayoutTests/fast/forms/select/select-empty-optgroup-expected.html (rev 0)
+++ branches/chromium/1364/LayoutTests/fast/forms/select/select-empty-optgroup-expected.html 2013-01-15 07:55:47 UTC (rev 139721)
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<select multiple>
+<optgroup label="group"></optgroup>
+<option>option1</option>
+</select>
Copied: branches/chromium/1364/LayoutTests/fast/forms/select/select-empty-optgroup.html (from rev 139038, trunk/LayoutTests/fast/forms/select/select-empty-optgroup.html) (0 => 139721)
--- branches/chromium/1364/LayoutTests/fast/forms/select/select-empty-optgroup.html (rev 0)
+++ branches/chromium/1364/LayoutTests/fast/forms/select/select-empty-optgroup.html 2013-01-15 07:55:47 UTC (rev 139721)
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<select multiple>
+<optgroup label="group"> </optgroup>
+<option>option1</option>
+</select>
Modified: branches/chromium/1364/Source/WebCore/html/HTMLSelectElement.cpp (139720 => 139721)
--- branches/chromium/1364/Source/WebCore/html/HTMLSelectElement.cpp 2013-01-15 07:47:40 UTC (rev 139720)
+++ branches/chromium/1364/Source/WebCore/html/HTMLSelectElement.cpp 2013-01-15 07:55:47 UTC (rev 139721)
@@ -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