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

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

Issue 1744113002: Deprecate 'results' attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/frame/Deprecation.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 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 29 matching lines...) Expand all
40 #include "core/dom/IdTargetObserver.h" 40 #include "core/dom/IdTargetObserver.h"
41 #include "core/dom/shadow/InsertionPoint.h" 41 #include "core/dom/shadow/InsertionPoint.h"
42 #include "core/dom/shadow/ShadowRoot.h" 42 #include "core/dom/shadow/ShadowRoot.h"
43 #include "core/editing/FrameSelection.h" 43 #include "core/editing/FrameSelection.h"
44 #include "core/editing/spellcheck/SpellChecker.h" 44 #include "core/editing/spellcheck/SpellChecker.h"
45 #include "core/events/BeforeTextInsertedEvent.h" 45 #include "core/events/BeforeTextInsertedEvent.h"
46 #include "core/events/KeyboardEvent.h" 46 #include "core/events/KeyboardEvent.h"
47 #include "core/events/MouseEvent.h" 47 #include "core/events/MouseEvent.h"
48 #include "core/events/ScopedEventQueue.h" 48 #include "core/events/ScopedEventQueue.h"
49 #include "core/events/TouchEvent.h" 49 #include "core/events/TouchEvent.h"
50 #include "core/frame/Deprecation.h"
50 #include "core/frame/EventHandlerRegistry.h" 51 #include "core/frame/EventHandlerRegistry.h"
51 #include "core/frame/FrameHost.h" 52 #include "core/frame/FrameHost.h"
52 #include "core/frame/FrameView.h" 53 #include "core/frame/FrameView.h"
53 #include "core/frame/LocalFrame.h" 54 #include "core/frame/LocalFrame.h"
54 #include "core/frame/UseCounter.h" 55 #include "core/frame/UseCounter.h"
55 #include "core/html/HTMLCollection.h" 56 #include "core/html/HTMLCollection.h"
56 #include "core/html/HTMLDataListElement.h" 57 #include "core/html/HTMLDataListElement.h"
57 #include "core/html/HTMLDataListOptionsCollection.h" 58 #include "core/html/HTMLDataListOptionsCollection.h"
58 #include "core/html/HTMLFormElement.h" 59 #include "core/html/HTMLFormElement.h"
59 #include "core/html/HTMLImageLoader.h" 60 #include "core/html/HTMLImageLoader.h"
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } else if (name == onsearchAttr) { 739 } else if (name == onsearchAttr) {
739 // Search field and slider attributes all just cause updateFromElement t o be called through style recalcing. 740 // Search field and slider attributes all just cause updateFromElement t o be called through style recalcing.
740 setAttributeEventListener(EventTypeNames::search, createAttributeEventLi stener(this, name, value, eventParameterName())); 741 setAttributeEventListener(EventTypeNames::search, createAttributeEventLi stener(this, name, value, eventParameterName()));
741 } else if (name == resultsAttr) { 742 } else if (name == resultsAttr) {
742 int oldResults = m_maxResults; 743 int oldResults = m_maxResults;
743 m_maxResults = !value.isNull() ? std::min(value.toInt(), maxSavedResults ) : -1; 744 m_maxResults = !value.isNull() ? std::min(value.toInt(), maxSavedResults ) : -1;
744 // FIXME: Detaching just for maxResults change is not ideal. We should figure out the right 745 // FIXME: Detaching just for maxResults change is not ideal. We should figure out the right
745 // time to relayout for this change. 746 // time to relayout for this change.
746 if ((m_maxResults < 0) != (oldResults < 0)) 747 if ((m_maxResults < 0) != (oldResults < 0))
747 lazyReattachIfAttached(); 748 lazyReattachIfAttached();
748 UseCounter::count(document(), UseCounter::ResultsAttribute); 749 Deprecation::countDeprecation(document(), UseCounter::ResultsAttribute);
749 } else if (name == incrementalAttr) { 750 } else if (name == incrementalAttr) {
750 UseCounter::count(document(), UseCounter::IncrementalAttribute); 751 UseCounter::count(document(), UseCounter::IncrementalAttribute);
751 } else if (name == minAttr) { 752 } else if (name == minAttr) {
752 m_inputTypeView->minOrMaxAttributeChanged(); 753 m_inputTypeView->minOrMaxAttributeChanged();
753 m_inputType->sanitizeValueInResponseToMinOrMaxAttributeChange(); 754 m_inputType->sanitizeValueInResponseToMinOrMaxAttributeChange();
754 setNeedsValidityCheck(); 755 setNeedsValidityCheck();
755 UseCounter::count(document(), UseCounter::MinAttribute); 756 UseCounter::count(document(), UseCounter::MinAttribute);
756 } else if (name == maxAttr) { 757 } else if (name == maxAttr) {
757 m_inputTypeView->minOrMaxAttributeChanged(); 758 m_inputTypeView->minOrMaxAttributeChanged();
758 m_inputType->sanitizeValueInResponseToMinOrMaxAttributeChange(); 759 m_inputType->sanitizeValueInResponseToMinOrMaxAttributeChange();
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 void HTMLInputElement::ensurePrimaryContent() 1932 void HTMLInputElement::ensurePrimaryContent()
1932 { 1933 {
1933 m_inputTypeView->ensurePrimaryContent(); 1934 m_inputTypeView->ensurePrimaryContent();
1934 } 1935 }
1935 1936
1936 bool HTMLInputElement::hasFallbackContent() const 1937 bool HTMLInputElement::hasFallbackContent() const
1937 { 1938 {
1938 return m_inputTypeView->hasFallbackContent(); 1939 return m_inputTypeView->hasFallbackContent();
1939 } 1940 }
1940 } // namespace blink 1941 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698