From 3d5955438aa5f7e05fd53fd1b4e39f5a08a48542 Mon Sep 17 00:00:00 2001 From: Drahakar Date: Tue, 20 Jan 2015 23:40:10 -0500 Subject: [PATCH] Deactivated the UserGestureIndicator fixes issue #12506 https://github.com/ariya/phantomjs/issues/12506 Since phantomJS is a headless browser, evaluating if the gesture comes from a user is pointless. The UserGestureIndicator is now a dummy class that always returns true. --- src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.cpp | 2 +- src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.cpp b/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.cpp index 10e46ee94..309104b75 100644 --- a/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.cpp +++ b/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.cpp @@ -30,7 +30,7 @@ namespace WebCore { static bool isDefinite(ProcessingUserGestureState state) { - return state == DefinitelyProcessingUserGesture || state == DefinitelyNotProcessingUserGesture; + return true;//state == DefinitelyProcessingUserGesture || state == DefinitelyNotProcessingUserGesture; } ProcessingUserGestureState UserGestureIndicator::s_state = DefinitelyNotProcessingUserGesture; diff --git a/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.h b/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.h index 1cd0339be..7d79733cd 100644 --- a/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.h +++ b/src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.h @@ -39,7 +39,7 @@ enum ProcessingUserGestureState { class UserGestureIndicator { WTF_MAKE_NONCOPYABLE(UserGestureIndicator); public: - static bool processingUserGesture() { return s_state == DefinitelyProcessingUserGesture; } + static bool processingUserGesture() { return true; } //We fake user gesture since we're running in headless mode explicit UserGestureIndicator(ProcessingUserGestureState); ~UserGestureIndicator();