Changeset 70047 in webkit
- Timestamp:
- Oct 19, 2010 4:50:02 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70040 r70047 1 2010-10-19 Ben Murdoch <benm@google.com> 2 3 Reviewed by Steve Block. 4 5 Missing support for document.createTouch and document.createTouchList 6 https://bugs.webkit.org/show_bug.cgi?id=47676 7 8 Add tests to verify the presence of the APIs and that they work correctly. 9 10 * fast/events/touch/document-create-touch-expected.txt: Added. 11 * fast/events/touch/document-create-touch-list-expected.txt: Added. 12 * fast/events/touch/document-create-touch-list.html: Added. 13 * fast/events/touch/document-create-touch.html: Added. 14 * fast/events/touch/script-tests/document-create-touch-list.js: Added. 15 * fast/events/touch/script-tests/document-create-touch.js: Added. 16 1 17 2010-10-19 Hayato Ito <hayato@chromium.org> 2 18 -
trunk/WebCore/Android.jscbindings.mk
r68440 r70047 152 152 bindings/js/JSStyleSheetListCustom.cpp \ 153 153 bindings/js/JSTextCustom.cpp \ 154 bindings/js/JSTouchCustom.cpp \ 155 bindings/js/JSTouchListCustom.cpp \ 154 156 bindings/js/JSTreeWalkerCustom.cpp \ 155 157 bindings/js/JSWebKitCSSMatrixCustom.cpp \ -
trunk/WebCore/CMakeLists.txt
r69968 r70047 671 671 bindings/js/JSStyleSheetListCustom.cpp 672 672 bindings/js/JSTextCustom.cpp 673 bindings/js/JSTouchCustom.cpp 674 bindings/js/JSTouchListCustom.cpp 673 675 bindings/js/JSTreeWalkerCustom.cpp 674 676 bindings/js/JSWebKitCSSMatrixCustom.cpp -
trunk/WebCore/ChangeLog
r70046 r70047 1 2010-10-19 Ben Murdoch <benm@google.com> 2 3 Reviewed by Steve Block. 4 5 Missing support for document.createTouch and document.createTouchList 6 https://bugs.webkit.org/show_bug.cgi?id=47676 7 8 These APIs are used by many sites to detect support for touch events. 9 10 Implement the APIs according to the documentation at: 11 http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html 12 13 Tests: fast/events/touch/document-create-touch-list.html 14 fast/events/touch/document-create-touch.html 15 16 * bindings/js/JSBindingsAllInOne.cpp: Add new files to list. 17 * bindings/js/JSTouchCustom.cpp: Added. 18 (WebCore::toJSNewlyCreated): 19 * bindings/js/JSTouchListCustom.cpp: Added. 20 (WebCore::toJSNewlyCreated): 21 * bindings/scripts/CodeGeneratorJS.pm: 22 * dom/Document.cpp: 23 (WebCore::Document::createTouch): 24 (WebCore::Document::createTouchList): 25 * dom/Document.h: 26 * dom/Document.idl: Add createTouch and createTouchList functions. 27 * Android.jscbindings.mk: Update makefiles. 28 * CMakeLists.txt: Ditto. 29 * GNUmakefile.am: Ditto. 30 * WebCore.gypi: Ditto. 31 * WebCore.pro: Ditto. 32 33 1 34 2010-10-19 Pavel Feldman <pfeldman@chromium.org> 2 35 -
trunk/WebCore/GNUmakefile.am
r70033 r70047 797 797 WebCore/bindings/js/JSSVGPODTypeWrapper.h \ 798 798 WebCore/bindings/js/JSTextCustom.cpp \ 799 WebCore/bindings/js/JSTouchCustom.cpp \ 800 WebCore/bindings/js/JSTouchListCustom.cpp \ 799 801 WebCore/bindings/js/JSTreeWalkerCustom.cpp \ 800 802 WebCore/bindings/js/JSWebKitCSSMatrixCustom.cpp \ -
trunk/WebCore/WebCore.gypi
r69968 r70047 679 679 'bindings/js/JSSVGPODTypeWrapper.h', 680 680 'bindings/js/JSTextCustom.cpp', 681 'bindings/js/JSTouchCustom.cpp', 682 'bindings/js/JSTouchListCustom.cpp', 681 683 'bindings/js/JSTreeWalkerCustom.cpp', 682 684 'bindings/js/JSWebKitCSSMatrixCustom.cpp', -
trunk/WebCore/WebCore.pro
r69968 r70047 552 552 bindings/js/JSStyleSheetListCustom.cpp \ 553 553 bindings/js/JSTextCustom.cpp \ 554 bindings/js/JSTouchCustom.cpp \ 555 bindings/js/JSTouchListCustom.cpp \ 554 556 bindings/js/JSTreeWalkerCustom.cpp \ 555 557 bindings/js/JSWebKitCSSMatrixCustom.cpp \ -
trunk/WebCore/bindings/js/JSBindingsAllInOne.cpp
r67167 r70047 125 125 #include "JSStyleSheetListCustom.cpp" 126 126 #include "JSTextCustom.cpp" 127 #include "JSTouchCustom.cpp" 128 #include "JSTouchListCustom.cpp" 127 129 #include "JSTreeWalkerCustom.cpp" 128 130 #include "JSWebKitCSSMatrixCustom.cpp" -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r69553 r70047 611 611 } 612 612 613 my %usesToJSNewlyCreated = ( 614 "CDATASection" => 1, 615 "Element" => 1, 616 "Node" => 1, 617 "Text" => 1, 618 "Touch" => 1, 619 "TouchList" => 1 620 ); 621 613 622 sub GenerateHeader 614 623 { … … 944 953 } 945 954 } 946 if ($ interfaceName eq "Node" or $interfaceName eq "Element" or $interfaceName eq "Text" or $interfaceName eq "CDATASection") {955 if ($usesToJSNewlyCreated{$interfaceName}) { 947 956 push(@headerContent, "JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName*);\n"); 948 957 } -
trunk/WebCore/dom/Document.cpp
r69984 r70047 4774 4774 } 4775 4775 4776 #if ENABLE(TOUCH_EVENTS) 4777 PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const 4778 { 4779 // FIXME: It's not clear from the documentation at 4780 // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html 4781 // when this method should throw and nor is it by inspection of iOS behavior. It would be nice to verify any cases where it throws under iOS 4782 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=47819 4783 // Ditto for the createTouchList method below. 4784 Frame* frame = window ? window->frame() : this->frame(); 4785 return Touch::create(frame, target, identifier, screenX, screenY, pageX, pageY); 4786 } 4787 4788 PassRefPtr<TouchList> Document::createTouchList(ExceptionCode&) const 4789 { 4790 return TouchList::create(); 4791 } 4792 #endif 4793 4776 4794 } // namespace WebCore -
trunk/WebCore/dom/Document.h
r69710 r70047 137 137 #endif 138 138 139 #if ENABLE(TOUCH_EVENTS) 140 class Touch; 141 class TouchList; 142 #endif 143 139 144 typedef int ExceptionCode; 140 145 … … 1034 1039 bool isDelayingLoadEvent() const { return m_loadEventDelayCount; } 1035 1040 1041 #if ENABLE(TOUCH_EVENTS) 1042 PassRefPtr<Touch> createTouch(DOMWindow*, EventTarget*, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const; 1043 PassRefPtr<TouchList> createTouchList(ExceptionCode&) const; 1044 #endif 1045 1036 1046 protected: 1037 1047 Document(Frame*, const KURL& url, bool isXHTML, bool isHTML, const KURL& baseURL = KURL()); -
trunk/WebCore/dom/Document.idl
r69710 r70047 325 325 #endif 326 326 327 #if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS 328 [ReturnsNew] Touch createTouch(in DOMWindow window, 329 in EventTarget target, 330 in long identifier, 331 in long pageX, 332 in long pageY, 333 in long ScreenX, 334 in long screenY) 335 raises (DOMException); 336 [ReturnsNew] TouchList createTouchList() 337 raises (DOMException); 338 #endif 339 327 340 #if defined(LANGUAGE_CPP) && LANGUAGE_CPP 328 341 // Extra WebCore methods exposed to allow compile-time casting in C++
Note: See TracChangeset
for help on using the changeset viewer.