Commit c4c36f09 authored by inferno@chromium.org's avatar inferno@chromium.org
Browse files

2010-10-25 Cris Neckar <cdn@chromium.org>

        Reviewed by Dimitri Glazkov.

        Added check to ensure that events with the type "mousedown" are mouse events before dispatching.
        https://bugs.webkit.org/show_bug.cgi?id=48159

        Test: fast/events/keyboardevent-mousedown-crash.html

        * dom/Node.cpp:
        (WebCore::Node::defaultEventHandler):
2010-10-25  Cris Neckar  <cdn@chromium.org>

        Reviewed by Dimitri Glazkov.

        Tests for a crash when an event with the type "mousedown" is not a MouseEvent.
        https://bugs.webkit.org/show_bug.cgi?id=48159

        * fast/events/keyboardevent-mousedown-crash-expected.txt: Added.
        * fast/events/keyboardevent-mousedown-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b0d882fe
2010-10-25 Cris Neckar <cdn@chromium.org>
Reviewed by Dimitri Glazkov.
Tests for a crash when an event with the type "mousedown" is not a MouseEvent.
https://bugs.webkit.org/show_bug.cgi?id=48159
* fast/events/keyboardevent-mousedown-crash-expected.txt: Added.
* fast/events/keyboardevent-mousedown-crash.html: Added.
2010-10-25 Dimitri Glazkov <dglazkov@chromium.org>
 
Add a flaky test to expectations.
<html>
<body>
<div id="test"></div>
<div id="result"></div>
<script>
if (window.layoutTestController)
{
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
var event = document.createEvent('KeyboardEvent');
event.initEvent('mousedown', true, true);
document.getElementById('test').dispatchEvent(event);
document.getElementById('result').innerHTML = "PASS";
if (window.layoutTestController)
layoutTestController.notifyDone();
</script>
</body>
</html>
2010-10-25 Cris Neckar <cdn@chromium.org>
Reviewed by Dimitri Glazkov.
Added check to ensure that events with the type "mousedown" are mouse events before dispatching.
https://bugs.webkit.org/show_bug.cgi?id=48159
Test: fast/events/keyboardevent-mousedown-crash.html
* dom/Node.cpp:
(WebCore::Node::defaultEventHandler):
2010-10-25 Kwang Yul Seo <skyul@company100.net>
 
Unreviewed build fix for r70400.
......@@ -2918,7 +2918,7 @@ void Node::defaultEventHandler(Event* event)
if (Frame* frame = document()->frame())
frame->eventHandler()->defaultTextInputEventHandler(static_cast<TextEvent*>(event));
#if ENABLE(PAN_SCROLLING)
} else if (eventType == eventNames().mousedownEvent) {
} else if (eventType == eventNames().mousedownEvent && event->isMouseEvent()) {
MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
if (mouseEvent->button() == MiddleButton) {
if (enclosingLinkEventParentOrSelf())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment