OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |