Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r167167 - Assertion failure changing select element size during…
… focus event dispatch <https://bugs.webkit.org/show_bug.cgi?id=131566> <rdar://problem/16400735> Reviewed by Andy Estes. Source/WebCore: Test: fast/forms/select-change-size-during-focus.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Adopt the fix from Chromium r171216; check that the renderer is still of the expected type, and return early if it is not. LayoutTests: * fast/forms/select-change-size-during-focus-expected.txt: Added. * fast/forms/select-change-size-during-focus.html: Added.
- Loading branch information
1 parent
ec8a474
commit 4044f4f
Showing
5 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
LayoutTests/fast/forms/select-change-size-during-focus-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
WebKit bug #131566: Assertion failure changing select element size during focus event dispatch. This test passes if it does not assert in a debug build. | ||
|
||
|
36 changes: 36 additions & 0 deletions
36
LayoutTests/fast/forms/select-change-size-during-focus.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<html> | ||
<head> | ||
<script> | ||
function setup() { | ||
if (window.testRunner) { | ||
window.testRunner.dumpAsText(); | ||
window.testRunner.waitUntilDone(); | ||
} | ||
|
||
s = document.getElementById("select"); | ||
|
||
s.addEventListener("focus", function() { | ||
s.size = 1; | ||
|
||
window.setTimeout(function() { | ||
if (window.testRunner) | ||
window.testRunner.notifyDone(); | ||
}, 0); | ||
}); | ||
|
||
ev = document.createEvent("MouseEvent"); | ||
ev.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 20, 20, false, false, false, false, 0, null); | ||
s.dispatchEvent(ev); | ||
} | ||
</script> | ||
</head> | ||
<body onload="setup()"> | ||
<p> | ||
WebKit bug #<a href="https://bugs.webkit.org/show_bug.cgi?id=131566">131566</a>: Assertion failure changing select element size during focus event dispatch. This test passes if it does not assert in a debug build. | ||
</p> | ||
<select id="select" size="2"> | ||
<option>option 1</option> | ||
<option>option 2</option> | ||
</select> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters