OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 { | 215 { |
216 if (element().isDisabledOrReadOnly()) | 216 if (element().isDisabledOrReadOnly()) |
217 return; | 217 return; |
218 const String& key = event->keyIdentifier(); | 218 const String& key = event->keyIdentifier(); |
219 if (key == "Up") | 219 if (key == "Up") |
220 spinButtonStepUp(); | 220 spinButtonStepUp(); |
221 else if (key == "Down") | 221 else if (key == "Down") |
222 spinButtonStepDown(); | 222 spinButtonStepDown(); |
223 else | 223 else |
224 return; | 224 return; |
| 225 element().dispatchFormControlChangeEvent(); |
225 event->setDefaultHandled(); | 226 event->setDefaultHandled(); |
226 } | 227 } |
227 | 228 |
228 void TextFieldInputType::forwardEvent(Event* event) | 229 void TextFieldInputType::forwardEvent(Event* event) |
229 { | 230 { |
230 if (SpinButtonElement* spinButton = spinButtonElement()) { | 231 if (SpinButtonElement* spinButton = spinButtonElement()) { |
231 spinButton->forwardEvent(event); | 232 spinButton->forwardEvent(event); |
232 if (event->defaultHandled()) | 233 if (event->defaultHandled()) |
233 return; | 234 return; |
234 } | 235 } |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 { | 570 { |
570 return !element().isDisabledOrReadOnly(); | 571 return !element().isDisabledOrReadOnly(); |
571 } | 572 } |
572 | 573 |
573 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() | 574 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() |
574 { | 575 { |
575 return shouldSpinButtonRespondToMouseEvents() && element().focused(); | 576 return shouldSpinButtonRespondToMouseEvents() && element().focused(); |
576 } | 577 } |
577 | 578 |
578 } // namespace WebCore | 579 } // namespace WebCore |
OLD | NEW |