Reviewed by Anders.
Test for http://bugs.webkit.org/show_bug.cgi?id=9581
REGRESSION: The new NativeTextArea scrolls to the top when the control is unfocused.
* fast/forms/textarea-no-scroll-on-blur-expected.txt: Added.
* fast/forms/textarea-no-scroll-on-blur.html: Added.
WebCore:
Reviewed by Anders.
- Fix for http://bugs.webkit.org/show_bug.cgi?id=9581
REGRESSION: The new NativeTextArea scrolls to the top when the control is unfocused.
Test: fast/forms/textarea-no-scroll-on-blur.html
* rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::forwardEvent):
On blur, only scroll back to the start for text fields.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17560
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-11-02 Adele Peterson <adele@apple.com>
+
+ Reviewed by Anders.
+
+ Test for http://bugs.webkit.org/show_bug.cgi?id=9581
+ REGRESSION: The new NativeTextArea scrolls to the top when the control is unfocused.
+
+ * fast/forms/textarea-no-scroll-on-blur-expected.txt: Added.
+ * fast/forms/textarea-no-scroll-on-blur.html: Added.
+
2006-11-02 W. Andy Carrel <wac@google.com>
Reviewed by Maciej, landed by Anders.
--- /dev/null
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+This tests that we don't scroll back to the top when leaving a textarea
+
+Test Passed
+
--- /dev/null
+<html>
+<head>
+<script>
+ function test() {
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var ta = document.getElementById('ta');
+ ta.focus();
+ ta.blur();
+ if (ta.scrollTop != 0)
+ document.getElementById('res').innerHTML = "Test Passed";
+ }
+</script>
+</head>
+<body onload="test()">
+This tests that we don't scroll back to the top when leaving a textarea
+<br>
+<textarea id="ta">
+1
+2
+3
+4
+5
+</textarea>
+<div id="res">Test Failed</div>
+</body>
+</html>
+2006-11-02 Adele Peterson <adele@apple.com>
+
+ Reviewed by Anders.
+
+ - Fix for http://bugs.webkit.org/show_bug.cgi?id=9581
+ REGRESSION: The new NativeTextArea scrolls to the top when the control is unfocused.
+
+ Test: fast/forms/textarea-no-scroll-on-blur.html
+
+ * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::forwardEvent):
+ On blur, only scroll back to the start for text fields.
+
2006-11-02 Anders Carlsson <acarlsson@apple.com>
Another build fix.
RenderObject* innerRenderer = m_div->renderer();
if (innerRenderer) {
RenderLayer* innerLayer = innerRenderer->layer();
- if (innerLayer)
+ if (innerLayer && !m_multiLine)
innerLayer->scrollToOffset(style()->direction() == RTL ? innerLayer->scrollWidth() : 0, 0);
}
} else