Changeset 167805 in webkit


Ignore:
Timestamp:
Apr 25, 2014 7:28:24 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Web process is crashed during dispatching touchEvent created by JS.
https://bugs.webkit.org/show_bug.cgi?id=113225

Patch by Miyoung Shin <myid.shin@samsung.com> on 2014-04-25
Reviewed by Benjamin Poulain.

TouchEvent created by JS should have the necessary attributes
of touches, targetTouches and changedTouches.
It should be verified weather there are touchLists before dispatching touch event.

Source/WebCore:
Test: fast/events/touch/create-touch-event-without-touchList.html

  • dom/EventDispatcher.cpp:

(WebCore::EventDispatcher::dispatchEvent):
(WebCore::EventPath::updateTouchLists):
(WebCore::addRelatedNodeResolversForTouchList): Deleted.

LayoutTests:

  • fast/events/touch/create-touch-event-without-touchList-expected.txt: Added.
  • fast/events/touch/create-touch-event-without-touchList.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167803 r167805  
     12014-04-25  Miyoung Shin  <myid.shin@samsung.com>
     2
     3        Web process is crashed during dispatching touchEvent created by JS.
     4        https://bugs.webkit.org/show_bug.cgi?id=113225
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        TouchEvent created by JS should have the necessary attributes
     9        of touches, targetTouches and changedTouches.
     10        It should be verified weather there are touchLists before dispatching touch event.
     11
     12        * fast/events/touch/create-touch-event-without-touchList-expected.txt: Added.
     13        * fast/events/touch/create-touch-event-without-touchList.html: Added.
     14
    1152014-04-25  Radu Stavila  <stavila@adobe.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r167804 r167805  
     12014-04-25  Miyoung Shin  <myid.shin@samsung.com>
     2
     3        Web process is crashed during dispatching touchEvent created by JS.
     4        https://bugs.webkit.org/show_bug.cgi?id=113225
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        TouchEvent created by JS should have the necessary attributes
     9        of touches, targetTouches and changedTouches.
     10        It should be verified weather there are touchLists before dispatching touch event.
     11
     12        Test: fast/events/touch/create-touch-event-without-touchList.html
     13
     14        * dom/EventDispatcher.cpp:
     15        (WebCore::EventDispatcher::dispatchEvent):
     16        (WebCore::EventPath::updateTouchLists):
     17        (WebCore::addRelatedNodeResolversForTouchList): Deleted.
     18
    1192014-04-25  Philippe Normand  <pnormand@igalia.com>
    220
  • trunk/Source/WebCore/dom/EventDispatcher.cpp

    r167744 r167805  
    8989
    9090#if ENABLE(TOUCH_EVENTS)
    91     void updateTouchLists(const TouchEvent&);
     91    bool updateTouchLists(const TouchEvent&);
    9292#endif
    9393    void setRelatedTarget(Node& origin, EventTarget&);
     
    340340        eventPath.setRelatedTarget(*node, *relatedTarget);
    341341#if ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS)
    342     if (event->isTouchEvent())
    343         eventPath.updateTouchLists(*toTouchEvent(event.get()));
     342    if (event->isTouchEvent()) {
     343        if (!eventPath.updateTouchLists(*toTouchEvent(event.get())))
     344            return true;
     345    }
    344346#endif
    345347
     
    460462}
    461463
    462 void EventPath::updateTouchLists(const TouchEvent& touchEvent)
    463 {
     464bool EventPath::updateTouchLists(const TouchEvent& touchEvent)
     465{
     466    if (!touchEvent.touches() || !touchEvent.targetTouches() || !touchEvent.changedTouches())
     467        return false;
     468   
    464469    Vector<EventRelatedNodeResolver, 16> touchTargetResolvers;
    465470    const size_t touchNodeCount = touchEvent.touches()->length() + touchEvent.targetTouches()->length() + touchEvent.changedTouches()->length();
     
    482487        }
    483488    }
     489    return true;
    484490}
    485491#endif
Note: See TracChangeset for help on using the changeset viewer.