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

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

Issue 1798043002: Removed CORE_EXPORT from APIs at NodeTraversal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved DOM Traversing API to RadioInputTYpe 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 m_isInClickHandler = false; 204 m_isInClickHandler = false;
205 // The work we did in willDispatchClick was default handling. 205 // The work we did in willDispatchClick was default handling.
206 event->setDefaultHandled(); 206 event->setDefaultHandled();
207 } 207 }
208 208
209 bool RadioInputType::shouldAppearIndeterminate() const 209 bool RadioInputType::shouldAppearIndeterminate() const
210 { 210 {
211 return !element().checkedRadioButtonForGroup(); 211 return !element().checkedRadioButtonForGroup();
212 } 212 }
213 213
214 HTMLInputElement* RadioInputType::nextRadioButtonInGroup(HTMLInputElement* curre nt, bool forward)
215 {
216 for (HTMLElement* htmlElement = nextElement(*current, current->form(), forwa rd); htmlElement; htmlElement = nextElement(*htmlElement, current->form(), forwa rd)) {
217 if (!isHTMLInputElement(*htmlElement))
218 continue;
219 HTMLInputElement* inputElement = toHTMLInputElement(htmlElement);
220 if (current->form() == inputElement->form() && inputElement->type() == I nputTypeNames::radio && inputElement->name() == current->name())
221 return inputElement;
222 }
223 return nullptr;
224 }
225
214 } // namespace blink 226 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698