Skip to content

Commit

Permalink
Deactivated the UserGestureIndicator
Browse files Browse the repository at this point in the history
fixes issue ariya#12506 ariya#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.
  • Loading branch information
Drahakar committed Jan 21, 2015
1 parent 0bf14a3 commit 3d59554
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/qtwebkit/Source/WebCore/dom/UserGestureIndicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3d59554

Please sign in to comment.