[webkit-changes] cvs commit: WebCore/layout-tests/fast/dom/Window
window-remove-event-listener-expected.txt
window-remove-event-listener.html
Darin
darin at opensource.apple.com
Mon Sep 5 16:10:19 PDT 2005
darin 05/09/05 16:10:19
Modified: . ChangeLog
khtml/ecma kjs_window.cpp
Added: layout-tests/fast/dom/Window
window-remove-event-listener-expected.txt
window-remove-event-listener.html
Log:
Reviewed by John Sullivan.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4822
REGRESSION dragging does not stop when you release the mouse button in Google Maps
Test cases added:
* layout-tests/fast/dom/Window/window-remove-event-listener.html: Added.
* layout-tests/fast/dom/Window/window-remove-event-listener-expected.txt: Added.
* khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::callAsFunction):
Fixed typo where window.removeEventListener would call addEventListener!
Revision Changes Path
1.96 +30 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- ChangeLog 5 Sep 2005 22:41:36 -0000 1.95
+++ ChangeLog 5 Sep 2005 23:10:17 -0000 1.96
@@ -2,6 +2,36 @@
Reviewed by John Sullivan.
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4822
+ REGRESSION dragging does not stop when you release the mouse button in Google Maps
+
+ Test cases added:
+ * layout-tests/fast/dom/Window/window-remove-event-listener.html: Added.
+ * layout-tests/fast/dom/Window/window-remove-event-listener-expected.txt: Added.
+
+ * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::callAsFunction):
+ Fixed typo where window.removeEventListener would call addEventListener!
+
+2005-09-05 Darin Adler <darin at apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4493
+ add qualifiedName checking for empty string
+
+ * khtml/xml/dom_docimpl.cpp:
+ (qualifiedNameIsValid): Added.
+ (qualifiedNameIsMalformed): Added.
+ (DOMImplementationImpl::createDocumentType): Added checks and exceptions using above functions.
+ (DOMImplementationImpl::createDocument): Ditto.
+
+ * layout-tests/dom/html/level2/core/createDocument08-expected.txt: Updated to expect success.
+ * layout-tests/dom/html/level2/core/createDocumentType04-expected.txt: Ditto.
+
+2005-09-05 Darin Adler <darin at apple.com>
+
+ Reviewed by John Sullivan.
+
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4493
add qualifiedName checking for empty string
1.178 +1 -1 WebCore/khtml/ecma/kjs_window.cpp
Index: kjs_window.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_window.cpp,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -r1.177 -r1.178
--- kjs_window.cpp 3 Sep 2005 23:09:58 -0000 1.177
+++ kjs_window.cpp 5 Sep 2005 23:10:18 -0000 1.178
@@ -2003,7 +2003,7 @@
return Undefined();
if (JSEventListener *listener = Window::retrieveActive(exec)->getJSEventListener(args[1]))
if (DocumentImpl *doc = part->xmlDocImpl())
- doc->addWindowEventListener(AtomicString(args[0]->toString(exec).domString()), listener, args[2]->toBoolean(exec));
+ doc->removeWindowEventListener(AtomicString(args[0]->toString(exec).domString()), listener, args[2]->toBoolean(exec));
return Undefined();
case Window::ShowModalDialog:
return showModalDialog(exec, window, args);
1.1 WebCore/layout-tests/fast/dom/Window/window-remove-event-listener-expected.txt
Index: window-remove-event-listener-expected.txt
===================================================================
Regression test to ensure that removeEventListener works.
If the test is successful, you'll see only one call of the event handler. If it fails, you'll typically see two.
event handler called: 1
1.1 WebCore/layout-tests/fast/dom/Window/window-remove-event-listener.html
Index: window-remove-event-listener.html
===================================================================
<html>
<head>
<script>
function print(message)
{
var item = document.createElement("li");
item.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(item);
}
var count = 0;
function eventHandler(event)
{
++count;
print("event handler called: " + count);
}
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
var event = document.createEvent("Events");
event.initEvent("foo", true, false);
addEventListener("foo", eventHandler, false);
document.dispatchEvent(event);
removeEventListener("foo", eventHandler, false);
document.dispatchEvent(event);
}
</script>
<head>
<body onload="test()">
<p>Regression test to ensure that removeEventListener works.</p>
<p>If the test is successful, you'll see only one call of the event handler. If it fails, you'll typically see two.</p>
<ol id="console"></ol>
</body>
</html>
More information about the webkit-changes
mailing list