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

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

Issue 2556423002: Missing style invalidation for :in-range and :out-of-range. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698