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

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

Issue 157813010: Revert of Update of change event for input type number (https://codereview.chromium.org/128133002/) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 { 205 {
206 if (element().isDisabledOrReadOnly()) 206 if (element().isDisabledOrReadOnly())
207 return; 207 return;
208 const String& key = event->keyIdentifier(); 208 const String& key = event->keyIdentifier();
209 if (key == "Up") 209 if (key == "Up")
210 spinButtonStepUp(); 210 spinButtonStepUp();
211 else if (key == "Down") 211 else if (key == "Down")
212 spinButtonStepDown(); 212 spinButtonStepDown();
213 else 213 else
214 return; 214 return;
215 element().dispatchFormControlChangeEvent();
216 event->setDefaultHandled(); 215 event->setDefaultHandled();
217 } 216 }
218 217
219 void TextFieldInputType::forwardEvent(Event* event) 218 void TextFieldInputType::forwardEvent(Event* event)
220 { 219 {
221 if (SpinButtonElement* spinButton = spinButtonElement()) { 220 if (SpinButtonElement* spinButton = spinButtonElement()) {
222 spinButton->forwardEvent(event); 221 spinButton->forwardEvent(event);
223 if (event->defaultHandled()) 222 if (event->defaultHandled())
224 return; 223 return;
225 } 224 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 bool TextFieldInputType::shouldSpinButtonRespondToMouseEvents() 558 bool TextFieldInputType::shouldSpinButtonRespondToMouseEvents()
560 { 559 {
561 return !element().isDisabledOrReadOnly(); 560 return !element().isDisabledOrReadOnly();
562 } 561 }
563 562
564 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() 563 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
565 { 564 {
566 return shouldSpinButtonRespondToMouseEvents() && element().focused(); 565 return shouldSpinButtonRespondToMouseEvents() && element().focused();
567 } 566 }
568 567
569 void TextFieldInputType::spinButtonDidReleaseMouseCapture()
570 {
571 element().dispatchFormControlChangeEvent();
572 }
573
574 } // namespace WebCore 568 } // 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