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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 | 497 |
498 void TextFieldInputType::subtreeHasChanged() { | 498 void TextFieldInputType::subtreeHasChanged() { |
499 bool wasChanged = element().wasChangedSinceLastFormControlChangeEvent(); | 499 bool wasChanged = element().wasChangedSinceLastFormControlChangeEvent(); |
500 element().setChangedSinceLastFormControlChangeEvent(true); | 500 element().setChangedSinceLastFormControlChangeEvent(true); |
501 | 501 |
502 element().setValueFromRenderer(sanitizeUserInputValue( | 502 element().setValueFromRenderer(sanitizeUserInputValue( |
503 convertFromVisibleValue(element().innerEditorValue()))); | 503 convertFromVisibleValue(element().innerEditorValue()))); |
504 element().updatePlaceholderVisibility(); | 504 element().updatePlaceholderVisibility(); |
505 element().pseudoStateChanged(CSSSelector::PseudoValid); | 505 element().pseudoStateChanged(CSSSelector::PseudoValid); |
506 element().pseudoStateChanged(CSSSelector::PseudoInvalid); | 506 element().pseudoStateChanged(CSSSelector::PseudoInvalid); |
| 507 element().pseudoStateChanged(CSSSelector::PseudoInRange); |
| 508 element().pseudoStateChanged(CSSSelector::PseudoOutOfRange); |
507 | 509 |
508 didSetValueByUserEdit(wasChanged ? ValueChangeStateChanged | 510 didSetValueByUserEdit(wasChanged ? ValueChangeStateChanged |
509 : ValueChangeStateNone); | 511 : ValueChangeStateNone); |
510 } | 512 } |
511 | 513 |
512 void TextFieldInputType::didSetValueByUserEdit(ValueChangeState state) { | 514 void TextFieldInputType::didSetValueByUserEdit(ValueChangeState state) { |
513 if (!element().isFocused()) | 515 if (!element().isFocused()) |
514 return; | 516 return; |
515 if (ChromeClient* chromeClient = this->chromeClient()) | 517 if (ChromeClient* chromeClient = this->chromeClient()) |
516 chromeClient->didChangeValueInTextField(element()); | 518 chromeClient->didChangeValueInTextField(element()); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 return shouldSpinButtonRespondToMouseEvents() && element().isFocused(); | 555 return shouldSpinButtonRespondToMouseEvents() && element().isFocused(); |
554 } | 556 } |
555 | 557 |
556 void TextFieldInputType::spinButtonDidReleaseMouseCapture( | 558 void TextFieldInputType::spinButtonDidReleaseMouseCapture( |
557 SpinButtonElement::EventDispatch eventDispatch) { | 559 SpinButtonElement::EventDispatch eventDispatch) { |
558 if (eventDispatch == SpinButtonElement::EventDispatchAllowed) | 560 if (eventDispatch == SpinButtonElement::EventDispatchAllowed) |
559 element().dispatchFormControlChangeEvent(); | 561 element().dispatchFormControlChangeEvent(); |
560 } | 562 } |
561 | 563 |
562 } // namespace blink | 564 } // namespace blink |
OLD | NEW |