From efb4ac700fe14f937add8c0b9993374ce335d605 Mon Sep 17 00:00:00 2001 From: adele Date: Tue, 15 Aug 2006 21:40:04 +0000 Subject: [PATCH] LayoutTests: Reviewed by Maciej. Test for: REGRESSION: select-all should fire onSelect event for text fields and textareas (9518) http://bugzilla.opendarwin.org/show_bug.cgi?id=9518 * fast/forms/onselect-selectall-expected.txt: Added. * fast/forms/onselect-selectall.html: Added. WebCore: Reviewed by Maciej. - Fix for REGRESSION: select-all should fire onSelect event for text fields and textareas (9518) http://bugzilla.opendarwin.org/show_bug.cgi?id=9518 Test: fast/forms/onselect-selectall.html * page/Frame.cpp: (WebCore::Frame::selectAll): Call notifyRendererOfSelectionChange with userTriggered = true so that onSelect will fire. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15886 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 10 +++++++ .../forms/onselect-selectall-expected.txt | 12 ++++++++ .../fast/forms/onselect-selectall.html | 28 +++++++++++++++++++ WebCore/ChangeLog | 11 ++++++++ WebCore/page/Frame.cpp | 1 + 5 files changed, 62 insertions(+) create mode 100644 LayoutTests/fast/forms/onselect-selectall-expected.txt create mode 100644 LayoutTests/fast/forms/onselect-selectall.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 865a46625b16..16d975b526eb 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,13 @@ +2006-08-15 Adele Peterson + + Reviewed by Maciej. + + Test for: REGRESSION: select-all should fire onSelect event for text fields and textareas (9518) + http://bugzilla.opendarwin.org/show_bug.cgi?id=9518 + + * fast/forms/onselect-selectall-expected.txt: Added. + * fast/forms/onselect-selectall.html: Added. + 2006-08-14 Eric Seidel Reviewed by mjs. diff --git a/LayoutTests/fast/forms/onselect-selectall-expected.txt b/LayoutTests/fast/forms/onselect-selectall-expected.txt new file mode 100644 index 000000000000..a25fc26dc6f1 --- /dev/null +++ b/LayoutTests/fast/forms/onselect-selectall-expected.txt @@ -0,0 +1,12 @@ +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 4 of #text > DIV toDOMRange:range from 0 of #text > DIV to 4 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV to 4 of #text > DIV toDOMRange:range from 0 of #text > DIV to 4 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE +EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification +This tests that onSelect will fire for textfields and textareas when select-all is invoked. + + +Test Passed: textfield +Test Passed: textarea + diff --git a/LayoutTests/fast/forms/onselect-selectall.html b/LayoutTests/fast/forms/onselect-selectall.html new file mode 100644 index 000000000000..93dc29731aa9 --- /dev/null +++ b/LayoutTests/fast/forms/onselect-selectall.html @@ -0,0 +1,28 @@ + + + + + + +This tests that onSelect will fire for textfields and textareas when select-all is invoked.
+
+
+ +
+ + \ No newline at end of file diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 1f0e52b36317..041c03a966b5 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,14 @@ +2006-08-15 Adele Peterson + + Reviewed by Maciej. + + - Fix for REGRESSION: select-all should fire onSelect event for text fields and textareas (9518) + http://bugzilla.opendarwin.org/show_bug.cgi?id=9518 + + Test: fast/forms/onselect-selectall.html + + * page/Frame.cpp: (WebCore::Frame::selectAll): Call notifyRendererOfSelectionChange with userTriggered = true so that onSelect will fire. + 2006-08-15 Anders Carlsson Reviewed by Darin. diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp index b53bc6c2bb3b..22c8d4c82269 100644 --- a/WebCore/page/Frame.cpp +++ b/WebCore/page/Frame.cpp @@ -1964,6 +1964,7 @@ void Frame::selectAll() selectContentsOfNode(root); selectFrameElementInParentIfFullySelected(); + notifyRendererOfSelectionChange(true); } bool Frame::selectContentsOfNode(Node* node) -- 2.36.0