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

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

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 select->ensureUserAgentShadowRoot(); 109 select->ensureUserAgentShadowRoot();
110 return select.release(); 110 return select.release();
111 } 111 }
112 112
113 HTMLSelectElement::~HTMLSelectElement() 113 HTMLSelectElement::~HTMLSelectElement()
114 { 114 {
115 } 115 }
116 116
117 const AtomicString& HTMLSelectElement::formControlType() const 117 const AtomicString& HTMLSelectElement::formControlType() const
118 { 118 {
119 DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple", AtomicString::ConstructFromLiteral)); 119 DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple")) ;
120 DEFINE_STATIC_LOCAL(const AtomicString, selectOne, ("select-one", AtomicStri ng::ConstructFromLiteral)); 120 DEFINE_STATIC_LOCAL(const AtomicString, selectOne, ("select-one"));
121 return m_multiple ? selectMultiple : selectOne; 121 return m_multiple ? selectMultiple : selectOne;
122 } 122 }
123 123
124 void HTMLSelectElement::optionSelectedByUser(int optionIndex, bool fireOnChangeN ow, bool allowMultipleSelection) 124 void HTMLSelectElement::optionSelectedByUser(int optionIndex, bool fireOnChangeN ow, bool allowMultipleSelection)
125 { 125 {
126 // User interaction such as mousedown events can cause list box select 126 // User interaction such as mousedown events can cause list box select
127 // elements to send change events. This produces that same behavior for 127 // elements to send change events. This produces that same behavior for
128 // changes triggered by other code running on behalf of the user. 128 // changes triggered by other code running on behalf of the user.
129 if (!usesMenuList()) { 129 if (!usesMenuList()) {
130 updateSelectedState(item(optionIndex), allowMultipleSelection, false); 130 updateSelectedState(item(optionIndex), allowMultipleSelection, false);
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 m_popupIsVisible = false; 1987 m_popupIsVisible = false;
1988 m_popup = nullptr; 1988 m_popup = nullptr;
1989 } 1989 }
1990 1990
1991 void HTMLSelectElement::resetTypeAheadSessionForTesting() 1991 void HTMLSelectElement::resetTypeAheadSessionForTesting()
1992 { 1992 {
1993 m_typeAhead.resetSession(); 1993 m_typeAhead.resetSession();
1994 } 1994 }
1995 1995
1996 } // namespace blink 1996 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698