diff options
Diffstat (limited to 'WebCore/rendering/TextControlInnerElements.cpp')
-rw-r--r-- | WebCore/rendering/TextControlInnerElements.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/WebCore/rendering/TextControlInnerElements.cpp b/WebCore/rendering/TextControlInnerElements.cpp index 1939133..e5228f0 100644 --- a/WebCore/rendering/TextControlInnerElements.cpp +++ b/WebCore/rendering/TextControlInnerElements.cpp @@ -395,6 +395,12 @@ PassRefPtr<InputFieldSpeechButtonElement> InputFieldSpeechButtonElement::create( void InputFieldSpeechButtonElement::defaultEventHandler(Event* event) { + // For privacy reasons, only allow clicks directly coming from the user. + if (!event->fromUserGesture()) { + HTMLDivElement::defaultEventHandler(event); + return; + } + // On mouse down, select the text and set focus. HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode()); if (event->type() == eventNames().mousedownEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) { |