Commit 89cd84ca authored by justing's avatar justing

Reviewed by harrison

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=4609>
        window.getSelection().toString() is undefined (range object
        returned from window.getSelection() is useless)

        toString was defined as a method on the JS Selection object,
        but it didn't return anything.

        Added layout test:
        * editing/selection/toString.html

        * khtml/ecma/kjs_window.cpp:
        (KJS::SelectionFunc::callAsFunction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 679a34fa
2006-01-03 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4609>
window.getSelection().toString() is undefined (range object
returned from window.getSelection() is useless)
toString was defined as a method on the JS Selection object,
but it didn't return anything.
Added layout test:
* editing/selection/toString.html
* khtml/ecma/kjs_window.cpp:
(KJS::SelectionFunc::callAsFunction):
2006-01-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by timo.
......
......@@ -2422,7 +2422,8 @@ JSValue *SelectionFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const
break;
case Selection::GetRangeAt:
return getDOMRange(exec, s.getRangeAt(args[0]->toInt32(exec)).get());
break;
case Selection::ToString:
return jsString(s.toString());
}
part->setSelection(s);
......
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