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

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

Issue 2634453003: Remove SelectionBehaviorOnFocus argument of Document::updateFocusAppearanceSoon(). (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/core/dom/Document.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) 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 AttributeModificationParams(widthAttr, width->value(), width->value(), 494 AttributeModificationParams(widthAttr, width->value(), width->value(),
495 AttributeModificationReason::kDirectly)); 495 AttributeModificationReason::kDirectly));
496 } 496 }
497 if (const Attribute* align = attributes.find(alignAttr)) { 497 if (const Attribute* align = attributes.find(alignAttr)) {
498 TextControlElement::attributeChanged( 498 TextControlElement::attributeChanged(
499 AttributeModificationParams(alignAttr, align->value(), align->value(), 499 AttributeModificationParams(alignAttr, align->value(), align->value(),
500 AttributeModificationReason::kDirectly)); 500 AttributeModificationReason::kDirectly));
501 } 501 }
502 } 502 }
503 503
504 // UA Shadow tree was recreated. We need to set selection again. We do it
505 // later in order to avoid force layout.
504 if (document().focusedElement() == this) 506 if (document().focusedElement() == this)
505 document().updateFocusAppearanceSoon(SelectionBehaviorOnFocus::Restore); 507 document().updateFocusAppearanceLater();
506 508
507 setTextAsOfLastFormControlChangeEvent(value()); 509 setTextAsOfLastFormControlChangeEvent(value());
508 setChangedSinceLastFormControlChangeEvent(false); 510 setChangedSinceLastFormControlChangeEvent(false);
509 511
510 addToRadioButtonGroup(); 512 addToRadioButtonGroup();
511 513
512 setNeedsValidityCheck(); 514 setNeedsValidityCheck();
513 if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) && 515 if ((couldBeSuccessfulSubmitButton || canBeSuccessfulSubmitButton()) &&
514 formOwner() && isConnected()) 516 formOwner() && isConnected())
515 formOwner()->invalidateDefaultButtonStyle(); 517 formOwner()->invalidateDefaultButtonStyle();
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 849 }
848 850
849 void HTMLInputElement::attachLayoutTree(const AttachContext& context) { 851 void HTMLInputElement::attachLayoutTree(const AttachContext& context) {
850 TextControlElement::attachLayoutTree(context); 852 TextControlElement::attachLayoutTree(context);
851 if (layoutObject()) { 853 if (layoutObject()) {
852 m_inputType->onAttachWithLayoutObject(); 854 m_inputType->onAttachWithLayoutObject();
853 } 855 }
854 856
855 m_inputTypeView->startResourceLoading(); 857 m_inputTypeView->startResourceLoading();
856 m_inputType->countUsage(); 858 m_inputType->countUsage();
857
858 if (document().focusedElement() == this)
859 document().updateFocusAppearanceSoon(SelectionBehaviorOnFocus::Restore);
860 } 859 }
861 860
862 void HTMLInputElement::detachLayoutTree(const AttachContext& context) { 861 void HTMLInputElement::detachLayoutTree(const AttachContext& context) {
863 if (layoutObject()) { 862 if (layoutObject()) {
864 m_inputType->onDetachWithLayoutObject(); 863 m_inputType->onDetachWithLayoutObject();
865 } 864 }
866 TextControlElement::detachLayoutTree(context); 865 TextControlElement::detachLayoutTree(context);
867 m_needsToUpdateViewValue = true; 866 m_needsToUpdateViewValue = true;
868 m_inputTypeView->closePopupView(); 867 m_inputTypeView->closePopupView();
869 } 868 }
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 1887
1889 bool HTMLInputElement::hasFallbackContent() const { 1888 bool HTMLInputElement::hasFallbackContent() const {
1890 return m_inputTypeView->hasFallbackContent(); 1889 return m_inputTypeView->hasFallbackContent();
1891 } 1890 }
1892 1891
1893 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { 1892 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) {
1894 return m_inputType->setFilesFromPaths(paths); 1893 return m_inputType->setFilesFromPaths(paths);
1895 } 1894 }
1896 1895
1897 } // namespace blink 1896 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698