Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
Test: fast/forms/textarea-hard-linewrap-empty.html
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::textWithHardLineBreaks): Added null check for
m_div->firstChild()->renderer().
LayoutTests:
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
* fast/forms/textarea-hard-linewrap-empty-expected.txt: Added.
* fast/forms/textarea-hard-linewrap-empty.html: Added.
* fast/forms/textarea-hard-linewrap.html: Reduced timeout from 200ms to 0ms and
renamed function from foo() to submitForm().
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15040
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-06-25 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin.
+
+ - http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
+ REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
+
+ * fast/forms/textarea-hard-linewrap-empty-expected.txt: Added.
+ * fast/forms/textarea-hard-linewrap-empty.html: Added.
+ * fast/forms/textarea-hard-linewrap.html: Reduced timeout from 200ms to 0ms and
+ renamed function from foo() to submitForm().
+
2006-06-25 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
--- /dev/null
+Test for Bug 9537 REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
+http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
+
+Success
--- /dev/null
+<html>
+<head>
+</head>
+<body>
+<div>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9537">
+Bug 9537 REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()</a></div>
+<div>http://bugzilla.opendarwin.org/show_bug.cgi?id=9537</div>
+<form name="f" method="get" action="textarea-hard-linewrap-empty.html">
+<textarea id="textarea" name="textarea" wrap="hard" cols="5"></textarea>
+<input type="submit">
+</form>
+<script>
+function submitForm() {
+ document.f.submit();
+}
+
+if (window.layoutTestController) {
+ window.layoutTestController.dumpAsText();
+ window.layoutTestController.waitUntilDone();
+}
+
+if (document.URL.indexOf('?') == -1) {
+ window.setTimeout(submitForm, 0);
+} else {
+ var formData = document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length);
+ if (formData == "textarea=")
+ document.write("Success");
+ else
+ document.write("<div>Failure.</div><div>Expected: textarea=</div><div>Actual: " + formData + "</div>");
+
+ if (window.layoutTestController)
+ window.layoutTestController.notifyDone();
+}
+</script>
+</body>
+</html>
</form>
<script>
-function foo() {
+function submitForm() {
document.f.submit();
}
window.layoutTestController.waitUntilDone();
}
- window.setTimeout(foo, 200);
+ window.setTimeout(submitForm, 0);
} else {
var formData = document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length);
</script>
</body>
-</html>
\ No newline at end of file
+</html>
+2006-06-25 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin.
+
+ - http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
+ REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
+
+ Test: fast/forms/textarea-hard-linewrap-empty.html
+
+ * rendering/RenderTextField.cpp:
+ (WebCore::RenderTextField::textWithHardLineBreaks): Added null check for
+ m_div->firstChild()->renderer().
+
2006-06-25 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
document()->updateLayout();
ASSERT(m_div->firstChild());
- InlineBox* box = m_div->firstChild()->renderer()->inlineBox(0, DOWNSTREAM);
+ RenderObject* renderer = m_div->firstChild()->renderer();
+ if (!renderer)
+ return s;
+
+ InlineBox* box = renderer->inlineBox(0, DOWNSTREAM);
if (!box)
return s;
-
+
ExceptionCode ec = 0;
RefPtr<Range> range = new Range(document());
range->selectNodeContents(m_div.get(), ec);