Commit 2ee266e3 authored by tkent@chromium.org's avatar tkent@chromium.org

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: svn://svn.chromium.org/blink/trunk@81088 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a50849ef
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> 2011-03-14 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough. Reviewed by Gavin Barraclough.
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
<!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>
...@@ -1117,6 +1117,7 @@ fast/forms/interactive-validation-lost-focusable.html ...@@ -1117,6 +1117,7 @@ fast/forms/interactive-validation-lost-focusable.html
fast/forms/interactive-validation-prevented.html fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.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 # Tests that seem to be Mac only, assume that smart drag-and-drop
# is enabled or assume platform-dependent sizing. # is enabled or assume platform-dependent sizing.
......
...@@ -206,6 +206,7 @@ fast/forms/interactive-validation-lost-focusable.html ...@@ -206,6 +206,7 @@ fast/forms/interactive-validation-lost-focusable.html
fast/forms/interactive-validation-prevented.html fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.html fast/forms/interactive-validation-assertion-by-validate-twice.html
fast/forms/interactive-validation-select-crash.html
# Web Timing is not enabled. # Web Timing is not enabled.
# https://bugs.webkit.org/show_bug.cgi?id=42434 # https://bugs.webkit.org/show_bug.cgi?id=42434
......
...@@ -2969,6 +2969,7 @@ fast/forms/interactive-validation-lost-focusable.html ...@@ -2969,6 +2969,7 @@ fast/forms/interactive-validation-lost-focusable.html
fast/forms/interactive-validation-prevented.html fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.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 # [Qt] REGRESSION(63862): animations/play-state.html fails intermittently
# https://bugs.webkit.org/show_bug.cgi?id=42821 # https://bugs.webkit.org/show_bug.cgi?id=42821
......
...@@ -1066,6 +1066,7 @@ fast/forms/interactive-validation-lost-focusable.html ...@@ -1066,6 +1066,7 @@ fast/forms/interactive-validation-lost-focusable.html
fast/forms/interactive-validation-prevented.html fast/forms/interactive-validation-prevented.html
fast/forms/interactive-validation-attach-assertion.html fast/forms/interactive-validation-attach-assertion.html
fast/forms/interactive-validation-assertion-by-validate-twice.html fast/forms/interactive-validation-assertion-by-validate-twice.html
fast/forms/interactive-validation-select-crash.html
# Web Timing is not enabled. # Web Timing is not enabled.
# https://bugs.webkit.org/show_bug.cgi?id=42435 # https://bugs.webkit.org/show_bug.cgi?id=42435
......
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
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().
2011-03-14 Balazs Kelemen <kbalazs@webkit.org> 2011-03-14 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Adam Roben. Reviewed by Adam Roben.
......
...@@ -933,8 +933,8 @@ static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje ...@@ -933,8 +933,8 @@ static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje
if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild->virtualContinuation()) if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild->virtualContinuation())
return false; return false;
if ((prev && (!prev->isAnonymousBlock() || toRenderBlock(prev)->continuation() || toRenderBlock(prev)->beingDestroyed())) if ((prev && (!prev->isAnonymousBlock() || !prev->isRenderBlock() || toRenderBlock(prev)->continuation() || toRenderBlock(prev)->beingDestroyed()))
|| (next && (!next->isAnonymousBlock() || toRenderBlock(next)->continuation() || toRenderBlock(next)->beingDestroyed()))) || (next && (!next->isAnonymousBlock() || !next->isRenderBlock() || toRenderBlock(next)->continuation() || toRenderBlock(next)->beingDestroyed())))
return false; return false;
// FIXME: This check isn't required when inline run-ins can't be split into continuations. // FIXME: This check isn't required when inline run-ins can't be split into continuations.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment