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

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: Took Tamura's comment into consideration 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') | 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) 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)
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. 215 void toHTMLSelectElement(const HTMLSelectElement*); // This overload will catch anyone doing an unnecessary cast.
227 216
228 } // namespace 217 } // namespace
229 218
230 #endif 219 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698