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

Side by Side Diff: Source/core/html/HTMLInputElement.cpp

Issue 583833007: Revert of Fix update of validity cache value, so that it reflects the correct state of any ... (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/html/HTMLTextAreaElement.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 AtomicString valueString = fastGetAttribute(valueAttr); 447 AtomicString valueString = fastGetAttribute(valueAttr);
448 m_inputType->warnIfValueIsInvalid(valueString); 448 m_inputType->warnIfValueIsInvalid(valueString);
449 m_valueIfDirty = sanitizeValue(valueString); 449 m_valueIfDirty = sanitizeValue(valueString);
450 } else { 450 } else {
451 if (!hasDirtyValue()) 451 if (!hasDirtyValue())
452 m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).string ()); 452 m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).string ());
453 updateValueIfNeeded(); 453 updateValueIfNeeded();
454 } 454 }
455 455
456 m_needsToUpdateViewValue = true; 456 m_needsToUpdateViewValue = true;
457 setNeedsValidityCheck();
458 m_inputTypeView->updateView(); 457 m_inputTypeView->updateView();
459 458
460 if (didRespectHeightAndWidth != m_inputType->shouldRespectHeightAndWidthAttr ibutes()) { 459 if (didRespectHeightAndWidth != m_inputType->shouldRespectHeightAndWidthAttr ibutes()) {
461 ASSERT(elementData()); 460 ASSERT(elementData());
462 AttributeCollection attributes = attributesWithoutUpdate(); 461 AttributeCollection attributes = attributesWithoutUpdate();
463 if (const Attribute* height = attributes.find(heightAttr)) 462 if (const Attribute* height = attributes.find(heightAttr))
464 attributeChanged(heightAttr, height->value()); 463 attributeChanged(heightAttr, height->value());
465 if (const Attribute* width = attributes.find(widthAttr)) 464 if (const Attribute* width = attributes.find(widthAttr))
466 attributeChanged(widthAttr, width->value()); 465 attributeChanged(widthAttr, width->value());
467 if (const Attribute* align = attributes.find(alignAttr)) 466 if (const Attribute* align = attributes.find(alignAttr))
468 attributeChanged(alignAttr, align->value()); 467 attributeChanged(alignAttr, align->value());
469 } 468 }
470 469
471 if (document().focusedElement() == this) 470 if (document().focusedElement() == this)
472 document().updateFocusAppearanceSoon(true /* restore selection */); 471 document().updateFocusAppearanceSoon(true /* restore selection */);
473 472
474 setChangedSinceLastFormControlChangeEvent(false); 473 setChangedSinceLastFormControlChangeEvent(false);
475 474
476 addToRadioButtonGroup(); 475 addToRadioButtonGroup();
477 476
477 setNeedsValidityCheck();
478 notifyFormStateChanged(); 478 notifyFormStateChanged();
479 } 479 }
480 480
481 void HTMLInputElement::subtreeHasChanged() 481 void HTMLInputElement::subtreeHasChanged()
482 { 482 {
483 m_inputTypeView->subtreeHasChanged(); 483 m_inputTypeView->subtreeHasChanged();
484 // When typing in an input field, childrenChanged is not called, so we need to force the directionality check. 484 // When typing in an input field, childrenChanged is not called, so we need to force the directionality check.
485 calculateAndAdjustDirectionality(); 485 calculateAndAdjustDirectionality();
486 } 486 }
487 487
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 { 1894 {
1895 listAttributeTargetChanged(); 1895 listAttributeTargetChanged();
1896 } 1896 }
1897 1897
1898 AXObject* HTMLInputElement::popupRootAXObject() 1898 AXObject* HTMLInputElement::popupRootAXObject()
1899 { 1899 {
1900 return m_inputTypeView->popupRootAXObject(); 1900 return m_inputTypeView->popupRootAXObject();
1901 } 1901 }
1902 1902
1903 } // namespace 1903 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698