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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 { | 62 { |
63 } | 63 } |
64 | 64 |
65 bool TextFieldInputType::isTextField() const | 65 bool TextFieldInputType::isTextField() const |
66 { | 66 { |
67 return true; | 67 return true; |
68 } | 68 } |
69 | 69 |
70 bool TextFieldInputType::valueMissing(const String& value) const | 70 bool TextFieldInputType::valueMissing(const String& value) const |
71 { | 71 { |
72 return element()->required() && value.isEmpty(); | 72 return value.isEmpty(); |
73 } | 73 } |
74 | 74 |
75 bool TextFieldInputType::canSetSuggestedValue() | 75 bool TextFieldInputType::canSetSuggestedValue() |
76 { | 76 { |
77 return true; | 77 return true; |
78 } | 78 } |
79 | 79 |
80 void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange
d, bool sendChangeEvent) | 80 void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange
d, bool sendChangeEvent) |
81 { | 81 { |
82 InputType::setValue(sanitizedValue, valueChanged, sendChangeEvent); | 82 InputType::setValue(sanitizedValue, valueChanged, sendChangeEvent); |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) cons
t | 377 bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) cons
t |
378 { | 378 { |
379 InputType::appendFormData(list, multipart); | 379 InputType::appendFormData(list, multipart); |
380 const AtomicString& dirnameAttrValue = element()->fastGetAttribute(dirnameAt
tr); | 380 const AtomicString& dirnameAttrValue = element()->fastGetAttribute(dirnameAt
tr); |
381 if (!dirnameAttrValue.isNull()) | 381 if (!dirnameAttrValue.isNull()) |
382 list.appendData(dirnameAttrValue, element()->directionForFormData()); | 382 list.appendData(dirnameAttrValue, element()->directionForFormData()); |
383 return true; | 383 return true; |
384 } | 384 } |
385 | 385 |
386 } // namespace WebCore | 386 } // namespace WebCore |
OLD | NEW |