OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011,2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011,2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 for (unsigned i = 0; i < input.length(); ++i) { | 406 for (unsigned i = 0; i < input.length(); ++i) { |
407 UChar ch = input[i]; | 407 UChar ch = input[i]; |
408 if (standardChars.find(ch) != kNotFound) | 408 if (standardChars.find(ch) != kNotFound) |
409 builder.append(ch); | 409 builder.append(ch); |
410 else if (m_acceptableNumberCharacters.find(ch) != kNotFound) | 410 else if (m_acceptableNumberCharacters.find(ch) != kNotFound) |
411 builder.append(ch); | 411 builder.append(ch); |
412 } | 412 } |
413 return builder.toString(); | 413 return builder.toString(); |
414 } | 414 } |
415 | 415 |
416 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | |
417 String Locale::localizedDecimalSeparator() | 416 String Locale::localizedDecimalSeparator() |
418 { | 417 { |
419 initializeLocaleData(); | 418 initializeLocaleData(); |
420 return m_decimalSymbols[DecimalSeparatorIndex]; | 419 return m_decimalSymbols[DecimalSeparatorIndex]; |
421 } | 420 } |
422 #endif | |
423 | 421 |
424 String Locale::formatDateTime(const DateComponents& date, FormatType formatType) | 422 String Locale::formatDateTime(const DateComponents& date, FormatType formatType) |
425 { | 423 { |
426 if (date.getType() == DateComponents::Invalid) | 424 if (date.getType() == DateComponents::Invalid) |
427 return String(); | 425 return String(); |
428 | 426 |
429 DateTimeStringBuilder builder(*this, date); | 427 DateTimeStringBuilder builder(*this, date); |
430 switch (date.getType()) { | 428 switch (date.getType()) { |
431 case DateComponents::Time: | 429 case DateComponents::Time: |
432 builder.build(formatType == FormatTypeShort ? shortTimeFormat() : timeFo
rmat()); | 430 builder.build(formatType == FormatTypeShort ? shortTimeFormat() : timeFo
rmat()); |
(...skipping 12 matching lines...) Expand all Loading... |
445 builder.build(formatType == FormatTypeShort ? dateTimeFormatWithoutSecon
ds() : dateTimeFormatWithSeconds()); | 443 builder.build(formatType == FormatTypeShort ? dateTimeFormatWithoutSecon
ds() : dateTimeFormatWithSeconds()); |
446 break; | 444 break; |
447 case DateComponents::Invalid: | 445 case DateComponents::Invalid: |
448 ASSERT_NOT_REACHED(); | 446 ASSERT_NOT_REACHED(); |
449 break; | 447 break; |
450 } | 448 } |
451 return builder.toString(); | 449 return builder.toString(); |
452 } | 450 } |
453 | 451 |
454 } // namespace blink | 452 } // namespace blink |
OLD | NEW |