Assertion failure by form validation message for <select required> with float:left
https://bugs.webkit.org/show_bug.cgi?id=55995
Reviewed by James Robinson.
Source/WebCore:
Test: fast/forms/interactive-validation-select-crash.html
* rendering/RenderBlock.cpp:
(WebCore::canMergeContiguousAnonymousBlocks):
isAnonymousBlock() doesn't mean it is a RenderBlock. We need to check isRenderBlock().
LayoutTests:
* fast/forms/interactive-validation-select-crash-expected.txt: Added.
* fast/forms/interactive-validation-select-crash.html: Added.
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b1eb2c8..96d0adf 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2011-03-14 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by James Robinson.
+
+ Assertion failure by form validation message for <select required> with float:left
+ https://bugs.webkit.org/show_bug.cgi?id=55995
+
+ * fast/forms/interactive-validation-select-crash-expected.txt: Added.
+ * fast/forms/interactive-validation-select-crash.html: Added.
+ * platform/gtk/Skipped:
+ * platform/mac/Skipped:
+ * platform/qt/Skipped:
+ * platform/win/Skipped:
+
2011-03-14 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
diff --git a/LayoutTests/fast/forms/interactive-validation-select-crash-expected.txt b/LayoutTests/fast/forms/interactive-validation-select-crash-expected.txt
new file mode 100644
index 0000000..a051400
--- /dev/null
+++ b/LayoutTests/fast/forms/interactive-validation-select-crash-expected.txt
@@ -0,0 +1,7 @@
+Test for a bug that RenderBlock crashed when a validation message bubble for a select element with float:left was closing.
+
+PASS Not crashed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/interactive-validation-select-crash.html b/LayoutTests/fast/forms/interactive-validation-select-crash.html
new file mode 100644
index 0000000..4359042
--- /dev/null
+++ b/LayoutTests/fast/forms/interactive-validation-select-crash.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p>Test for a bug that RenderBlock crashed when a validation message bubble for a select element with float:left was closing.</p>
+<div id=console></div>
+<form>
+<select style="float:left" required>
+<option value="">Plese select</option>
+<option>Foo</option>
+</select>
+<input type=submit id=submit>
+</form>
+
+<script>
+window.jsTestIsAsync = true;
+
+function closeBubble() {
+ // Make the <select> valid to close the validation message bubble.
+ document.getElementsByTagName('select')[0].selectedIndex = 1;
+ setTimeout(finish, 0);
+}
+function finish() {
+ testPassed('Not crashed.');
+ finishJSTest();
+}
+
+document.getElementById('submit').click();
+setTimeout(closeBubble, 0);
+
+var successfullyParsed = true;
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 8a7381d..6948756 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -1117,6 +1117,7 @@
fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.html
+fast/forms/interactive-validation-select-crash.html
# Tests that seem to be Mac only, assume that smart drag-and-drop
# is enabled or assume platform-dependent sizing.
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 7211d8a..869334b 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -206,6 +206,7 @@
fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.html
+fast/forms/interactive-validation-select-crash.html
# Web Timing is not enabled.
# https://bugs.webkit.org/show_bug.cgi?id=42434
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index b4db2bd..7a23404 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -2969,6 +2969,7 @@
fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.html
+fast/forms/interactive-validation-select-crash.html
# [Qt] REGRESSION(63862): animations/play-state.html fails intermittently
# https://bugs.webkit.org/show_bug.cgi?id=42821
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index b361c62..53f4255e 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -1066,6 +1066,7 @@
fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.html
+fast/forms/interactive-validation-select-crash.html
# Web Timing is not enabled.
# https://bugs.webkit.org/show_bug.cgi?id=42435