summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/html/TextFieldInputType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/TextFieldInputType.cpp')
-rw-r--r--Source/WebCore/html/TextFieldInputType.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/WebCore/html/TextFieldInputType.cpp b/Source/WebCore/html/TextFieldInputType.cpp
index 54527b1..1d06be3 100644
--- a/Source/WebCore/html/TextFieldInputType.cpp
+++ b/Source/WebCore/html/TextFieldInputType.cpp
@@ -52,6 +52,11 @@ bool TextFieldInputType::valueMissing(const String& value) const
return value.isEmpty();
}
+bool TextFieldInputType::canSetSuggestedValue()
+{
+ return true;
+}
+
void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event)
{
if (!element()->focused())
@@ -64,6 +69,8 @@ void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event)
void TextFieldInputType::handleKeydownEventForSpinButton(KeyboardEvent* event)
{
+ if (element()->disabled() || element()->readOnly())
+ return;
const String& key = event->keyIdentifier();
int step = 0;
if (key == "Up")
@@ -78,6 +85,8 @@ void TextFieldInputType::handleKeydownEventForSpinButton(KeyboardEvent* event)
void TextFieldInputType::handleWheelEventForSpinButton(WheelEvent* event)
{
+ if (element()->disabled() || element()->readOnly())
+ return;
int step = 0;
if (event->wheelDeltaY() > 0)
step = 1;