Commit 4f58f490 authored by jochen@chromium.org's avatar jochen@chromium.org

Remove support for consumable user gestures

https://bugs.webkit.org/show_bug.cgi?id=118247

Reviewed by Geoffrey Garen.

Source/WebCore:

The features was not enabled on any port, and is meanwhile broken, so we
should delete it.

No new tests, just deleting dead code.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeScript):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
* dom/UserGestureIndicator.cpp:
(WebCore::isDefinite):
(WebCore::UserGestureIndicator::UserGestureIndicator):
(WebCore::UserGestureIndicator::~UserGestureIndicator):
* dom/UserGestureIndicator.h:
(WebCore::UserGestureIndicator::processingUserGesture):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::contextMenuItemSelected):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::navigate):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::fire):
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledRedirect::fire):
(WebCore::ScheduledRefresh::fire):
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::showModalDialog):
* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/EventHandler.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):

Source/WebKit/blackberry:

* WebKitSupport/NotificationManager.cpp:
(BlackBerry::WebKit::NotificationManager::notificationClicked):

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::evaluate):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView sendEvent:isDrawRect:]):

Source/WebKit/qt:

* WebCoreSupport/NotificationPresenterClientQt.cpp:
(WebCore::NotificationPresenterClientQt::notificationClicked):

Source/WebKit/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle):

Source/WebKit2:

* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::didClickNotification):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performFrameLoadURLRequest):
(WebKit::PluginView::evaluate):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 655b3126
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
The features was not enabled on any port, and is meanwhile broken, so we
should delete it.
No new tests, just deleting dead code.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeScript):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
* dom/UserGestureIndicator.cpp:
(WebCore::isDefinite):
(WebCore::UserGestureIndicator::UserGestureIndicator):
(WebCore::UserGestureIndicator::~UserGestureIndicator):
* dom/UserGestureIndicator.h:
(WebCore::UserGestureIndicator::processingUserGesture):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::contextMenuItemSelected):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::navigate):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::fire):
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledRedirect::fire):
(WebCore::ScheduledRefresh::fire):
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::showModalDialog):
* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/EventHandler.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
2013-07-01 Frédéric Wang <fred.wang@free.fr>
Add Support for mspace element
......@@ -1020,13 +1020,13 @@ void AccessibilityNodeObject::alterSliderValue(bool increase)
void AccessibilityNodeObject::increment()
{
UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
alterSliderValue(true);
}
void AccessibilityNodeObject::decrement()
{
UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
alterSliderValue(false);
}
......
......@@ -580,7 +580,7 @@ bool AccessibilityObject::press() const
if (Frame* f = actionElem->document()->frame())
f->loader()->resetMultipleFormSubmissionProtection();
UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
actionElem->accessKeyAction(true);
return true;
}
......
......@@ -60,7 +60,7 @@ bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso
ScriptValue ScriptController::executeScript(const String& script, bool forceUserGesture)
{
UserGestureIndicator gestureIndicator(forceUserGesture ? DefinitelyProcessingNewUserGesture : PossiblyProcessingUserGesture);
UserGestureIndicator gestureIndicator(forceUserGesture ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
return executeScript(ScriptSourceCode(script, m_frame->document()->url()));
}
......
......@@ -457,7 +457,7 @@ void ScriptController::clearScriptObjects()
ScriptValue ScriptController::executeScriptInWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture)
{
UserGestureIndicator gestureIndicator(forceUserGesture ? DefinitelyProcessingNewUserGesture : PossiblyProcessingUserGesture);
UserGestureIndicator gestureIndicator(forceUserGesture ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
ScriptSourceCode sourceCode(script, m_frame->document()->url());
if (!canExecuteScripts(AboutToExecuteScript) || isPaused())
......
......@@ -28,120 +28,26 @@
namespace WebCore {
namespace {
class GestureToken : public UserGestureToken {
public:
static PassRefPtr<UserGestureToken> create() { return adoptRef(new GestureToken); }
virtual ~GestureToken() { }
virtual bool hasGestures() const OVERRIDE { return m_consumableGestures > 0; }
void addGesture() { m_consumableGestures++; }
bool consumeGesture()
{
if (!m_consumableGestures)
return false;
m_consumableGestures--;
return true;
}
private:
GestureToken()
: m_consumableGestures(0)
{
}
size_t m_consumableGestures;
};
}
static bool isDefinite(ProcessingUserGestureState state)
{
return state == DefinitelyProcessingNewUserGesture || state == DefinitelyProcessingUserGesture || state == DefinitelyNotProcessingUserGesture;
return state == DefinitelyProcessingUserGesture || state == DefinitelyNotProcessingUserGesture;
}
ProcessingUserGestureState UserGestureIndicator::s_state = DefinitelyNotProcessingUserGesture;
UserGestureIndicator* UserGestureIndicator::s_topmostIndicator = 0;
UserGestureIndicator::UserGestureIndicator(ProcessingUserGestureState state)
: m_previousState(s_state)
{
// We overwrite s_state only if the caller is definite about the gesture state.
if (isDefinite(state)) {
if (!s_topmostIndicator) {
s_topmostIndicator = this;
m_token = GestureToken::create();
} else
m_token = s_topmostIndicator->currentToken();
if (isDefinite(state))
s_state = state;
}
if (state == DefinitelyProcessingNewUserGesture)
static_cast<GestureToken*>(m_token.get())->addGesture();
else if (state == DefinitelyProcessingUserGesture && s_topmostIndicator == this)
static_cast<GestureToken*>(m_token.get())->addGesture();
ASSERT(isDefinite(s_state));
}
UserGestureIndicator::UserGestureIndicator(PassRefPtr<UserGestureToken> token)
: m_previousState(s_state)
{
if (token && static_cast<GestureToken*>(token.get())->hasGestures()) {
if (!s_topmostIndicator) {
s_topmostIndicator = this;
m_token = token;
} else {
m_token = s_topmostIndicator->currentToken();
static_cast<GestureToken*>(m_token.get())->addGesture();
static_cast<GestureToken*>(token.get())->consumeGesture();
}
s_state = DefinitelyProcessingUserGesture;
}
ASSERT(isDefinite(s_state));
}
UserGestureIndicator::~UserGestureIndicator()
{
s_state = m_previousState;
if (s_topmostIndicator == this)
s_topmostIndicator = 0;
ASSERT(isDefinite(s_state));
}
bool UserGestureIndicator::processingUserGesture()
{
return s_topmostIndicator && static_cast<GestureToken*>(s_topmostIndicator->currentToken())->hasGestures() && (s_state == DefinitelyProcessingNewUserGesture || s_state == DefinitelyProcessingUserGesture);
}
bool UserGestureIndicator::consumeUserGesture()
{
if (!s_topmostIndicator)
return false;
return static_cast<GestureToken*>(s_topmostIndicator->currentToken())->consumeGesture();
}
UserGestureToken* UserGestureIndicator::currentToken()
{
if (!s_topmostIndicator)
return 0;
return s_topmostIndicator->m_token.get();
}
UserGestureIndicatorDisabler::UserGestureIndicatorDisabler()
: m_savedState(UserGestureIndicator::s_state)
, m_savedIndicator(UserGestureIndicator::s_topmostIndicator)
{
UserGestureIndicator::s_state = DefinitelyNotProcessingUserGesture;
UserGestureIndicator::s_topmostIndicator = 0;
}
UserGestureIndicatorDisabler::~UserGestureIndicatorDisabler()
{
UserGestureIndicator::s_state = m_savedState;
UserGestureIndicator::s_topmostIndicator = m_savedIndicator;
}
}
......@@ -27,55 +27,27 @@
#define UserGestureIndicator_h
#include <wtf/Noncopyable.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class UserGestureIndicator;
enum ProcessingUserGestureState {
DefinitelyProcessingNewUserGesture,
DefinitelyProcessingUserGesture,
PossiblyProcessingUserGesture,
DefinitelyNotProcessingUserGesture
};
class UserGestureToken : public RefCounted<UserGestureToken> {
public:
virtual ~UserGestureToken() { }
virtual bool hasGestures() const = 0;
};
class UserGestureIndicatorDisabler {
WTF_MAKE_NONCOPYABLE(UserGestureIndicatorDisabler);
public:
UserGestureIndicatorDisabler();
~UserGestureIndicatorDisabler();
private:
ProcessingUserGestureState m_savedState;
UserGestureIndicator* m_savedIndicator;
};
class UserGestureIndicator {
WTF_MAKE_NONCOPYABLE(UserGestureIndicator);
friend class UserGestureIndicatorDisabler;
public:
static bool processingUserGesture();
static bool consumeUserGesture();
static UserGestureToken* currentToken();
static bool processingUserGesture() { return s_state == DefinitelyProcessingUserGesture; }
explicit UserGestureIndicator(ProcessingUserGestureState);
explicit UserGestureIndicator(PassRefPtr<UserGestureToken>);
~UserGestureIndicator();
private:
static ProcessingUserGestureState s_state;
static UserGestureIndicator* s_topmostIndicator;
ProcessingUserGestureState m_previousState;
RefPtr<UserGestureToken> m_token;
};
}
......
......@@ -208,7 +208,7 @@ void InspectorFrontendClientLocal::changeAttachedWindowWidth(unsigned width)
void InspectorFrontendClientLocal::openInNewTab(const String& url)
{
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
Page* page = m_inspectorController->inspectedPage();
Frame* mainFrame = page->mainFrame();
FrameLoadRequest request(mainFrame->document()->securityOrigin(), ResourceRequest(), "_blank");
......
......@@ -94,7 +94,7 @@ private:
virtual void contextMenuItemSelected(ContextMenuItem* item)
{
if (m_frontendHost) {
UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
int itemNumber = item->action() - ContextMenuItemBaseCustomTag;
ScriptFunctionCall function(m_frontendApiObject, "contextMenuItemSelected");
......
......@@ -499,7 +499,7 @@ void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCa
void InspectorPageAgent::navigate(ErrorString*, const String& url)
{
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
Frame* frame = m_page->mainFrame();
frame->loader()->changeLocation(frame->document()->securityOrigin(), frame->document()->completeURL(url), "", false, false);
}
......
......@@ -107,7 +107,7 @@ protected:
virtual void fire(Frame* frame)
{
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
frame->loader()->changeLocation(m_securityOrigin.get(), KURL(ParsedURLString, m_url), m_referrer, lockHistory(), lockBackForwardList(), false);
}
......@@ -117,7 +117,7 @@ protected:
return;
m_haveToldClient = true;
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
frame->loader()->clientRedirected(KURL(ParsedURLString, m_url), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
}
......@@ -158,7 +158,7 @@ public:
virtual void fire(Frame* frame)
{
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
bool refresh = equalIgnoringFragmentIdentifier(frame->document()->url(), KURL(ParsedURLString, url()));
frame->loader()->changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), refresh);
}
......@@ -179,7 +179,7 @@ public:
virtual void fire(Frame* frame)
{
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
frame->loader()->changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), true);
}
};
......@@ -194,7 +194,7 @@ public:
virtual void fire(Frame* frame)
{
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
if (!m_historySteps) {
// Special case for go(0) from a frame -> reload only the frame
......@@ -223,7 +223,7 @@ public:
virtual void fire(Frame* frame)
{
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
// The submitForm function will find a target frame before using the redirection timer.
// Now that the timer has fired, we need to repeat the security check which normally is done when
......@@ -243,7 +243,7 @@ public:
return;
m_haveToldClient = true;
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
frame->loader()->clientRedirected(m_submission->requestURL(), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
}
......
......@@ -30,6 +30,7 @@
#include "InspectorInstrumentation.h"
#include "ScheduledAction.h"
#include "ScriptExecutionContext.h"
#include "UserGestureIndicator.h"
#include <wtf/CurrentTime.h>
#include <wtf/HashSet.h>
#include <wtf/StdLibExtras.h>
......@@ -56,10 +57,8 @@ DOMTimer::DOMTimer(ScriptExecutionContext* context, PassOwnPtr<ScheduledAction>
, m_nestingLevel(timerNestingLevel + 1)
, m_action(action)
, m_originalInterval(interval)
, m_shouldForwardUserGesture(shouldForwardUserGesture(interval, m_nestingLevel))
{
if (shouldForwardUserGesture(interval, m_nestingLevel))
m_userGestureToken = UserGestureIndicator::currentToken();
// Keep asking for the next id until we're given one that we don't already have.
do {
m_timeoutId = context->circularSequentialID();
......@@ -109,8 +108,9 @@ void DOMTimer::fired()
ScriptExecutionContext* context = scriptExecutionContext();
timerNestingLevel = m_nestingLevel;
ASSERT(!context->activeDOMObjectsAreSuspended());
UserGestureIndicator gestureIndicator(m_shouldForwardUserGesture ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
// Only the first execution of a multi-shot timer should get an affirmative user gesture indicator.
UserGestureIndicator gestureIndicator(m_userGestureToken.release());
m_shouldForwardUserGesture = false;
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireTimer(context, m_timeoutId);
......
......@@ -28,7 +28,6 @@
#define DOMTimer_h
#include "SuspendableTimer.h"
#include "UserGestureIndicator.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
......@@ -66,7 +65,7 @@ namespace WebCore {
int m_nestingLevel;
OwnPtr<ScheduledAction> m_action;
int m_originalInterval;
RefPtr<UserGestureToken> m_userGestureToken;
bool m_shouldForwardUserGesture;
};
} // namespace WebCore
......
......@@ -2002,7 +2002,6 @@ void DOMWindow::showModalDialog(const String& urlString, const String& dialogFea
activeWindow, firstFrame, m_frame, function, functionContext);
if (!dialogFrame)
return;
UserGestureIndicatorDisabler disabler;
dialogFrame->page()->chrome().runModal();
}
......
......@@ -82,6 +82,7 @@
#include "StyleCachedImage.h"
#include "TextEvent.h"
#include "TextIterator.h"
#include "UserGestureIndicator.h"
#include "UserTypingGestureIndicator.h"
#include "WheelEvent.h"
#include "WindowsKeyboardCodes.h"
......@@ -397,7 +398,6 @@ void EventHandler::clear()
m_mousePositionIsUnknown = true;
m_lastKnownMousePosition = IntPoint();
m_lastKnownMouseGlobalPosition = IntPoint();
m_lastMouseDownUserGestureToken.clear();
m_mousePressNode = 0;
m_mousePressed = false;
m_capturesDragging = false;
......@@ -1514,7 +1514,6 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
#endif
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
m_lastMouseDownUserGestureToken = gestureIndicator.currentToken();
// FIXME (bug 68185): this call should be made at another abstraction layer
m_frame->loader()->resetMultipleFormSubmissionProtection();
......@@ -1880,12 +1879,7 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
return true;
#endif
OwnPtr<UserGestureIndicator> gestureIndicator;
if (m_lastMouseDownUserGestureToken)
gestureIndicator = adoptPtr(new UserGestureIndicator(m_lastMouseDownUserGestureToken.release()));
else
gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessingUserGesture));
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
#if ENABLE(PAN_SCROLLING)
m_autoscrollController->handleMouseReleaseEvent(mouseEvent);
......
......@@ -37,7 +37,6 @@
#include "TextEventInputType.h"
#include "TextGranularity.h"
#include "Timer.h"
#include "UserGestureIndicator.h"
#include <wtf/Forward.h>
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
......@@ -464,7 +463,6 @@ private:
IntPoint m_mouseDownPos; // In our view's coords.
double m_mouseDownTimestamp;
PlatformMouseEvent m_mouseDown;
RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken;
RefPtr<Node> m_latchedWheelEventNode;
bool m_widgetIsLatched;
......
......@@ -416,7 +416,7 @@ void HitTestResult::toggleMediaFullscreenState() const
#if ENABLE(VIDEO)
if (HTMLMediaElement* mediaElement = this->mediaElement()) {
if (mediaElement->isVideo() && mediaElement->supportsFullscreen()) {
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
mediaElement->toggleFullscreenState();
}
}
......@@ -430,7 +430,7 @@ void HitTestResult::enterFullscreenForVideo() const
if (mediaElt && mediaElt->hasTagName(HTMLNames::videoTag)) {
HTMLVideoElement* videoElt = static_cast<HTMLVideoElement*>(mediaElt);
if (!videoElt->isFullscreen() && mediaElt->supportsFullscreen()) {
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
videoElt->enterFullscreen();
}
}
......
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
* WebKitSupport/NotificationManager.cpp:
(BlackBerry::WebKit::NotificationManager::notificationClicked):
2013-07-01 Kangil Han <kangil.han@samsung.com>
Adopt toHTMLTextAreaElement for code cleanup
......
......@@ -180,7 +180,7 @@ void NotificationManager::notificationClicked(const String& notificationID)
return;
// Indicate that this event is being dispatched in reaction to a user's interaction with a platform notification.
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
notification->dispatchClickEvent();
}
......
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::evaluate):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView sendEvent:isDrawRect:]):
2013-06-27 Jer Noble <jer.noble@apple.com>
Audio in apps which embed WebViews is corrupted.
......
......@@ -873,7 +873,7 @@ bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri
Strong<JSGlobalObject> globalObject(*pluginWorld()->vm(), frame->script()->globalObject(pluginWorld()));
ExecState* exec = globalObject->globalExec();
UserGestureIndicator gestureIndicator(allowPopups ? DefinitelyProcessingNewUserGesture : PossiblyProcessingUserGesture);
UserGestureIndicator gestureIndicator(allowPopups ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
JSValue result = JSC::evaluate(exec, makeSource(script));
......
......@@ -669,7 +669,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
ASSERT(_eventHandler);
{
JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonVM());
UserGestureIndicator gestureIndicator(_eventHandler->currentEventIsUserGesture() ? DefinitelyProcessingNewUserGesture : PossiblyProcessingUserGesture);
UserGestureIndicator gestureIndicator(_eventHandler->currentEventIsUserGesture() ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
acceptedEvent = [_pluginPackage.get() pluginFuncs]->event(plugin, event);
}
[self didCallPlugInFunction];
......
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
* WebCoreSupport/NotificationPresenterClientQt.cpp:
(WebCore::NotificationPresenterClientQt::notificationClicked):
2013-06-27 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLInputElement for code cleanup
......
......@@ -244,7 +244,7 @@ void NotificationPresenterClientQt::notificationClicked(NotificationWrapper* wra
Notification* notification = notificationForWrapper(wrapper);
if (notification) {
// Make sure clicks on notifications are treated as user gestures.
UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
sendEvent(notification, eventNames().clickEvent);
}
}
......
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle):
2013-07-01 peavo@outlook.com <peavo@outlook.com>
[Curl] WebDownload init method is not implemented.
......
......@@ -121,7 +121,7 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame)
url.append("&ie=UTF-8&oe=UTF-8");
if (Page* page = frame->page()) {
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
page->mainFrame()->loader()->urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, MaybeSendReferrer);
}
}
......
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::didClickNotification):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performFrameLoadURLRequest):
(WebKit::PluginView::evaluate):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):
2013-06-27 Jer Noble <jer.noble@apple.com>
Audio in apps which embed WebViews is corrupted.
......
......@@ -249,7 +249,7 @@ void WebNotificationManager::didClickNotification(uint64_t notificationID)
return;
// Indicate that this event is being dispatched in reaction to a user's interaction with a platform notification.
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
notification->dispatchClickEvent();
#else
UNUSED_PARAM(notificationID);
......
......@@ -1097,7 +1097,7 @@ void PluginView::performFrameLoadURLRequest(URLRequest* request)
return;
}
UserGestureIndicator gestureIndicator(request->allowPopups() ? DefinitelyProcessingNewUserGesture : PossiblyProcessingUserGesture);
UserGestureIndicator gestureIndicator(request->allowPopups() ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
// First, try to find a target frame.
Frame* targetFrame = frame->loader()->findFrameForNavigation(request->target());
......@@ -1370,7 +1370,7 @@ bool PluginView::evaluate(NPObject* npObject, const String& scriptString, NPVari
// protect the plug-in view from destruction.
NPRuntimeObjectMap::PluginProtector pluginProtector(&m_npRuntimeObjectMap);
UserGestureIndicator gestureIndicator(allowPopups ? DefinitelyProcessingNewUserGesture : PossiblyProcessingUserGesture);
UserGestureIndicator gestureIndicator(allowPopups ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
return m_npRuntimeObjectMap.evaluate(npObject, scriptString, result);
}
#endif
......
......@@ -85,7 +85,7 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame)
String url = "http://www.google.com/search?q=" + encoded + "&ie=UTF-8&oe=UTF-8";
if (Page* page = frame->page()) {