[webkit-changes] cvs commit: WebCore/layout-tests/fast/js
object-prototype-toLocaleString-expected.txt
object-prototype-toLocaleString.html
Geoffrey
ggaren at opensource.apple.com
Thu Jul 14 10:24:32 PDT 2005
ggaren 05/07/14 10:24:31
Modified: . ChangeLog
kjs object_object.cpp object_object.h
. ChangeLog
Added: layout-tests/fast/js
object-prototype-toLocaleString-expected.txt
object-prototype-toLocaleString.html
Log:
JavaScriptCore:
-landed fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3412
Object.prototype is missing toLocaleString
- patch by Mark Rowe (bdash) <opendarwin.org at bdash.net.nz>
-layout test info in webcore changelog
Reviewed by mjs.
* kjs/object_object.cpp:
(ObjectPrototypeImp::ObjectPrototypeImp):
(ObjectProtoFuncImp::call):
* kjs/object_object.h:
(KJS::ObjectProtoFuncImp::):
WebCore:
-landed layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=3412
Object.prototype is missing toLocaleString
Reviewed by mjs.
Test cases added:
* layout-tests/fast/js/object-prototype-toLocaleString-expected.txt: Added.
* layout-tests/fast/js/object-prototype-toLocaleString.html: Added.
Revision Changes Path
1.746 +17 -0 JavaScriptCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
retrieving revision 1.745
retrieving revision 1.746
diff -u -r1.745 -r1.746
--- ChangeLog 12 Jul 2005 18:20:01 -0000 1.745
+++ ChangeLog 14 Jul 2005 17:24:25 -0000 1.746
@@ -1,3 +1,20 @@
+2005-07-14 Geoffrey Garen <ggaren at apple.com>
+
+ -landed fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3412
+ Object.prototype is missing toLocaleString
+
+ - patch by Mark Rowe (bdash) <opendarwin.org at bdash.net.nz>
+
+ -layout test info in webcore changelog
+
+ Reviewed by mjs.
+
+ * kjs/object_object.cpp:
+ (ObjectPrototypeImp::ObjectPrototypeImp):
+ (ObjectProtoFuncImp::call):
+ * kjs/object_object.h:
+ (KJS::ObjectProtoFuncImp::):
+
2005-07-12 Geoffrey Garen <ggaren at apple.com>
Reviewed by mjs.
1.10 +6 -3 JavaScriptCore/kjs/object_object.cpp
Index: object_object.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/object_object.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- object_object.cpp 3 Jul 2005 10:47:53 -0000 1.9
+++ object_object.cpp 14 Jul 2005 17:24:26 -0000 1.10
@@ -38,9 +38,10 @@
: ObjectImp() // [[Prototype]] is Null()
{
Value protect(this);
- putDirect(toStringPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ToString, 0), DontEnum);
- putDirect(valueOfPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ValueOf, 0), DontEnum);
- putDirect("hasOwnProperty", new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::HasOwnProperty,1), DontEnum);
+ putDirect(toStringPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ToString, 0), DontEnum);
+ putDirect(toLocaleStringPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ToLocaleString,0), DontEnum);
+ putDirect(valueOfPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ValueOf, 0), DontEnum);
+ putDirect("hasOwnProperty", new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::HasOwnProperty, 1), DontEnum);
}
@@ -74,6 +75,8 @@
bool exists = thisObj.hasOwnProperty(exec, propertyName);
return Value(exists ? BooleanImp::staticTrue : BooleanImp::staticFalse);
}
+ case ToLocaleString:
+ return thisObj.imp()->toString(exec);
case ToString:
default:
return String("[object " + thisObj.className() + "]");
1.7 +1 -1 JavaScriptCore/kjs/object_object.h
Index: object_object.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/object_object.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- object_object.h 3 Jul 2005 10:47:53 -0000 1.6
+++ object_object.h 14 Jul 2005 17:24:26 -0000 1.7
@@ -53,7 +53,7 @@
virtual bool implementsCall() const;
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
- enum { ToString, ValueOf, HasOwnProperty };
+ enum { ToString, ToLocaleString, ValueOf, HasOwnProperty };
private:
int id;
};
1.4422 +11 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4421
retrieving revision 1.4422
diff -u -r1.4421 -r1.4422
--- ChangeLog 14 Jul 2005 16:29:06 -0000 1.4421
+++ ChangeLog 14 Jul 2005 17:24:26 -0000 1.4422
@@ -1,3 +1,14 @@
+2005-07-14 Geoffrey Garen <ggaren at apple.com>
+
+ -landed layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=3412
+ Object.prototype is missing toLocaleString
+
+ Reviewed by mjs.
+
+ Test cases added:
+ * layout-tests/fast/js/object-prototype-toLocaleString-expected.txt: Added.
+ * layout-tests/fast/js/object-prototype-toLocaleString.html: Added.
+
2005-07-14 Vicki Murley <vicki at apple.com>
Reviewed by Kocienda.
1.1 WebCore/layout-tests/fast/js/object-prototype-toLocaleString-expected.txt
Index: object-prototype-toLocaleString-expected.txt
===================================================================
Tests: Object.prototype.toLocaleString()
Related bug: 3989 JSC doesn't implement Object.prototype.toLocaleString()
Object.toLocaleString() (should be "[object Object]"): [object Object]
Object.toLocaleString() (should be "Dynamic toLocaleString()"): Dynamic toLocaleString()
1.1 WebCore/layout-tests/fast/js/object-prototype-toLocaleString.html
Index: object-prototype-toLocaleString.html
===================================================================
<html>
<head>
<script>
function print(message) {
var paragraph = document.createElement("p");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function test() {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
}
try {
var o = new Object();
print("Object.toLocaleString() (should be \"" + o.toString() + "\"): " + o.toLocaleString());
o.toLocaleString = function () { return "Dynamic toLocaleString()"; }
print("Object.toLocaleString() (should be \"Dynamic toLocaleString()\"): " + o.toLocaleString());
}
catch (e) {
print("Test failed. Threw exception: " + e);
}
}
</script>
</head>
<body onload="test();">
<p>Tests: Object.prototype.toLocaleString()</p>
<p>Related bug: <a href = "http://bugzilla.opendarwin.org/show_bug.cgi?id=3989">3989 JSC doesn't implement Object.prototype.toLocaleString()</a></p>
<hr>
<div id='console'/>
</body>
</html>
More information about the webkit-changes
mailing list