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

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

Issue 1633553002: Change in focus with movement of Arrow keys for RTL radio buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 void RadioInputType::handleClickEvent(MouseEvent* event) 68 void RadioInputType::handleClickEvent(MouseEvent* event)
69 { 69 {
70 event->setDefaultHandled(); 70 event->setDefaultHandled();
71 } 71 }
72 72
73 HTMLInputElement* RadioInputType::findNextFocusableRadioButtonInGroup(HTMLInputE lement* currentElement, bool forward) 73 HTMLInputElement* RadioInputType::findNextFocusableRadioButtonInGroup(HTMLInputE lement* currentElement, bool forward)
74 { 74 {
75 HTMLElement* htmlElement; 75 HTMLElement* htmlElement;
76 if (computedTextDirection() == RTL)
tkent 2016/02/03 23:45:37 Here is not a right place to check RTL. We don't n
chakshu 2016/02/08 09:46:40 Done.
77 forward = !(forward);
76 for (htmlElement = nextElement(*currentElement, element().form(), forward); htmlElement; htmlElement = nextElement(*htmlElement, element().form(), forward)) { 78 for (htmlElement = nextElement(*currentElement, element().form(), forward); htmlElement; htmlElement = nextElement(*htmlElement, element().form(), forward)) {
77 if (!isHTMLInputElement(*htmlElement)) 79 if (!isHTMLInputElement(*htmlElement))
78 continue; 80 continue;
79 HTMLInputElement* inputElement = toHTMLInputElement(htmlElement); 81 HTMLInputElement* inputElement = toHTMLInputElement(htmlElement);
80 if (element().form() == inputElement->form() && inputElement->type() == InputTypeNames::radio && inputElement->name() == element().name() && inputElemen t->isFocusable()) 82 if (element().form() == inputElement->form() && inputElement->type() == InputTypeNames::radio && inputElement->name() == element().name() && inputElemen t->isFocusable())
81 return inputElement; 83 return inputElement;
82 } 84 }
83 return nullptr; 85 return nullptr;
84 } 86 }
85 87
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // The work we did in willDispatchClick was default handling. 204 // The work we did in willDispatchClick was default handling.
203 event->setDefaultHandled(); 205 event->setDefaultHandled();
204 } 206 }
205 207
206 bool RadioInputType::shouldAppearIndeterminate() const 208 bool RadioInputType::shouldAppearIndeterminate() const
207 { 209 {
208 return !element().checkedRadioButtonForGroup(); 210 return !element().checkedRadioButtonForGroup();
209 } 211 }
210 212
211 } // namespace blink 213 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698