[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_1_BRANCH: kdelibs/khtml/xml
From: Dirk Mueller <mueller () kde ! org>
Date: 2003-01-18 14:52:07
[Download RAW message or body]
CVS commit by mueller:
fixed crash on node.dispatchEvent(null) (backport revision 1.203)
M +9 -3 dom_nodeimpl.cpp 1.192.2.4
--- kdelibs/khtml/xml/dom_nodeimpl.cpp #1.192.2.3:1.192.2.4
@@ -458,4 +458,10 @@ EventListener *NodeImpl::getHTMLEventLis
bool NodeImpl::dispatchEvent(EventImpl *evt, int &exceptioncode, bool tempEvent)
{
+ // Not mentioned in spec: throw NOT_FOUND_ERR if evt is null
+ if (!evt) {
+ exceptioncode = DOMException::NOT_FOUND_ERR;
+ return false;
+ }
+
evt->setTarget(this);
@@ -625,7 +631,7 @@ bool NodeImpl::dispatchMouseEvent(QMouse
break;
}
- bool ctrlKey = (_mouse->state() & Qt::ControlButton);
- bool altKey = (_mouse->state() & Qt::AltButton);
- bool shiftKey = (_mouse->state() & Qt::ShiftButton);
+ bool ctrlKey = (_mouse->state() & Qt::ControlButton) == Qt::ControlButton;
+ bool altKey = (_mouse->state() & Qt::AltButton) == Qt::AltButton;
+ bool shiftKey = (_mouse->state() & Qt::ShiftButton) == Qt::ShiftButton;
bool metaKey = false; // ### qt support?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic