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

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

Issue 152623002: Make StyleChange parameter explicit in setNeedsStyleRecalc. (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
« no previous file with comments | « Source/core/html/forms/InputType.cpp ('k') | Source/core/html/shadow/DateTimeEditElement.cpp » ('j') | 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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 bool wasChanged = element().wasChangedSinceLastFormControlChangeEvent(); 506 bool wasChanged = element().wasChangedSinceLastFormControlChangeEvent();
507 element().setChangedSinceLastFormControlChangeEvent(true); 507 element().setChangedSinceLastFormControlChangeEvent(true);
508 508
509 // We don't need to call sanitizeUserInputValue() function here because 509 // We don't need to call sanitizeUserInputValue() function here because
510 // HTMLInputElement::handleBeforeTextInsertedEvent() has already called 510 // HTMLInputElement::handleBeforeTextInsertedEvent() has already called
511 // sanitizeUserInputValue(). 511 // sanitizeUserInputValue().
512 // sanitizeValue() is needed because IME input doesn't dispatch BeforeTextIn sertedEvent. 512 // sanitizeValue() is needed because IME input doesn't dispatch BeforeTextIn sertedEvent.
513 element().setValueFromRenderer(sanitizeValue(convertFromVisibleValue(element ().innerTextValue()))); 513 element().setValueFromRenderer(sanitizeValue(convertFromVisibleValue(element ().innerTextValue())));
514 element().updatePlaceholderVisibility(false); 514 element().updatePlaceholderVisibility(false);
515 // Recalc for :invalid change. 515 // Recalc for :invalid change.
516 element().setNeedsStyleRecalc(); 516 element().setNeedsStyleRecalc(SubtreeStyleChange);
517 517
518 didSetValueByUserEdit(wasChanged ? ValueChangeStateChanged : ValueChangeStat eNone); 518 didSetValueByUserEdit(wasChanged ? ValueChangeStateChanged : ValueChangeStat eNone);
519 } 519 }
520 520
521 void TextFieldInputType::didSetValueByUserEdit(ValueChangeState state) 521 void TextFieldInputType::didSetValueByUserEdit(ValueChangeState state)
522 { 522 {
523 if (!element().focused()) 523 if (!element().focused())
524 return; 524 return;
525 if (Chrome* chrome = this->chrome()) 525 if (Chrome* chrome = this->chrome())
526 chrome->client().didChangeValueInTextField(element()); 526 chrome->client().didChangeValueInTextField(element());
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 { 565 {
566 return shouldSpinButtonRespondToMouseEvents() && element().focused(); 566 return shouldSpinButtonRespondToMouseEvents() && element().focused();
567 } 567 }
568 568
569 void TextFieldInputType::spinButtonDidReleaseMouseCapture() 569 void TextFieldInputType::spinButtonDidReleaseMouseCapture()
570 { 570 {
571 element().dispatchFormControlChangeEvent(); 571 element().dispatchFormControlChangeEvent();
572 } 572 }
573 573
574 } // namespace WebCore 574 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/forms/InputType.cpp ('k') | Source/core/html/shadow/DateTimeEditElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698