[webkit-changes] cvs commit:
WebCore/layout-tests/dom/html/level2/html
HTMLInputElement21-expected.txt
David
hyatt at opensource.apple.com
Tue Aug 30 15:59:33 PDT 2005
hyatt 05/08/30 15:59:33
Modified: . ChangeLog
khtml/ecma kjs_events.cpp
khtml/html html_elementimpl.cpp
layout-tests/dom/html/level2/html
HTMLInputElement21-expected.txt
Log:
Fix for bugzilla bug 4573, make sure click() fires CLICK and not KHTML_CLICK,
so that the click() method on checkboxes actually works.
Also eliminate the WinIE compatibiilty for event.button and match the
standard DOM behavior instead (like Firefox does).
Reviewed by darin
Test cases added: None, since one of the level 2 DOM tests changes to
pass and tests this feature.
* khtml/ecma/kjs_events.cpp:
(KJS::DOMMouseEvent::getValueProperty):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::click):
* layout-tests/dom/html/level2/html/HTMLInputElement21-expected.txt:
Revision Changes Path
1.44 +19 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- ChangeLog 30 Aug 2005 21:36:22 -0000 1.43
+++ ChangeLog 30 Aug 2005 22:59:31 -0000 1.44
@@ -1,5 +1,24 @@
2005-08-30 David Hyatt <hyatt at apple.com>
+ Fix for bugzilla bug 4573, make sure click() fires CLICK and not KHTML_CLICK,
+ so that the click() method on checkboxes actually works.
+
+ Also eliminate the WinIE compatibiilty for event.button and match the
+ standard DOM behavior instead (like Firefox does).
+
+ Reviewed by darin
+
+ Test cases added: None, since one of the level 2 DOM tests changes to
+ pass and tests this feature.
+
+ * khtml/ecma/kjs_events.cpp:
+ (KJS::DOMMouseEvent::getValueProperty):
+ * khtml/html/html_elementimpl.cpp:
+ (HTMLElementImpl::click):
+ * layout-tests/dom/html/level2/html/HTMLInputElement21-expected.txt:
+
+2005-08-30 David Hyatt <hyatt at apple.com>
+
Change the value of "element" for khtml-user-select to "ignore". Also undo the support of "-moz"
for any -moz property. Add support for -webkit as an alternative to -khtml.
1.59 +2 -7 WebCore/khtml/ecma/kjs_events.cpp
Index: kjs_events.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_events.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- kjs_events.cpp 30 Aug 2005 18:20:24 -0000 1.58
+++ kjs_events.cpp 30 Aug 2005 22:59:32 -0000 1.59
@@ -784,13 +784,8 @@
case MetaKey:
return Boolean(event.metaKey());
case Button:
- {
- // Tricky. The DOM (and khtml) use 0 for LMB, 1 for MMB and 2 for RMB
- // but MSIE uses 1=LMB, 2=RMB, 4=MMB, as a bitfield
- int domButton = event.button();
- int button = domButton==0 ? 1 : domButton==1 ? 4 : domButton==2 ? 2 : 0;
- return Number( (unsigned int)button );
- }
+ // WinIE uses 1,4,2 for left/middle/right but not for click (just for mousedown/up, maybe others), but we will match the standard DOM.
+ return Number(event.button());
case ToElement:
// MSIE extension - "the object toward which the user is moving the mouse pointer"
if (event.id() == DOM::EventImpl::MOUSEOUT_EVENT)
1.101 +1 -1 WebCore/khtml/html/html_elementimpl.cpp
Index: html_elementimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_elementimpl.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- html_elementimpl.cpp 30 Aug 2005 20:12:56 -0000 1.100
+++ html_elementimpl.cpp 30 Aug 2005 22:59:32 -0000 1.101
@@ -580,7 +580,7 @@
// always send click
QMouseEvent clickEvent(QEvent::MouseButtonRelease, QPoint(x,y), Qt::LeftButton, 0);
- dispatchMouseEvent(&clickEvent, EventImpl::KHTML_CLICK_EVENT);
+ dispatchMouseEvent(&clickEvent, EventImpl::CLICK_EVENT);
}
// accessKeyAction is used by the accessibility support code
1.2 +2 -3 WebCore/layout-tests/dom/html/level2/html/HTMLInputElement21-expected.txt
Index: HTMLInputElement21-expected.txt
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/dom/html/level2/html/HTMLInputElement21-expected.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HTMLInputElement21-expected.txt 26 Jul 2005 08:35:42 -0000 1.1
+++ HTMLInputElement21-expected.txt 30 Aug 2005 22:59:33 -0000 1.2
@@ -1,3 +1,2 @@
-Test: http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement21
-Status: failure
-Detail: checkedAfterClick: assertTrue failed
+Test: http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement21
+Status: Success
More information about the webkit-changes
mailing list