Changeset 207501 in webkit


Ignore:
Timestamp:
Oct 18, 2016 4:40:53 PM (8 years ago)
Author:
Chris Dumez
Message:

[iOS] Drop JSDictionary::convertValue() overload taking a TouchList
https://bugs.webkit.org/show_bug.cgi?id=163620

Reviewed by Sam Weinig.

Drop JSDictionary::convertValue() overload taking a TouchList now that
TouchEvent is using a proper constructor with a TouchEventInit
dictionary on iOS.

  • bindings/js/JSDictionary.cpp:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207499 r207501  
     12016-10-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [iOS] Drop JSDictionary::convertValue() overload taking a TouchList
     4        https://bugs.webkit.org/show_bug.cgi?id=163620
     5
     6        Reviewed by Sam Weinig.
     7
     8        Drop JSDictionary::convertValue() overload taking a TouchList now that
     9        TouchEvent is using a proper constructor with a TouchEventInit
     10        dictionary on iOS.
     11
     12        * bindings/js/JSDictionary.cpp:
     13
    1142016-10-18  Dean Jackson  <dino@apple.com>
    215
  • trunk/Source/WebCore/bindings/js/JSDictionary.cpp

    r206983 r207501  
    353353#endif
    354354
    355 #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
     355#if ENABLE(TOUCH_EVENTS)
    356356void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<TouchList>& result)
    357357{
    358358    result = JSTouchList::toWrapped(value);
    359 }
    360 #endif
    361 
    362 #if ENABLE(IOS_TOUCH_EVENTS)
    363 void JSDictionary::convertValue(JSC::ExecState* exec, JSC::JSValue value, RefPtr<TouchList>& result)
    364 {
    365     VM& vm = exec->vm();
    366     auto scope = DECLARE_THROW_SCOPE(vm);
    367 
    368     JSObject* object = value.getObject();
    369     if (!object) {
    370         result = nullptr;
    371         return;
    372     }
    373 
    374     // Allow both TouchList and sequence<Touch> as input.
    375     const ClassInfo* classInfo = object->classInfo();
    376     if (classInfo == JSTouchList::info()) {
    377         result = JSTouchList::toWrapped(value);
    378         return;
    379     }
    380 
    381     auto touches = toRefNativeArray<Touch, JSTouch>(*exec, value);
    382     RETURN_IF_EXCEPTION(scope, void());
    383     result = TouchList::create(WTFMove(touches));
    384359}
    385360#endif
Note: See TracChangeset for help on using the changeset viewer.