[Webkit-unassigned] [Bug 33509] selection.modify() should throw an exception if it receives invalid parameters

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 10 22:30:46 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33509





--- Comment #3 from TAMURA, Kent <tkent at chromium.org>  2010-03-10 22:30:46 PST ---
(From update of attachment 50471)
> +++ b/LayoutTests/editing/selection/modify-with-invalid-args.html

Please change this test for the script-tests format.
We already have shouldThrow() in fast/js/resources/js-test-pre.js.

> --- a/WebCore/page/DOMSelection.cpp
> +++ b/WebCore/page/DOMSelection.cpp
> @@ -271,8 +271,10 @@ void DOMSelection::modify(const String& alterString, const String& directionStri
>          alter = SelectionController::EXTEND;
>      else if (equalIgnoringCase(alterString, "move"))
>          alter = SelectionController::MOVE;
> -    else
> +    else {
> +        ec = INVALID_MODIFICATION_ERR;

I think NOT_SUPPORTED_ERR is better.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list