| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 element()->endEditing(); | 204 element()->endEditing(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 bool TextFieldInputType::shouldSubmitImplicitly(Event* event) | 207 bool TextFieldInputType::shouldSubmitImplicitly(Event* event) |
| 208 { | 208 { |
| 209 return (event->type() == eventNames().textInputEvent && event->hasInterface(
eventNames().interfaceForTextEvent) && static_cast<TextEvent*>(event)->data() ==
"\n") || InputType::shouldSubmitImplicitly(event); | 209 return (event->type() == eventNames().textInputEvent && event->hasInterface(
eventNames().interfaceForTextEvent) && static_cast<TextEvent*>(event)->data() ==
"\n") || InputType::shouldSubmitImplicitly(event); |
| 210 } | 210 } |
| 211 | 211 |
| 212 RenderObject* TextFieldInputType::createRenderer(RenderStyle*) const | 212 RenderObject* TextFieldInputType::createRenderer(RenderStyle*) const |
| 213 { | 213 { |
| 214 return new (element()->document()->renderArena()) RenderTextControlSingleLin
e(element()); | 214 return new RenderTextControlSingleLine(element()); |
| 215 } | 215 } |
| 216 | 216 |
| 217 bool TextFieldInputType::needsContainer() const | 217 bool TextFieldInputType::needsContainer() const |
| 218 { | 218 { |
| 219 #if ENABLE(INPUT_SPEECH) | 219 #if ENABLE(INPUT_SPEECH) |
| 220 return element()->isSpeechEnabled(); | 220 return element()->isSpeechEnabled(); |
| 221 #else | 221 #else |
| 222 return false; | 222 return false; |
| 223 #endif | 223 #endif |
| 224 } | 224 } |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 { | 516 { |
| 517 return !element()->isDisabledOrReadOnly(); | 517 return !element()->isDisabledOrReadOnly(); |
| 518 } | 518 } |
| 519 | 519 |
| 520 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() | 520 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() |
| 521 { | 521 { |
| 522 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); | 522 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); |
| 523 } | 523 } |
| 524 | 524 |
| 525 } // namespace WebCore | 525 } // namespace WebCore |
| OLD | NEW |