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

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

Issue 2586143004: Blur immediately if an attribute change made an element unfocasable. (Closed)
Patch Set: Update comments and a function name Created 3 years, 12 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
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 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 478 }
479 479
480 m_needsToUpdateViewValue = true; 480 m_needsToUpdateViewValue = true;
481 m_inputTypeView->updateView(); 481 m_inputTypeView->updateView();
482 482
483 if (didRespectHeightAndWidth != 483 if (didRespectHeightAndWidth !=
484 m_inputType->shouldRespectHeightAndWidthAttributes()) { 484 m_inputType->shouldRespectHeightAndWidthAttributes()) {
485 DCHECK(elementData()); 485 DCHECK(elementData());
486 AttributeCollection attributes = attributesWithoutUpdate(); 486 AttributeCollection attributes = attributesWithoutUpdate();
487 if (const Attribute* height = attributes.find(heightAttr)) { 487 if (const Attribute* height = attributes.find(heightAttr)) {
488 TextControlElement::attributeChanged(heightAttr, height->value(), 488 TextControlElement::attributeChanged(
489 height->value()); 489 heightAttr, height->value(), height->value(),
490 AttributeModificationReason::kDirectly);
490 } 491 }
491 if (const Attribute* width = attributes.find(widthAttr)) { 492 if (const Attribute* width = attributes.find(widthAttr)) {
492 TextControlElement::attributeChanged(widthAttr, width->value(), 493 TextControlElement::attributeChanged(
493 width->value()); 494 widthAttr, width->value(), width->value(),
495 AttributeModificationReason::kDirectly);
494 } 496 }
495 if (const Attribute* align = attributes.find(alignAttr)) { 497 if (const Attribute* align = attributes.find(alignAttr)) {
496 TextControlElement::attributeChanged(alignAttr, align->value(), 498 TextControlElement::attributeChanged(
497 align->value()); 499 alignAttr, align->value(), align->value(),
500 AttributeModificationReason::kDirectly);
498 } 501 }
499 } 502 }
500 503
501 if (document().focusedElement() == this) 504 if (document().focusedElement() == this)
502 document().updateFocusAppearanceSoon(SelectionBehaviorOnFocus::Restore); 505 document().updateFocusAppearanceSoon(SelectionBehaviorOnFocus::Restore);
503 506
504 setTextAsOfLastFormControlChangeEvent(value()); 507 setTextAsOfLastFormControlChangeEvent(value());
505 setChangedSinceLastFormControlChangeEvent(false); 508 setChangedSinceLastFormControlChangeEvent(false);
506 509
507 addToRadioButtonGroup(); 510 addToRadioButtonGroup();
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 1888
1886 bool HTMLInputElement::hasFallbackContent() const { 1889 bool HTMLInputElement::hasFallbackContent() const {
1887 return m_inputTypeView->hasFallbackContent(); 1890 return m_inputTypeView->hasFallbackContent();
1888 } 1891 }
1889 1892
1890 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { 1893 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) {
1891 return m_inputType->setFilesFromPaths(paths); 1894 return m_inputType->setFilesFromPaths(paths);
1892 } 1895 }
1893 1896
1894 } // namespace blink 1897 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSlotElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698