diff options
author | Ben Murdoch <benm@google.com> | 2010-10-17 16:26:08 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-18 15:33:09 +0100 |
commit | ae2f706e781550da00a8440e44f20bbb7bd24c30 (patch) | |
tree | 3e8776287410e234333d5e934ce244256155eca3 /WebCore | |
parent | 38739d1775cff08915cd14d0c77356b21f4f77b7 (diff) | |
download | external_webkit-ae2f706e781550da00a8440e44f20bbb7bd24c30.zip external_webkit-ae2f706e781550da00a8440e44f20bbb7bd24c30.tar.gz external_webkit-ae2f706e781550da00a8440e44f20bbb7bd24c30.tar.bz2 |
Fix Webkit review comments for document.createTouch
See WebKit bug https://bugs.webkit.org/show_bug.cgi?id=47676
for details.
Change-Id: I232445c78d59ed3d13c9bcd86b9fa9590ffae552
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/dom/Document.cpp | 7 | ||||
-rw-r--r-- | WebCore/dom/Document.h | 2 | ||||
-rw-r--r-- | WebCore/dom/Document.idl | 7 |
3 files changed, 11 insertions, 5 deletions
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp index bffc07c..2ad8b50 100644 --- a/WebCore/dom/Document.cpp +++ b/WebCore/dom/Document.cpp @@ -4827,8 +4827,13 @@ void Document::decrementLoadEventDelayCount() } #if ENABLE(TOUCH_EVENTS) -PassRefPtr<Touch> Document::createTouch(DOMWindow* window, Node* target, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const +PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const { + // FIXME: It's not clear from the documentation at + // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html + // 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 + // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=47819 + // Ditto for the createTouchList method below. Frame* frame = window ? window->frame() : this->frame(); return Touch::create(frame, target, identifier, screenX, screenY, pageX, pageY); } diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h index 41a486a..e119d40 100644 --- a/WebCore/dom/Document.h +++ b/WebCore/dom/Document.h @@ -1047,7 +1047,7 @@ public: bool isDelayingLoadEvent() const { return m_loadEventDelayCount; } #if ENABLE(TOUCH_EVENTS) - PassRefPtr<Touch> createTouch(DOMWindow*, Node*, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const; + PassRefPtr<Touch> createTouch(DOMWindow*, EventTarget*, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const; PassRefPtr<TouchList> createTouchList(ExceptionCode&) const; #endif diff --git a/WebCore/dom/Document.idl b/WebCore/dom/Document.idl index 02eb30d..f05a430 100644 --- a/WebCore/dom/Document.idl +++ b/WebCore/dom/Document.idl @@ -321,9 +321,12 @@ module core { attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchmove; attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend; attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel; + attribute [DontEnum, Conditional=FULLSCREEN_API] EventListener onwebkitfullscreenchange; +#endif + #if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS [ReturnsNew] Touch createTouch(in DOMWindow window, - in Node target, + in EventTarget target, in long identifier, in long pageX, in long pageY, @@ -333,8 +336,6 @@ module core { [ReturnsNew] TouchList createTouchList() raises (DOMException); #endif - attribute [DontEnum, Conditional=FULLSCREEN_API] EventListener onwebkitfullscreenchange; -#endif #if defined(LANGUAGE_CPP) && LANGUAGE_CPP // Extra WebCore methods exposed to allow compile-time casting in C++ |