Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: Source/core/html/forms/TextFieldInputType.cpp

Issue 159483004: Revert of Update of change event for input type number (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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();
226 event->setDefaultHandled(); 225 event->setDefaultHandled();
227 } 226 }
228 227
229 void TextFieldInputType::forwardEvent(Event* event) 228 void TextFieldInputType::forwardEvent(Event* event)
230 { 229 {
231 if (SpinButtonElement* spinButton = spinButtonElement()) { 230 if (SpinButtonElement* spinButton = spinButtonElement()) {
232 spinButton->forwardEvent(event); 231 spinButton->forwardEvent(event);
233 if (event->defaultHandled()) 232 if (event->defaultHandled())
234 return; 233 return;
235 } 234 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 bool TextFieldInputType::shouldSpinButtonRespondToMouseEvents() 568 bool TextFieldInputType::shouldSpinButtonRespondToMouseEvents()
570 { 569 {
571 return !element().isDisabledOrReadOnly(); 570 return !element().isDisabledOrReadOnly();
572 } 571 }
573 572
574 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() 573 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
575 { 574 {
576 return shouldSpinButtonRespondToMouseEvents() && element().focused(); 575 return shouldSpinButtonRespondToMouseEvents() && element().focused();
577 } 576 }
578 577
579 void TextFieldInputType::spinButtonDidReleaseMouseCapture()
580 {
581 element().dispatchFormControlChangeEvent();
582 }
583
584 } // namespace WebCore 578 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/forms/TextFieldInputType.h ('k') | Source/core/html/shadow/SpinButtonElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698