[webkit-changes] cvs commit:
WebCore/layout-tests/dom/html/level2/events
dispatchEvent01-expected.txt dispatchEvent01.html
dispatchEvent01.html-disabled
Darin
darin at opensource.apple.com
Sat Aug 6 09:30:15 PDT 2005
darin 05/08/06 09:30:15
Modified: . ChangeLog
khtml/xml dom_nodeimpl.cpp
Added: layout-tests/dom/html/level2/events
dispatchEvent01-expected.txt dispatchEvent01.html
Removed: layout-tests/dom/html/level2/events
dispatchEvent01.html-disabled
Log:
Reviewed by Dave Hyatt.
- fixed crash in one of the W3C DOM tests
* khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::dispatchEvent): Check for NULL which means
the passed object is not an event. Return without raising an exception because that's
what Gecko does despite the fact that the DOM test expects a (platform-specific) exception.
* layout-tests/dom/html/level2/events/dispatchEvent01-expected.txt: Added.
* layout-tests/dom/html/level2/events/dispatchEvent01.html: Added.
* layout-tests/dom/html/level2/events/dispatchEvent01.html-disabled: Removed.
Revision Changes Path
1.4533 +14 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4532
retrieving revision 1.4533
diff -u -r1.4532 -r1.4533
--- ChangeLog 6 Aug 2005 16:28:39 -0000 1.4532
+++ ChangeLog 6 Aug 2005 16:30:10 -0000 1.4533
@@ -2,6 +2,20 @@
Reviewed by Dave Hyatt.
+ - fixed crash in one of the W3C DOM tests
+
+ * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::dispatchEvent): Check for NULL which means
+ the passed object is not an event. Return without raising an exception because that's
+ what Gecko does despite the fact that the DOM test expects a (platform-specific) exception.
+
+ * layout-tests/dom/html/level2/events/dispatchEvent01-expected.txt: Added.
+ * layout-tests/dom/html/level2/events/dispatchEvent01.html: Added.
+ * layout-tests/dom/html/level2/events/dispatchEvent01.html-disabled: Removed.
+
+2005-08-06 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave Hyatt.
+
- added a "set" operation to HashMap for cases where you want to either insert or
modify an existing map entry; the "set" name is based on symmetry with get, and also on
the naming used for similar operations in CFDictionary.
1.170 +5 -0 WebCore/khtml/xml/dom_nodeimpl.cpp
Index: dom_nodeimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.cpp,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -r1.169 -r1.170
--- dom_nodeimpl.cpp 5 Aug 2005 18:36:29 -0000 1.169
+++ dom_nodeimpl.cpp 6 Aug 2005 16:30:14 -0000 1.170
@@ -475,6 +475,11 @@
bool NodeImpl::dispatchEvent(EventImpl *evt, int &exceptioncode, bool tempEvent)
{
+ if (!evt) {
+ exceptioncode = 0;
+ return false;
+ }
+
evt->ref();
evt->setTarget(this);
1.1 WebCore/layout-tests/dom/html/level2/events/dispatchEvent01-expected.txt
Index: dispatchEvent01-expected.txt
===================================================================
Test: http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent01
Status: failure
Detail: throw_ImplException: assertTrue failed
1.1 WebCore/layout-tests/dom/html/level2/events/dispatchEvent01.html
Index: dispatchEvent01.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd" >
<!-- This is comment number 1.-->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>hc_staff</title><script type="text/javascript" src="selfhtml.js"></script><script charset="UTF-8" type="text/javascript" src="dispatchEvent01.js"></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
<p>
<em>EMP0001</em>
<strong>Margaret Martin</strong>
<code>Accountant</code>
<sup>56,000</sup>
<var>Female</var>
<acronym title="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
</p>
<p>
<em>EMP0002</em>
<strong>Martha RaynoldsThis is a CDATASection with EntityReference number 2 &ent2;
This is an adjacent CDATASection with a reference to a tab &tab;</strong>
<code>Secretary</code>
<sup>35,000</sup>
<var>Female</var>
<acronym title="Yes" class="Yes">β Dallas, γ
98554</acronym>
</p>
<p>
<em>EMP0003</em>
<strong>Roger
Jones</strong>
<code>Department Manager</code>
<sup>100,000</sup>
<var>δ</var>
<acronym title="Yes" class="No">PO Box 27 Irving, texas 98553</acronym>
</p>
<p>
<em>EMP0004</em>
<strong>Jeny Oconnor</strong>
<code>Personnel Director</code>
<sup>95,000</sup>
<var>Female</var>
<acronym title="Yes" class="Yα">27 South Road. Dallas, Texas 98556</acronym>
</p>
<p>
<em>EMP0005</em>
<strong>Robert Myers</strong>
<code>Computer Specialist</code>
<sup>90,000</sup>
<var>male</var>
<acronym title="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
</p>
</body></html>
More information about the webkit-changes
mailing list