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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 { | 194 { |
195 InputType::handleBlurEvent(); | 195 InputType::handleBlurEvent(); |
196 element()->endEditing(); | 196 element()->endEditing(); |
197 } | 197 } |
198 | 198 |
199 bool TextFieldInputType::shouldSubmitImplicitly(Event* event) | 199 bool TextFieldInputType::shouldSubmitImplicitly(Event* event) |
200 { | 200 { |
201 return (event->type() == eventNames().textInputEvent && event->hasInterface(
eventNames().interfaceForTextEvent) && static_cast<TextEvent*>(event)->data() ==
"\n") || InputType::shouldSubmitImplicitly(event); | 201 return (event->type() == eventNames().textInputEvent && event->hasInterface(
eventNames().interfaceForTextEvent) && static_cast<TextEvent*>(event)->data() ==
"\n") || InputType::shouldSubmitImplicitly(event); |
202 } | 202 } |
203 | 203 |
204 RenderObject* TextFieldInputType::createRenderer(RenderArena* arena, RenderStyle
*) const | 204 RenderObject* TextFieldInputType::createRenderer(RenderStyle*) const |
205 { | 205 { |
206 return new (arena) RenderTextControlSingleLine(element()); | 206 return new RenderTextControlSingleLine(element()); |
207 } | 207 } |
208 | 208 |
209 bool TextFieldInputType::needsContainer() const | 209 bool TextFieldInputType::needsContainer() const |
210 { | 210 { |
211 #if ENABLE(INPUT_SPEECH) | 211 #if ENABLE(INPUT_SPEECH) |
212 return element()->isSpeechEnabled(); | 212 return element()->isSpeechEnabled(); |
213 #else | 213 #else |
214 return false; | 214 return false; |
215 #endif | 215 #endif |
216 } | 216 } |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 { | 513 { |
514 return !element()->isDisabledOrReadOnly(); | 514 return !element()->isDisabledOrReadOnly(); |
515 } | 515 } |
516 | 516 |
517 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() | 517 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() |
518 { | 518 { |
519 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); | 519 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); |
520 } | 520 } |
521 | 521 |
522 } // namespace WebCore | 522 } // namespace WebCore |
OLD | NEW |