diff options
Diffstat (limited to 'WebCore/html/BaseButtonInputType.cpp')
-rw-r--r-- | WebCore/html/BaseButtonInputType.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/WebCore/html/BaseButtonInputType.cpp b/WebCore/html/BaseButtonInputType.cpp index 0ba1d89..fd6a8ff 100644 --- a/WebCore/html/BaseButtonInputType.cpp +++ b/WebCore/html/BaseButtonInputType.cpp @@ -32,7 +32,6 @@ #include "BaseButtonInputType.h" #include "HTMLInputElement.h" -#include "KeyboardEvent.h" #include "RenderButton.h" namespace WebCore { @@ -43,43 +42,6 @@ bool BaseButtonInputType::appendFormData(FormDataList&, bool) const return false; } -bool BaseButtonInputType::handleKeydownEvent(KeyboardEvent* event) -{ - const String& key = event->keyIdentifier(); - if (key == "U+0020") { - element()->setActive(true, true); - // No setDefaultHandled(), because IE dispatches a keypress in this case - // and the caller will only dispatch a keypress if we don't call setDefaultHandled(). - } - return false; -} - -bool BaseButtonInputType::handleKeypressEvent(KeyboardEvent* event) -{ - int charCode = event->charCode(); - if (charCode == '\r') { - element()->dispatchSimulatedClick(event); - event->setDefaultHandled(); - return true; - } - if (charCode == ' ') { - // Prevent scrolling down the page. - event->setDefaultHandled(); - return true; - } - return false; -} - -bool BaseButtonInputType::handleKeyupEvent(KeyboardEvent* event) -{ - const String& key = event->keyIdentifier(); - if (key != "U+0020") - return false; - // Simulate mouse click for spacebar for button types. - dispatchSimulatedClickIfActive(event); - return true; -} - RenderObject* BaseButtonInputType::createRenderer(RenderArena* arena, RenderStyle*) const { return new (arena) RenderButton(element()); |