| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 // FIXME: Could share this with BaseClickableWithKeyInputType and RangeInputType
if we had a common base class. | 83 // FIXME: Could share this with BaseClickableWithKeyInputType and RangeInputType
if we had a common base class. |
| 84 void BaseCheckableInputType::accessKeyAction(bool sendMouseEvents) | 84 void BaseCheckableInputType::accessKeyAction(bool sendMouseEvents) |
| 85 { | 85 { |
| 86 InputType::accessKeyAction(sendMouseEvents); | 86 InputType::accessKeyAction(sendMouseEvents); |
| 87 | 87 |
| 88 element().dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents
: SendNoEvents); | 88 element().dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents
: SendNoEvents); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool BaseCheckableInputType::matchesDefaultPseudoClass() |
| 92 { |
| 93 return element().fastHasAttribute(checkedAttr); |
| 94 } |
| 95 |
| 91 String BaseCheckableInputType::fallbackValue() const | 96 String BaseCheckableInputType::fallbackValue() const |
| 92 { | 97 { |
| 93 return "on"; | 98 return "on"; |
| 94 } | 99 } |
| 95 | 100 |
| 96 bool BaseCheckableInputType::storesValueSeparateFromAttribute() | 101 bool BaseCheckableInputType::storesValueSeparateFromAttribute() |
| 97 { | 102 { |
| 98 return false; | 103 return false; |
| 99 } | 104 } |
| 100 | 105 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 113 { | 118 { |
| 114 return true; | 119 return true; |
| 115 } | 120 } |
| 116 | 121 |
| 117 bool BaseCheckableInputType::shouldDispatchFormControlChangeEvent(String& oldVal
ue, String& newValue) | 122 bool BaseCheckableInputType::shouldDispatchFormControlChangeEvent(String& oldVal
ue, String& newValue) |
| 118 { | 123 { |
| 119 return oldValue != newValue; | 124 return oldValue != newValue; |
| 120 } | 125 } |
| 121 | 126 |
| 122 } // namespace blink | 127 } // namespace blink |
| OLD | NEW |