Title: [145449] branches/chromium/1410
- Revision
- 145449
- Author
- [email protected]
- Date
- 2013-03-11 18:10:14 -0700 (Mon, 11 Mar 2013)
Log Message
Merge 142631
BUG=175343
Review URL: https://codereview.chromium.org/12543029
Modified Paths
Added Paths
Diff
Copied: branches/chromium/1410/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt (from rev 142631, trunk/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt) (0 => 145449)
--- branches/chromium/1410/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt (rev 0)
+++ branches/chromium/1410/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash-expected.txt 2013-03-12 01:10:14 UTC (rev 145449)
@@ -0,0 +1,9 @@
+This test ensures that inserting a selected option into an HTML Select element doesn't cause a crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: branches/chromium/1410/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash.html (from rev 142631, trunk/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash.html) (0 => 145449)
--- branches/chromium/1410/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash.html (rev 0)
+++ branches/chromium/1410/LayoutTests/accessibility/insert-selected-option-into-select-causes-crash.html 2013-03-12 01:10:14 UTC (rev 145449)
@@ -0,0 +1,36 @@
+<!doctype html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<select id="popup">
+ <optgroup id=optgroup1>
+ </optgroup>
+</select>
+<select id="listbox" multiple>
+ <optgroup id=optgroup2>
+ <option selected>
+ </optgroup>
+</select>
+
+<script>
+ description("This test ensures that inserting a selected option into an HTML Select element doesn't cause a crash.");
+
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var optgroup1 = document.getElementById('optgroup1');
+ var optgroup2 = document.getElementById('optgroup2');
+
+ if (window.accessibilityController)
+ accessibilityController.accessibleElementById('dummy');
+
+ var listbox = document.getElementById('listbox');
+ listbox.focus();
+
+ optgroup1.appendChild(optgroup2);
+</script>
+<script src=""
+</body>
+</html>
Modified: branches/chromium/1410/Source/WebCore/html/HTMLSelectElement.cpp (145448 => 145449)
--- branches/chromium/1410/Source/WebCore/html/HTMLSelectElement.cpp 2013-03-12 01:08:34 UTC (rev 145448)
+++ branches/chromium/1410/Source/WebCore/html/HTMLSelectElement.cpp 2013-03-12 01:10:14 UTC (rev 145449)
@@ -373,9 +373,6 @@
setNeedsValidityCheck();
HTMLFormControlElementWithState::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
-
- if (AXObjectCache::accessibilityEnabled() && renderer())
- renderer()->document()->axObjectCache()->childrenChanged(this);
}
void HTMLSelectElement::optionElementChildrenChanged()
@@ -724,6 +721,9 @@
}
if (!inDocument())
invalidateSelectedItems();
+
+ if (AXObjectCache::accessibilityEnabled() && renderer())
+ renderer()->document()->axObjectCache()->childrenChanged(this);
}
void HTMLSelectElement::recalcListItems(bool updateSelectedStates) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes