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

Side by Side Diff: Source/core/html/HTMLSelectElement.h

Issue 19488002: Introduce toHTMLSelectElement and remove isHTMLSelectElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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 | « no previous file | Source/core/testing/Internals.cpp » ('j') | Source/core/testing/Internals.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2000 Dirk Mueller (mueller@kde.org) 5 * (C) 2000 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 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 int m_lastOnChangeIndex; 199 int m_lastOnChangeIndex;
200 int m_activeSelectionAnchorIndex; 200 int m_activeSelectionAnchorIndex;
201 int m_activeSelectionEndIndex; 201 int m_activeSelectionEndIndex;
202 bool m_isProcessingUserDrivenChange; 202 bool m_isProcessingUserDrivenChange;
203 bool m_multiple; 203 bool m_multiple;
204 bool m_activeSelectionState; 204 bool m_activeSelectionState;
205 mutable bool m_shouldRecalcListItems; 205 mutable bool m_shouldRecalcListItems;
206 bool m_isParsingInProgress; 206 bool m_isParsingInProgress;
207 }; 207 };
208 208
209 inline bool isHTMLSelectElement(const Node* node)
210 {
211 return node->hasTagName(HTMLNames::selectTag);
212 }
213
214 inline HTMLSelectElement* toHTMLSelectElement(Node* node) 209 inline HTMLSelectElement* toHTMLSelectElement(Node* node)
215 { 210 {
216 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node)); 211 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::select Tag));
217 return static_cast<HTMLSelectElement*>(node); 212 return static_cast<HTMLSelectElement*>(node);
218 } 213 }
219 214
220 inline const HTMLSelectElement* toHTMLSelectElement(const Node* node)
tkent 2013/07/17 01:47:56 Why do you remove this function?
kangil_ 2013/07/17 02:16:22 Just because we don't use this at the moment. But,
tkent 2013/07/17 03:47:05 Hmm, it seems this function is actually unused. I
221 {
222 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLSelectElement(node));
223 return static_cast<const HTMLSelectElement*>(node);
224 }
225
226 void toHTMLSelectElement(const HTMLSelectElement*); // This overload will catch anyone doing an unnecessary cast.
tkent 2013/07/17 01:47:56 Ditto.
kangil_ 2013/07/17 02:16:22 I don't have strong opinion on this either, but sh
kangil_ 2013/07/17 02:21:46 Ah, this is wrong question. Please ignore this. :(
tkent 2013/07/17 03:47:05 Removing this function is not a goal of this CL, r
227
228 } // namespace 215 } // namespace
229 216
230 #endif 217 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/testing/Internals.cpp » ('j') | Source/core/testing/Internals.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698