Touch.prototype is undefined on iOS
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 May 2016 19:54:51 +0000 (19:54 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 May 2016 19:54:51 +0000 (19:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157560
<rdar://problem/26143008>

Reviewed by Chris Dumez.

Remove Touch and TouchList attributes from DOMWindow.
These attributes should be exposed via generated binding code (JSDOMWindow.cpp).

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::touch): Deleted.
(WebCore::JSDOMWindow::touchList): Deleted.
* bindings/js/ios/TouchConstructors.cpp:
* page/DOMWindow.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200788 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/ios/TouchConstructors.cpp
Source/WebCore/page/DOMWindow.idl

index e621cf6..820a01d 100644 (file)
@@ -1,5 +1,22 @@
 2016-05-12  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Touch.prototype is undefined on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=157560
+        <rdar://problem/26143008>
+
+        Reviewed by Chris Dumez.
+
+        Remove Touch and TouchList attributes from DOMWindow.
+        These attributes should be exposed via generated binding code (JSDOMWindow.cpp).
+
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::JSDOMWindow::touch): Deleted.
+        (WebCore::JSDOMWindow::touchList): Deleted.
+        * bindings/js/ios/TouchConstructors.cpp:
+        * page/DOMWindow.idl:
+
+2016-05-12  Ryosuke Niwa  <rniwa@webkit.org>
+
         indexForVisiblePosition should use the root editable element as the scope
         https://bugs.webkit.org/show_bug.cgi?id=157611
 
index cebee26..6d4be3e 100644 (file)
 #include "ScheduledAction.h"
 #include "Settings.h"
 
-#if ENABLE(IOS_TOUCH_EVENTS)
-#include "JSTouchConstructorIOS.h"
-#include "JSTouchListConstructorIOS.h"
-#endif
-
 #if ENABLE(WEB_AUDIO)
 #include "JSAudioContext.h"
 #endif
@@ -438,18 +433,6 @@ JSValue JSDOMWindow::image(ExecState& state) const
     return createImageConstructor(state.vm(), *this);
 }
 
-#if ENABLE(IOS_TOUCH_EVENTS)
-JSValue JSDOMWindow::touch(ExecState& state) const
-{
-    return getDOMConstructor<JSTouchConstructor>(state.vm(), *this);
-}
-
-JSValue JSDOMWindow::touchList(ExecState& state) const
-{
-    return getDOMConstructor<JSTouchListConstructor>(state.vm(), *this);
-}
-#endif
-
 // Custom functions
 
 JSValue JSDOMWindow::open(ExecState& state)
index ebc016b..99b1d5a 100644 (file)
@@ -27,7 +27,7 @@
 
 #if ENABLE(IOS_TOUCH_EVENTS)
 
-#include <WebKitAdditions/JSTouchConstructorIOS.cpp>
-#include <WebKitAdditions/JSTouchListConstructorIOS.cpp>
+#include <WebKitAdditions/JSTouchCustomIOS.cpp>
+#include <WebKitAdditions/JSTouchListCustomIOS.cpp>
 
 #endif
index 8335b44..e7781a3 100644 (file)
     [CustomGetter, CustomConstructor] attribute HTMLImageElementNamedConstructor Image; // Usable with new operator
     attribute DOMTokenListConstructor DOMSettableTokenList; // Map DOMSettableTokenList to DOMTokenList for backward compatibility.
 
-    [Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchConstructor Touch; // Usable with the new operator
-    [Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchListConstructor TouchList; // Usable with the new operator
-
     attribute DOMURLConstructor webkitURL; // FIXME: deprecate this.
     attribute MutationObserverConstructor WebKitMutationObserver; // FIXME: Add metrics to determine when we can remove this.
 #endif // defined(LANGUAGE_JAVASCRIPT)