REGRESSION (r167689): Hovering file name in a file input causes a crash
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Apr 2014 04:41:42 +0000 (04:41 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Apr 2014 04:41:42 +0000 (04:41 +0000)
commit54a5211deeaae37e2ad4d0fba29c9c4414a56606
treec57441a95a9fbc3ec30a16fd60813a6c63749c42
parent795a616c52cbec2227402196acb8e45c0c66c95a
REGRESSION (r167689): Hovering file name in a file input causes a crash
https://bugs.webkit.org/show_bug.cgi?id=132214

Reviewed by Andreas Kling.

Source/WebCore:
The bug was caused by callDefaultEventHandlersInTheBubblingOrder unconditionally
accessing path.contextAt(0) even if the event path was empty.

Fixed the bug by exiting early when the event path is empty.

Test: fast/events/shadow-event-path-2.html

* dom/EventDispatcher.cpp:
(WebCore::callDefaultEventHandlersInTheBubblingOrder):

LayoutTests:
Add a regression test.

* fast/events/shadow-event-path-2-expected.txt: Added.
* fast/events/shadow-event-path-2.html: Added.
* fast/events/shadow-event-path.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/shadow-event-path-2-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/shadow-event-path-2.html [new file with mode: 0644]
LayoutTests/fast/events/shadow-event-path.html
Source/WebCore/ChangeLog
Source/WebCore/dom/EventDispatcher.cpp